1 36 37 import javax.swing.Action ; 38 39 43 public class PasteAction extends JLFAbstractAction { 44 45 private static final String ACTION_COMMAND_KEY_PASTE = "paste-command"; 46 private static final String NAME_PASTE = "Paste"; 47 private static final String SMALL_ICON_PASTE = "Paste16.gif"; 48 private static final String LARGE_ICON_PASTE = "Paste24.gif"; 49 private static final String SHORT_DESCRIPTION_PASTE = "Paste"; 50 private static final String LONG_DESCRIPTION_PASTE = "Insert an object or data previously selected via \"Copy\" or \"Cut\""; 51 private static final int MNEMONIC_KEY_PASTE = 'P'; 52 53 56 public PasteAction() { 57 putValue(Action.NAME, NAME_PASTE); 58 putValue(Action.SMALL_ICON, getIcon(SMALL_ICON_PASTE)); 59 putValue(LARGE_ICON, getIcon(LARGE_ICON_PASTE)); 60 putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION_PASTE); 61 putValue(Action.LONG_DESCRIPTION, LONG_DESCRIPTION_PASTE); 62 putValue(Action.MNEMONIC_KEY, new Integer (MNEMONIC_KEY_PASTE)); 63 putValue(Action.ACTION_COMMAND_KEY, ACTION_COMMAND_KEY_PASTE); 64 } 65 } 66 | Popular Tags |