1 36 37 import javax.swing.Action ; 38 39 43 public class CutAction extends JLFAbstractAction { 44 45 private static final String ACTION_COMMAND_KEY_CUT = "cut-command"; 46 private static final String NAME_CUT = "Cut"; 47 private static final String SMALL_ICON_CUT = "Cut16.gif"; 48 private static final String LARGE_ICON_CUT = "Cut24.gif"; 49 private static final String SHORT_DESCRIPTION_CUT = "Cut"; 50 private static final String LONG_DESCRIPTION_CUT = "Remove the selected item from its current context. It is now available to be pasted elsewhere."; 51 private static final int MNEMONIC_KEY_CUT = 'T'; 52 53 56 public CutAction() { 57 putValue(Action.NAME, NAME_CUT); 58 putValue(Action.SMALL_ICON, getIcon(SMALL_ICON_CUT)); 59 putValue(LARGE_ICON, getIcon(LARGE_ICON_CUT)); 60 putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION_CUT); 61 putValue(Action.LONG_DESCRIPTION, LONG_DESCRIPTION_CUT); 62 putValue(Action.MNEMONIC_KEY, new Integer (MNEMONIC_KEY_CUT)); 63 putValue(Action.ACTION_COMMAND_KEY, ACTION_COMMAND_KEY_CUT); 64 } 65 } 66 | Popular Tags |