Example usage for javax.swing Action ACCELERATOR_KEY

List of usage examples for javax.swing Action ACCELERATOR_KEY

Introduction

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

Prototype

String ACCELERATOR_KEY

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

Click Source Link

Document

The key used for storing a KeyStroke to be used as the accelerator for the action.

Usage

From source file:org.pmedv.blackboard.commands.ConvertToSymbolCommand.java

public ConvertToSymbolCommand() {
    putValue(Action.NAME, resources.getResourceByKey("ConvertToSymbolCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.converttosymbol"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("ConvertToSymbolCommand.description"));
    putValue(Action.ACCELERATOR_KEY,
            KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));
    setEnabled(false);/*from ww  w.ja va 2s .  co m*/
}

From source file:org.pmedv.blackboard.commands.CreateBoardCommand.java

public CreateBoardCommand() {
    title = "untitled";
    putValue(Action.NAME, resources.getResourceByKey("CreateBoardCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.new"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("CreateBoardCommand.description"));
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK));
}

From source file:org.pmedv.blackboard.commands.CreatePartListCommand.java

public CreatePartListCommand() {
    putValue(Action.NAME, resources.getResourceByKey("CreatePartListCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.partlist"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("CreatePartListCommand.description"));
    putValue(Action.ACCELERATOR_KEY,
            KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.ALT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK));
    setEnabled(false);/*  w w w . j a v  a  2  s . c  o m*/
}

From source file:org.pmedv.blackboard.commands.DeleteCommand.java

public DeleteCommand() {
    putValue(Action.NAME, resources.getResourceByKey("DeleteCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.delete"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("DeleteCommand.description"));
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));
    setEnabled(false);/* w  w w . j a  v  a 2 s.  com*/
}

From source file:org.pmedv.blackboard.commands.ExportImageCommand.java

public ExportImageCommand() {
    putValue(Action.NAME, resources.getResourceByKey("ExportImageCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.export"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("ExportImageCommand.description"));
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_I, InputEvent.CTRL_DOWN_MASK));
    setEnabled(false);//from  w  w  w .ja  v  a2  s .  c o m
}

From source file:org.pmedv.blackboard.commands.MoveToLayerCommand.java

public MoveToLayerCommand() {
    putValue(Action.NAME, resources.getResourceByKey("MoveToLayerCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.movetolayer"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("MoveToLayerCommand.description"));
    putValue(Action.ACCELERATOR_KEY,
            KeyStroke.getKeyStroke(KeyEvent.VK_L, InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));
    setEnabled(false);/*from   ww  w  .  j a  v  a  2  s .  c om*/
}

From source file:org.pmedv.blackboard.commands.PasteCommand.java

public PasteCommand() {
    putValue(Action.NAME, resources.getResourceByKey("PasteCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.paste"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("PasteCommand.description"));
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK));
    setEnabled(false);//from   w ww  .j  av  a 2  s.c  om
}

From source file:org.pmedv.blackboard.commands.RedoCommand.java

public RedoCommand() {
    putValue(Action.NAME, resources.getResourceByKey("RedoCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.redo"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("RedoCommand.description"));
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Y, InputEvent.CTRL_DOWN_MASK));
    setEnabled(false);/*w  w w . j a v  a  2 s .co m*/
}

From source file:org.pmedv.blackboard.commands.RotateCCWCommand.java

public RotateCCWCommand() {
    putValue(Action.NAME, resources.getResourceByKey("RotateCCWCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.rotateccw"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("RotateCCWCommand.description"));
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_L, 0));
    setEnabled(false);//from  w w  w  .  ja va 2 s .  c  o  m
}

From source file:org.pmedv.blackboard.commands.RotateCWCommand.java

public RotateCWCommand() {
    putValue(Action.NAME, resources.getResourceByKey("RotateCWCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.rotatecw"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("RotateCWCommand.description"));
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_R, 0));
    setEnabled(false);//from w  ww .  j  a  v a 2s . co m
}