List of usage examples for javax.swing Action NAME
String NAME
To view the source code for javax.swing Action NAME.
Click Source Link
String
name for the action, used for a menu or button. From source file:org.pmedv.blackboard.commands.DeletePartCommand.java
public DeletePartCommand() { putValue(Action.NAME, resources.getResourceByKey("DeletePartCommand.name")); putValue(Action.SMALL_ICON, resources.getIcon("icon.delete")); putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("DeletePartCommand.description")); }
From source file:MainClass.java
public MainClass() { JFrame frame = new JFrame(); textPane = new JTextPane(); JScrollPane scrollPane = new JScrollPane(textPane); JPanel north = new JPanel(); JButton print = new JButton("Print"); print.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { paintToPDF(textPane);/*from www . java2 s.c om*/ } }); JMenuBar menu = new JMenuBar(); JMenu styleMenu = new JMenu(); styleMenu.setText("Style"); Action boldAction = new BoldAction(); boldAction.putValue(Action.NAME, "Bold"); styleMenu.add(boldAction); Action italicAction = new ItalicAction(); italicAction.putValue(Action.NAME, "Italic"); styleMenu.add(italicAction); menu.add(styleMenu); north.add(menu); north.add(print); frame.getContentPane().setLayout(new BorderLayout()); frame.getContentPane().add(north, BorderLayout.NORTH); frame.getContentPane().add(scrollPane, BorderLayout.CENTER); frame.setSize(800, 500); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); }
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);/*from w ww . ja va2 s . com*/ }
From source file:org.pmedv.blackboard.commands.UndoCommand.java
public UndoCommand() { putValue(Action.NAME, resources.getResourceByKey("UndoCommand.name")); putValue(Action.SMALL_ICON, resources.getIcon("icon.undo")); putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("UndoCommand.description")); putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Z, InputEvent.CTRL_DOWN_MASK)); setEnabled(false);/* www.j av a 2 s . co m*/ }
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);// w ww . j a v a 2 s. c o m }
From source file:org.pmedv.core.commands.OpenPerspectiveCommand.java
public OpenPerspectiveCommand(String id) { this.id = id; putValue(Action.NAME, id); putValue(Action.SHORT_DESCRIPTION, "Opens the " + id + " perspective."); }
From source file:net.sf.jabref.gui.help.HelpAction.java
private HelpAction(String title, String tooltip, HelpFile helpPage, Icon icon) { super(icon);// ww w.j a v a 2s .co m this.helpPage = helpPage; putValue(Action.NAME, title); putValue(Action.SHORT_DESCRIPTION, tooltip); }
From source file:org.pentaho.reporting.engine.classic.core.designtime.datafactory.editor.ui.ScriptTemplateAction.java
protected ScriptTemplateAction(final boolean global) { this.global = global; putValue(Action.NAME, Messages.getString("QueryEditorPanel.InsertTemplate")); setEnabled(false);// ww w. j a v a 2 s. c o 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);//ww w. j av a 2s . co m }
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; }