edu.princeton.swing
public class ClipboardTargetManager extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | ClipboardTargetManager.CopyActionCopyAction is an action which calls the copy() method of the ClipboardTargetManager. | 
| protected static class  | ClipboardTargetManager.CutActionCutAction is an action which calls the cut() method of the ClipboardTargetManager. | 
| protected static class  | ClipboardTargetManager.PasteActionPasteAction is an action which calls the paste() method of the ClipboardTargetManager. | 
| protected static class  | ClipboardTargetManager.SelectAllActionSelectAllAction is an action which calls the selectAll() method of the
 ClipboardTargetManager. | 
| Modifier and Type | Field and Description | 
|---|---|
| static AbstractAction2 | COPY_ACTIONAn implementation of Action to use for the copy operation. | 
| static javax.swing.Icon | COPY_ICONThe copy icon. | 
| static byte[] | COPY_ICON_BYTESThe bytes for the copy icon. | 
| static javax.swing.KeyStroke | COPY_KEYSTROKEThe keystroke generally associated with the copy action. | 
| static AbstractAction2 | CUT_ACTIONAn implementation of Action to use for the cut operation. | 
| static javax.swing.Icon | CUT_ICONThe cut icon. | 
| static byte[] | CUT_ICON_BYTESThe bytes for the cut icon. | 
| static javax.swing.KeyStroke | CUT_KEYSTROKEThe keystroke generally associated with the cut action. | 
| static AbstractAction2 | PASTE_ACTIONAn implementation of Action to use for the paste operation. | 
| static javax.swing.Icon | PASTE_ICONThe paste icon. | 
| static byte[] | PASTE_ICON_BYTESThe bytes for the paste icon. | 
| static javax.swing.KeyStroke | PASTE_KEYSTROKEThe keystroke generally associated with the paste action. | 
| static AbstractAction2 | SELECT_ALL_ACTIONAn implementation of Action to use for the selectAll operation. | 
| static javax.swing.Icon | SELECT_ALL_ICONThe paste icon. | 
| static byte[] | SELECT_ALL_ICON_BYTESThe bytes for the select all icon. | 
| static javax.swing.KeyStroke | SELECT_ALL_KEYSTROKEThe keystroke generally associated with the select all action. | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | copy()Executes the copy() method of the ClipboardTarget which most recently owned the focus. | 
| static javax.swing.JPopupMenu | createDefaultPopupMenu()Creates a basic JPopupMenu which contains MenuItems for all the clipboard actions. | 
| static void | cut()Executes the cut() method of the ClipboardTarget which most recently owned the focus. | 
| static ClipboardTarget | getRecentTarget()Returns the ClipboardTarget which most recently owned the focus. | 
| static void | installMappings(javax.swing.JComponent component)Installs the InputMap and ActionMap mappings necessary to get the JComponent to behave
 correctly when the keyboard trigger for a clipboard action is fired. | 
| static void | paste()Executes the paste() method of the ClipboardTarget which most recently owned the focus. | 
| static void | selectAll()Executes the selectAll() method of the ClipboardTarget which most recently owned the focus. | 
| static void | targetAbilityChanged(ClipboardTarget target)The function by which a ClipboardTarget registers itself with the Manager when its canX()
 method changes. | 
| static void | targetGainedFocus(ClipboardTarget target)The function by which a ClipboardTarget registers itself with the Manager when it gains the
 focus. | 
| static void | targetLostFocus(ClipboardTarget target)The function by which a ClipboardTarget unregisters itself with the Manager when it loses the
 focus. | 
public static final byte[] CUT_ICON_BYTES
public static final javax.swing.Icon CUT_ICON
public static final byte[] COPY_ICON_BYTES
public static final javax.swing.Icon COPY_ICON
public static final byte[] PASTE_ICON_BYTES
public static final javax.swing.Icon PASTE_ICON
public static final byte[] SELECT_ALL_ICON_BYTES
public static final javax.swing.Icon SELECT_ALL_ICON
public static final javax.swing.KeyStroke CUT_KEYSTROKE
public static final javax.swing.KeyStroke COPY_KEYSTROKE
public static final javax.swing.KeyStroke PASTE_KEYSTROKE
public static final javax.swing.KeyStroke SELECT_ALL_KEYSTROKE
public static final AbstractAction2 CUT_ACTION
public static final AbstractAction2 COPY_ACTION
public static final AbstractAction2 PASTE_ACTION
public static final AbstractAction2 SELECT_ALL_ACTION
public static void installMappings(javax.swing.JComponent component)
component - The component for which we should install the mappings.  A
 NullPointerException will be thrown if this is null.public static javax.swing.JPopupMenu createDefaultPopupMenu()
public static void targetGainedFocus(ClipboardTarget target)
target - The ClipboardTarget which just gained the focus.public static void targetLostFocus(ClipboardTarget target)
target - The ClipboardTarget which just lost the focus.public static void targetAbilityChanged(ClipboardTarget target)
target - The ClipboardTarget which just lost the focus.public static ClipboardTarget getRecentTarget()
public static void cut()
public static void copy()
public static void paste()
public static void selectAll()