Example usage for javax.swing Action SHORT_DESCRIPTION

List of usage examples for javax.swing Action SHORT_DESCRIPTION

Introduction

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

Prototype

String SHORT_DESCRIPTION

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

Click Source Link

Document

The key used for storing a short String description for the action, used for tooltip text.

Usage

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);//w w w  . ja v a2s.  c  om
}

From source file:com.stefanbrenner.droplet.ui.actions.SaveFileAction.java

public SaveFileAction(final JFrame frame, final JFileChooser fileChooser,
        final IDropletContext dropletContext) {
    this(Messages.getString("SaveFileAction.title"), frame, fileChooser, dropletContext); //$NON-NLS-1$

    putValue(Action.ACCELERATOR_KEY, UiUtils.getAccelerator(KeyEvent.VK_S));
    putValue(Action.MNEMONIC_KEY, UiUtils.getMnemonic(Messages.getString("SaveFileAction.mnemonic"))); //$NON-NLS-1$
    putValue(Action.SHORT_DESCRIPTION, Messages.getString("SaveFileAction.description")); //$NON-NLS-1$
}

From source file:pl.otros.logview.gui.actions.TailMultipleFilesIntoOneView.java

public TailMultipleFilesIntoOneView(OtrosApplication otrosApplication) {
    super(otrosApplication);
    putValue(Action.NAME, "Tail multiple log files into one view");
    putValue(Action.SHORT_DESCRIPTION, "Tail multiple log files into one view with log format autodetection");
    putValue(Action.SMALL_ICON, Icons.ARROW_JOIN);
}

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);//  ww  w . j  av a  2 s.c  o  m
}

From source file:ro.nextreports.designer.action.report.ViewReportSqlAction.java

public ViewReportSqlAction() {
    putValue(Action.NAME, I18NSupport.getString("view.sql"));
    putValue(Action.SMALL_ICON, ImageUtil.getImageIcon("report_view"));
    putValue(Action.SHORT_DESCRIPTION, I18NSupport.getString("view.sql"));
    putValue(Action.LONG_DESCRIPTION, I18NSupport.getString("view.sql"));
}

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  w w  w . j  a  v a 2 s .  co  m
}

From source file:ca.sfu.federation.action.CreateProjectAction.java

/**
 * CreateProjectAction default constructor.
 *//*w ww .j  av  a  2  s  . c  om*/
public CreateProjectAction() {
    super("New Project", null);
    Icon icon = ImageIconUtils.loadIconById("file-new-project-icon");
    this.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke("control shift N"));
    this.putValue(Action.LONG_DESCRIPTION, "Create a new project");
    this.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_N);
    this.putValue(Action.SHORT_DESCRIPTION, "Create a new project");
    this.putValue(Action.SMALL_ICON, icon);
}

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:org.pmedv.blackboard.commands.AddResistorCommand.java

public AddResistorCommand() {
    putValue(Action.NAME, resources.getResourceByKey("AddResistorCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.resistor"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("AddResistorCommand.description"));
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_R, InputEvent.CTRL_DOWN_MASK));
    setEnabled(false);//w  w w .j av a2s.c o  m
}

From source file:eu.ggnet.dwoss.redtape.action.StateTransitionAction.java

public StateTransitionAction(Window parent, RedTapeController controller, CustomerDocument cdoc,
        StateTransition<CustomerDocument> transition) {
    this.parent = parent;
    this.cdoc = cdoc;
    this.transition = transition;
    this.controller = controller;
    putValue(Action.NAME, transition.getDescription());
    putValue(Action.SHORT_DESCRIPTION, transition.getToolTip());
    if (((RedTapeStateTransition) transition).getHints()
            .contains(RedTapeStateTransition.Hint.CHANGES_PAYMENT_METHOD_TO_DIRECT_DEBIT)
            && cdoc.getPaymentMethod() != PaymentMethod.DIRECT_DEBIT) {
        this.setEnabled(false);
    }/*w  w w .  j  a  va 2 s.  co m*/
    if (((RedTapeStateTransition) transition).getHints()
            .contains(RedTapeStateTransition.Hint.CHANGES_PAYMENT_METHOD_TO_INVOICE)
            && cdoc.getPaymentMethod() != PaymentMethod.INVOICE) {
        this.setEnabled(false);
    }
}