Package com.mucommander.ui.action

Examples of com.mucommander.ui.action.ActionDescriptor


      int nbRows = allActionIds.size();
      data = new Object[nbRows][NUM_OF_COLUMNS];

            for(String actionId : allActionIds) {
        ActionDescriptor actionDescriptor = ActionProperties.getActionDescriptor(actionId);
       
        HashMap<Integer, Object> actionProperties = new HashMap<Integer, Object>();
       
        ImageIcon actionIcon = actionDescriptor.getIcon();
        if (actionIcon == null)
          actionIcon = transparentIcon;
        String actionLabel = actionDescriptor.getLabel();
       
        /* 0 -> action's icon & name pair */
        actionProperties.put(description, new Pair<ImageIcon, String>(IconManager.getPaddedIcon(actionIcon, new Insets(0, 4, 0, 4)), actionLabel));
        /* 1 -> action's accelerator */
        actionProperties.put(accelerator, ActionKeymap.getAccelerator(actionId));
        /* 2 -> action's alternate accelerator */
        actionProperties.put(alt_accelerator, ActionKeymap.getAlternateAccelerator(actionId));
        /* 3 -> action's description */
        actionProperties.put(tooltips, actionDescriptor.getDescription());
       
        db.put(actionId, actionProperties);
      }
    }
View Full Code Here


      data = new Object[nbRows][NUM_OF_COLUMNS];
     
      for (int i = 0; i < nbRows; ++i) {
        String actionId = filteredActionIds.get(i);
        actionIds[i] = actionId;
        ActionDescriptor actionDescriptor = ActionProperties.getActionDescriptor(actionId);
       
        data[i][ACTION_DESCRIPTION_COLUMN_INDEX] = db.get(actionId).get(this.description);
       
        KeyStroke accelerator = (KeyStroke) db.get(actionId).get(this.accelerator);
        setAccelerator(accelerator, i);
       
        KeyStroke alternativeAccelerator = (KeyStroke) db.get(actionId).get(this.alt_accelerator);
        setAlternativeAccelerator(alternativeAccelerator, i);
       
        descriptions[i] = actionDescriptor.getDescription();
      }
     
      ShortcutsTable.this.clearSelection();
      ((DefaultTableModel) getModel()).setRowCount(data.length);
      ShortcutsTable.this.repaint();
View Full Code Here

TOP

Related Classes of com.mucommander.ui.action.ActionDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.