Package javax.swing.plaf

Examples of javax.swing.plaf.ActionMapUIResource


    protected ActionMap getActionMap() {
        return createActionMap();
    }

    protected ActionMap createActionMap() {
        ActionMap result = new ActionMapUIResource();
        result.put("approveSelection", getApproveSelectionAction());
        result.put("cancelSelection", getCancelSelectionAction());
        result.put("Go Up", getChangeToParentDirectoryAction());

        return result;
    }
View Full Code Here


    protected ActionMap getActionMap() {
        return createActionMap();
    }

    protected ActionMap createActionMap() {
        ActionMap result = new ActionMapUIResource();
        result.put("approveSelection", getApproveSelectionAction());
        result.put("cancelSelection", getCancelSelectionAction());
        result.put("Go Up", getChangeToParentDirectoryAction());

        return result;
    }
View Full Code Here

   
    protected void installKeyboardActions() {
        super.installKeyboardActions();
  ActionMap map = SwingUtilities.getUIActionMap(menuBar);
        if (map == null) {
            map = new ActionMapUIResource();
            SwingUtilities.replaceUIActionMap(menuBar, map);
        }
        map.put("takeFocus", new TakeFocus());
    }
View Full Code Here

     * Create the action map for the system menu.
     *
     * @return the action map.
     */
    ActionMap createActionMap() {
        ActionMap map = new ActionMapUIResource();

        map.put("showSystemMenu", new ShowSystemMenuAction(true));
        map.put("hideSystemMenu", new ShowSystemMenuAction(false));

        return map;
    }
View Full Code Here

     * Create the action map for the system menu.
     *
     * @return the action map.
     */
    ActionMap createActionMap() {
        ActionMap map = new ActionMapUIResource();

        map.put("showSystemMenu", new ShowSystemMenuAction(true));
        map.put("hideSystemMenu", new ShowSystemMenuAction(false));

        return map;
    }
View Full Code Here

  /**
   * Return the mapping between JTree's input map and JGraph's actions.
   */
  ActionMap createActionMap() {
    // 1: Up, 2: Right, 3: Down, 4: Left
    ActionMap map = new ActionMapUIResource();

    map
        .put("selectPrevious", new GraphIncrementAction(1,
            "selectPrevious"));
    map.put("selectPreviousChangeLead", new GraphIncrementAction(1,
        "selectPreviousLead"));
    map.put("selectPreviousExtendSelection", new GraphIncrementAction(1,
        "selectPreviousExtendSelection"));

    map.put("selectParent", new GraphIncrementAction(4, "selectParent"));
    map.put("selectParentChangeLead", new GraphIncrementAction(4,
        "selectParentChangeLead"));

    map.put("selectNext", new GraphIncrementAction(3, "selectNext"));
    map.put("selectNextChangeLead", new GraphIncrementAction(3,
        "selectNextLead"));
    map.put("selectNextExtendSelection", new GraphIncrementAction(3,
        "selectNextExtendSelection"));

    map.put("selectChild", new GraphIncrementAction(2, "selectChild"));
    map.put("selectChildChangeLead", new GraphIncrementAction(2,
        "selectChildChangeLead"));

    map.put("cancel", new GraphCancelEditingAction("cancel"));
    map.put("startEditing", new GraphEditAction("startEditing"));
    map.put("selectAll", new GraphSelectAllAction("selectAll", true));
    map.put("clearSelection", new GraphSelectAllAction("clearSelection",
        false));
    return map;
  }
View Full Code Here

            @Override
            public void mousePressed(MouseEvent e) {
                TristateCheckBox.this.iterateState();
            }
        });
        ActionMap actions = new ActionMapUIResource();
        actions.put("pressed", new AbstractAction() {
            private static final long serialVersionUID = 1L;
            @Override
            public void actionPerformed(ActionEvent e) {
                TristateCheckBox.this.iterateState();
            }
        });
        actions.put("released", null);
        SwingUtilities.replaceUIActionMap(this, actions);
    }
View Full Code Here

    }

    final void installUIActionMap() {
        UIDefaults uiDefaults = UIManager.getLookAndFeelDefaults();
        String propertyName = getPropertyPrefix() + ".actionMap";
        ActionMap actionMap1 = new ActionMapUIResource();
        putActionToActionMap(focusAction, actionMap1);
        Object actionMap2 = uiDefaults.get(propertyName);
        if (actionMap2 == null) {
            ActionMapUIResource map = new ActionMapUIResource();
            Action[] actions = component.getActions();
            for (int i = 0; i < actions.length; i++) {
                putActionToActionMap(actions[i], map);
            }
            putActionToActionMap(TransferHandler.getPasteAction(), map);
View Full Code Here

    protected void installKeyboardActions() {
        super.installKeyboardActions();
        ActionMap map = SwingUtilities.getUIActionMap(menuBar);
        if (map == null) {
            map = new ActionMapUIResource();
            SwingUtilities.replaceUIActionMap(menuBar, map);
        }
        map.put("takeFocus", new TakeFocus());
    }
View Full Code Here

        }
        return map;
    }

    ActionMap createActionMap() {
        ActionMap map = new ActionMapUIResource();
        // we don't use it right now. Leave it since we might use it later.
        return map;
    }
View Full Code Here

TOP

Related Classes of javax.swing.plaf.ActionMapUIResource

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.