Example usage for javax.swing Action MNEMONIC_KEY

List of usage examples for javax.swing Action MNEMONIC_KEY

Introduction

In this page you can find the example usage for javax.swing Action MNEMONIC_KEY.

Prototype

String MNEMONIC_KEY

To view the source code for javax.swing Action MNEMONIC_KEY.

Click Source Link

Document

The key used for storing an Integer that corresponds to one of the KeyEvent key codes.

Usage

From source file:ro.nextreports.designer.action.datasource.DataSourceConnectAction.java

public DataSourceConnectAction(DBBrowserTree tree, TreePath selPath) {
    putValue(Action.NAME, I18NSupport.getString("connect"));
    putValue(Action.SMALL_ICON, ImageUtil.getImageIcon("database_connect"));
    putValue(Action.MNEMONIC_KEY, new Integer('C'));
    //        putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_C,
    //                KeyEvent.CTRL_DOWN_MASK));
    putValue(Action.SHORT_DESCRIPTION, I18NSupport.getString("connect.short.desc"));
    putValue(Action.LONG_DESCRIPTION, I18NSupport.getString("connect.long.desc"));
    this.tree = tree;
    this.selPath = selPath;
}

From source file:ro.nextreports.designer.action.tools.RestoreDockingAction.java

public RestoreDockingAction() {
    putValue(Action.NAME, I18NSupport.getString("restore.docking.action.name"));
    putValue(Action.SMALL_ICON, ImageUtil.getImageIcon("docking_restore"));
    putValue(Action.MNEMONIC_KEY, ShortcutsUtil.getMnemonic("layout.reset.mnemonic", new Integer('L')));
    putValue(Action.ACCELERATOR_KEY,
            KeyStroke.getKeyStroke(ShortcutsUtil.getShortcut("layout.reset.accelerator", "control L")));
    putValue(Action.SHORT_DESCRIPTION, I18NSupport.getString("restore.docking.action.name"));
    putValue(Action.LONG_DESCRIPTION, I18NSupport.getString("restore.docking.action.name"));
}

From source file:verdandi.ui.action.EditUsersAction.java

public EditUsersAction() {
    super(rb.getString("main.menu.edit.menuitem.users.name"));
    putValue(Action.MNEMONIC_KEY,
            new Integer(rb.getString("main.menu.edit.menuitem.users.mnemonic").charAt(0)));
    putValue(Action.ACTION_COMMAND_KEY, "CMD_EDIT_USERS");
    //initially disabled
    setEnabled(false);//from  ww  w  .  j a v  a2 s  . co  m
}