List of usage examples for javax.swing Action LONG_DESCRIPTION
String LONG_DESCRIPTION
To view the source code for javax.swing Action LONG_DESCRIPTION.
Click Source Link
String
description for the action, could be used for context-sensitive help. From source file:Main.java
public static void main(String[] argv) throws Exception { final Action action = new AbstractAction("Action Name") { {/*from w w w. j a va 2s .c o m*/ putValue(Action.SHORT_DESCRIPTION, "Tool Tip Text"); putValue(Action.LONG_DESCRIPTION, "Help Text"); Icon icon = new ImageIcon("icon.gif"); putValue(Action.SMALL_ICON, icon); putValue(Action.MNEMONIC_KEY, new Integer(java.awt.event.KeyEvent.VK_A)); putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke("control F2")); } public void actionPerformed(ActionEvent evt) { System.out.println("action"); } }; JButton button = new JButton(action); }
From source file:Main.java
public ShowAction() { super("About"); putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_A)); putValue(Action.NAME, "Go to number "); putValue(Action.LONG_DESCRIPTION, "Change the number to "); super.setEnabled(false); System.out.println(super.isEnabled()); }
From source file:Main.java
public ShowAction() { super("About"); putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_A)); putValue(Action.NAME, "Go to number "); putValue(Action.LONG_DESCRIPTION, "Change the number to "); System.out.println(super.getValue(Action.NAME)); }
From source file:Main.java
public ShowAction() { super("About"); PropertyChangeListener lis = new PropertyChangeListener() { @Override/*w w w . j ava 2 s. c o m*/ public void propertyChange(PropertyChangeEvent e) { System.out.println(e); } }; addPropertyChangeListener(lis); putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_A)); putValue(Action.NAME, "Go to number "); putValue(Action.LONG_DESCRIPTION, "Change the number to "); removePropertyChangeListener(lis); }
From source file:ca.sfu.federation.action.ShowWebSiteAction.java
public ShowWebSiteAction() { super("Project Web Site", null); this.putValue(Action.LONG_DESCRIPTION, "Project Web Site"); this.putValue(Action.SHORT_DESCRIPTION, "Project Web Site"); }
From source file:ca.sfu.federation.action.ShowHelpWebSiteAction.java
public ShowHelpWebSiteAction() { super("Online Help Documents", null); this.putValue(Action.LONG_DESCRIPTION, "Online Help Documents"); this.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_H); this.putValue(Action.SHORT_DESCRIPTION, "Online Help Documents"); }
From source file:ca.sfu.federation.action.CreateScenarioAction.java
public CreateScenarioAction() { super("Create Scenario", null); Icon icon = ImageIconUtils.loadIconById("model-create-scenario"); this.putValue(Action.LONG_DESCRIPTION, "Create Scenario"); this.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_S); this.putValue(Action.SHORT_DESCRIPTION, "Create Scenario"); this.putValue(Action.SMALL_ICON, icon); }
From source file:ca.sfu.federation.action.CreateAssemblyAction.java
public CreateAssemblyAction() { super("Create Assembly", null); Icon icon = ImageIconUtils.loadIconById("model-create-assembly"); this.putValue(Action.LONG_DESCRIPTION, "Create Assembly"); this.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_A); this.putValue(Action.SHORT_DESCRIPTION, "Create Assembly"); this.putValue(Action.SMALL_ICON, icon); }
From source file:ca.sfu.federation.action.CreateComponentAction.java
public CreateComponentAction() { super("Create Componnet", null); Icon icon = ImageIconUtils.loadIconById("model-create-component"); this.putValue(Action.LONG_DESCRIPTION, "Create Component"); this.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_C); this.putValue(Action.SHORT_DESCRIPTION, "Create Component"); this.putValue(Action.SMALL_ICON, icon); }
From source file:com.sshtools.common.ui.NewWindowAction.java
/** * Creates a new NewWindowAction object. * * @param application//from ww w. j ava2s. c o m */ public NewWindowAction(SshToolsApplication application) { this.application = application; putValue(Action.NAME, "New Window"); putValue(Action.SMALL_ICON, getIcon("/com/sshtools/common/ui/newwindow.png")); putValue(LARGE_ICON, getIcon("/com/sshtools/common/ui/largenewwindow.png")); putValue(Action.SHORT_DESCRIPTION, "Create new window"); putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.ALT_MASK)); putValue(Action.LONG_DESCRIPTION, "Create a new SSHTerm window"); putValue(Action.MNEMONIC_KEY, new Integer('w')); putValue(Action.ACTION_COMMAND_KEY, "new-window"); putValue(StandardAction.ON_MENUBAR, new Boolean(true)); putValue(StandardAction.MENU_NAME, "File"); putValue(StandardAction.MENU_ITEM_GROUP, new Integer(0)); putValue(StandardAction.MENU_ITEM_WEIGHT, new Integer(90)); putValue(StandardAction.ON_TOOLBAR, new Boolean(true)); putValue(StandardAction.TOOLBAR_GROUP, new Integer(0)); putValue(StandardAction.TOOLBAR_WEIGHT, new Integer(90)); }