List of usage examples for javax.swing Action SHORT_DESCRIPTION
String SHORT_DESCRIPTION
To view the source code for javax.swing Action SHORT_DESCRIPTION.
Click Source Link
String
description for the action, used for tooltip text. From source file:org.pmedv.blackboard.commands.AddDiodeCommand.java
public AddDiodeCommand() { putValue(Action.NAME, resources.getResourceByKey("AddDiodeCommand.name")); putValue(Action.SMALL_ICON, resources.getIcon("icon.diode")); putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("AddDiodeCommand.description")); putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_DOWN_MASK)); setEnabled(false);//ww w.ja va 2s .c o m }
From source file:ToolBarTest.java
public ToolBarFrame() { setTitle("ToolBarTest"); setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); // add a panel for color change panel = new JPanel(); add(panel, BorderLayout.CENTER); // set up actions Action blueAction = new ColorAction("Blue", new ImageIcon("blue-ball.gif"), Color.BLUE); Action yellowAction = new ColorAction("Yellow", new ImageIcon("yellow-ball.gif"), Color.YELLOW); Action redAction = new ColorAction("Red", new ImageIcon("red-ball.gif"), Color.RED); Action exitAction = new AbstractAction("Exit", new ImageIcon("exit.gif")) { public void actionPerformed(ActionEvent event) { System.exit(0);// w w w .ja va 2 s . c om } }; exitAction.putValue(Action.SHORT_DESCRIPTION, "Exit"); // populate tool bar JToolBar bar = new JToolBar(); bar.add(blueAction); bar.add(yellowAction); bar.add(redAction); bar.addSeparator(); bar.add(exitAction); add(bar, BorderLayout.NORTH); // populate menu JMenu menu = new JMenu("Color"); menu.add(yellowAction); menu.add(blueAction); menu.add(redAction); menu.add(exitAction); JMenuBar menuBar = new JMenuBar(); menuBar.add(menu); setJMenuBar(menuBar); }
From source file:org.pdfsam.guiclient.commons.business.actions.SetOutputPathSelectionTableAction.java
/** * @param selectionPanel/* w w w . ja v a 2 s . c om*/ * @param destinationField * the JTextField to update * @param defaultOutputFileName * the output file name. If null it's ignored. */ public SetOutputPathSelectionTableAction(JPdfSelectionPanel selectionPanel, JTextField destinationField, String defaultOutputFileName) { super(GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(), "Set destination")); this.setEnabled(true); this.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.ALT_DOWN_MASK)); this.putValue(Action.SHORT_DESCRIPTION, GettextResource .gettext(Configuration.getInstance().getI18nResourceBundle(), "Set the destination path")); this.putValue(Action.SMALL_ICON, new ImageIcon(this.getClass().getResource("/images/set_outfile.png"))); this.selectionPanel = selectionPanel; this.destinationField = destinationField; this.defaultOutputFileName = defaultOutputFileName; }
From source file:pl.otros.logview.gui.actions.ConnectToSocketHubAppenderAction.java
public ConnectToSocketHubAppenderAction(OtrosApplication otrosApplication) { super(otrosApplication); putValue(Action.NAME, "Connect to Log4j socket hub"); putValue(Action.SHORT_DESCRIPTION, "Connect to Log4j SocketHubAppender"); putValue(Action.LONG_DESCRIPTION, "Connect to Log4j SocketHubAppender"); putValue(SMALL_ICON, Icons.PLUGIN_CONNECT); }
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);// www.j a v a 2s .c om }
From source file:com.sshtools.sshterm.FullScreenAction.java
public FullScreenAction(SshToolsApplication application, SshToolsApplicationContainer container) { this.application = application; this.container = container; putValue(Action.NAME, NAME_FULL_SCREEN); putValue(Action.SMALL_ICON, getIcon(SMALL_ICON_FULL_SCREEN)); putValue(LARGE_ICON, getIcon(LARGE_ICON_FULL_SCREEN)); putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.ALT_MASK)); putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION_FULL_SCREEN); putValue(Action.LONG_DESCRIPTION, LONG_DESCRIPTION_FULL_SCREEN); putValue(Action.MNEMONIC_KEY, new Integer(MNEMONIC_KEY_FULL_SCREEN)); putValue(Action.ACTION_COMMAND_KEY, ACTION_COMMAND_KEY_FULL_SCREEN); putValue(StandardAction.ON_MENUBAR, new Boolean(true)); putValue(StandardAction.MENU_NAME, "View"); putValue(StandardAction.MENU_ITEM_GROUP, new Integer(20)); putValue(StandardAction.MENU_ITEM_WEIGHT, new Integer(20)); putValue(StandardAction.ON_TOOLBAR, new Boolean(true)); putValue(StandardAction.TOOLBAR_GROUP, new Integer(5)); putValue(StandardAction.TOOLBAR_WEIGHT, new Integer(30)); }
From source file:com.sshtools.powervnc.VncFullScreenAction.java
public VncFullScreenAction(SshToolsApplication application, SshToolsApplicationContainer container) { this.application = application; this.container = container; putValue(Action.NAME, NAME_FULL_SCREEN); putValue(Action.SMALL_ICON, getIcon(SMALL_ICON_FULL_SCREEN)); putValue(LARGE_ICON, getIcon(LARGE_ICON_FULL_SCREEN)); putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.ALT_MASK)); putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION_FULL_SCREEN); putValue(Action.LONG_DESCRIPTION, LONG_DESCRIPTION_FULL_SCREEN); putValue(Action.MNEMONIC_KEY, new Integer(MNEMONIC_KEY_FULL_SCREEN)); putValue(Action.ACTION_COMMAND_KEY, ACTION_COMMAND_KEY_FULL_SCREEN); putValue(StandardAction.ON_MENUBAR, new Boolean(true)); putValue(StandardAction.MENU_NAME, "View"); putValue(StandardAction.MENU_ITEM_GROUP, new Integer(20)); putValue(StandardAction.MENU_ITEM_WEIGHT, new Integer(20)); putValue(StandardAction.ON_TOOLBAR, new Boolean(true)); putValue(StandardAction.TOOLBAR_GROUP, new Integer(5)); putValue(StandardAction.TOOLBAR_WEIGHT, new Integer(30)); }
From source file:com.stefanbrenner.droplet.ui.actions.OpenFileAction.java
protected OpenFileAction(final JFrame frame, final JFileChooser fileChooser, final IDropletContext dropletContext, final String title) { super(frame, dropletContext, title); this.fileChooser = fileChooser; putValue(Action.ACCELERATOR_KEY, UiUtils.getAccelerator(KeyEvent.VK_O)); putValue(Action.MNEMONIC_KEY, UiUtils.getMnemonic(Messages.getString("OpenFileAction.mnemonic"))); //$NON-NLS-1$ putValue(Action.SHORT_DESCRIPTION, Messages.getString("OpenFileAction.description")); //$NON-NLS-1$ }
From source file:org.pdfsam.plugin.merge.actions.SaveListAsXmlAction.java
/** * @param selectionPanel/*www .jav a 2 s. c om*/ */ public SaveListAsXmlAction(JPdfSelectionPanel selectionPanel) { super(GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(), "Export as xml")); this.setEnabled(true); this.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.ALT_DOWN_MASK)); this.putValue(Action.SHORT_DESCRIPTION, GettextResource.gettext( Configuration.getInstance().getI18nResourceBundle(), "Export the selection list in xml format")); this.putValue(Action.SMALL_ICON, new ImageIcon(this.getClass().getResource("/images/saveXml.png"))); this.selectionPanel = selectionPanel; }
From source file:org.pentaho.reporting.engine.classic.core.modules.gui.base.actions.ExportAction.java
/** * Defines an <code>Action</code> object with a default description string and default icon. *///from w w w.j av a 2s .com public ExportAction(final ExportActionPlugin actionPlugin, final PreviewPane previewPane) { if (actionPlugin == null) { throw new NullPointerException(); } if (previewPane == null) { throw new NullPointerException(); } this.actionPlugin = actionPlugin; this.previewPane = previewPane; putValue(Action.NAME, actionPlugin.getDisplayName()); putValue(Action.SHORT_DESCRIPTION, actionPlugin.getShortDescription()); putValue(Action.ACCELERATOR_KEY, actionPlugin.getAcceleratorKey()); putValue(Action.MNEMONIC_KEY, actionPlugin.getMnemonicKey()); putValue(Action.SMALL_ICON, actionPlugin.getSmallIcon()); putValue(SwingCommonModule.LARGE_ICON_PROPERTY, actionPlugin.getLargeIcon()); this.actionPlugin.addPropertyChangeListener("enabled", new EnableChangeListener()); //$NON-NLS-1$ setEnabled(actionPlugin.isEnabled()); }