Package javax.swing.plaf

Examples of javax.swing.plaf.ActionMapUIResource


                grabFocus();
                model.setState(getNextState(model.getState()));
            }
        });
        // Reset the keyboard action map
        ActionMap map = new ActionMapUIResource();
        map.put("pressed", new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                grabFocus();
                model.setState(getNextState(model.getState()));
            }
        });
        map.put("released", null);
        SwingUtilities.replaceUIActionMap(this, map);
        // set the model to the adapted model
        model = new TristateDecorator(getModel());
        setModel(model);
        setState(initial);
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

            SwingUtilities.replaceUIActionMap(group, map);
        }
    }

    ActionMap getActionMap() {
        ActionMap map = new ActionMapUIResource();
        map.put("toggleCollapsed", new ToggleCollapsedAction());
        return map;
    }
View Full Code Here

      SwingUtilities.replaceUIActionMap(tipPane, map);
    }
  }

  ActionMap getActionMap() {
    ActionMap map = new ActionMapUIResource();
    map.put("previousTip", new PreviousTipAction());
    map.put("nextTip", new NextTipAction());
    return map;
  }
View Full Code Here

    grabFocus();
    getModel().nextState();
      }
  });
  // Reset the keyboard action map
  ActionMap map = new ActionMapUIResource();
  map.put("pressed", new AbstractAction() {
      public void actionPerformed(ActionEvent e) {
    grabFocus();
    getModel().nextState();
      }
  });
  map.put("released", null);
  SwingUtilities.replaceUIActionMap(this, map);
  setState(state);
    }
View Full Code Here

        }
    }

    private ActionMap getActionMap() {
        if (actionMap == null) {
            actionMap = new ActionMapUIResource();
            actionMap.put("restore", new OpenAction());           // ctrl F5
            actionMap.put("close", new CloseAction());            // ctrl F4
            actionMap.put("move", new BoundsChangeAction("move")); // ctrl F7
            actionMap.put("resize",
                          new BoundsChangeAction("resize"));      // ctrl F8
View Full Code Here

        }
    }

    private ActionMap getActionMap() {
        if (actionMap == null) {
            actionMap = new ActionMapUIResource();
            actionMap.put("restore", new OpenAction());           // ctrl F5
            actionMap.put("close", new CloseAction());            // ctrl F4
            actionMap.put("move", new BoundsChangeAction("move")); // ctrl F7
            actionMap.put("resize",
                          new BoundsChangeAction("resize"));      // ctrl F8
View Full Code Here

        menuKeyListener = null;
        mouseInputListener = null;
    }

    protected void installKeyboardActions() {
        ActionMap actionMap = new ActionMapUIResource();
        actionMap.put(StringConstants.MNEMONIC_ACTION, MNEMONIC_ACTION);
        actionMap.setParent(((BasicLookAndFeel)UIManager.getLookAndFeel()).getAudioActionMap());
        SwingUtilities.replaceUIActionMap(menuItem, actionMap);
    }
View Full Code Here

    protected void installKeyboardActions() {
        createInternalFrameListener();
        frame.addInternalFrameListener(internalFrameListener);

        ActionMapUIResource actionMap = new ActionMapUIResource();
        actionMap.put("showSystemMenu", new AbstractAction() {
            public void actionPerformed(final ActionEvent e) {
                if (titlePane != null) {
                    titlePane.showSystemMenu();
                }
            }
        });

        actionMap.setParent(((BasicLookAndFeel)UIManager.getLookAndFeel())
                            .getAudioActionMap());
        SwingUtilities.replaceUIActionMap(frame, actionMap);
    }
View Full Code Here

        super.installDefaults();
        LookAndFeel.installProperty(menuItem, "opaque", Boolean.FALSE);
    }

    protected void installKeyboardActions() {
        ActionMap actionMap = new ActionMapUIResource();
        actionMap.put(StringConstants.MNEMONIC_ACTION, MNEMONIC_ACTION);
        actionMap.setParent(((BasicLookAndFeel)UIManager.getLookAndFeel()).getAudioActionMap());
        SwingUtilities.replaceUIActionMap(menuItem, actionMap);
    }
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.