|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.princeton.swing.ClipboardTargetManager
public class ClipboardTargetManager
ClipboardTargetManager is kept informed of all
Nested Class Summary | |
---|---|
protected static class |
ClipboardTargetManager.CopyAction
CopyAction is an action which calls the copy() method of the ClipboardTargetManager. |
protected static class |
ClipboardTargetManager.CutAction
CutAction is an action which calls the cut() method of the ClipboardTargetManager. |
protected static class |
ClipboardTargetManager.PasteAction
PasteAction is an action which calls the paste() method of the ClipboardTargetManager. |
protected static class |
ClipboardTargetManager.SelectAllAction
SelectAllAction is an action which calls the selectAll() method of the ClipboardTargetManager. |
Field Summary | |
---|---|
static AbstractAction2 |
COPY_ACTION
An implementation of Action to use for the copy operation. |
static Icon |
COPY_ICON
The copy icon. |
static byte[] |
COPY_ICON_BYTES
The bytes for the copy icon. |
static KeyStroke |
COPY_KEYSTROKE
The keystroke generally associated with the copy action. |
static AbstractAction2 |
CUT_ACTION
An implementation of Action to use for the cut operation. |
static Icon |
CUT_ICON
The cut icon. |
static byte[] |
CUT_ICON_BYTES
The bytes for the cut icon. |
static KeyStroke |
CUT_KEYSTROKE
The keystroke generally associated with the cut action. |
static AbstractAction2 |
PASTE_ACTION
An implementation of Action to use for the paste operation. |
static Icon |
PASTE_ICON
The paste icon. |
static byte[] |
PASTE_ICON_BYTES
The bytes for the paste icon. |
static KeyStroke |
PASTE_KEYSTROKE
The keystroke generally associated with the paste action. |
static AbstractAction2 |
SELECT_ALL_ACTION
An implementation of Action to use for the selectAll operation. |
static Icon |
SELECT_ALL_ICON
The paste icon. |
static byte[] |
SELECT_ALL_ICON_BYTES
The bytes for the select all icon. |
static KeyStroke |
SELECT_ALL_KEYSTROKE
The keystroke generally associated with the select all action. |
Method Summary | |
---|---|
static void |
copy()
Executes the copy() method of the ClipboardTarget which most recently owned the focus. |
static 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(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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte[] CUT_ICON_BYTES
public static final Icon CUT_ICON
public static final byte[] COPY_ICON_BYTES
public static final Icon COPY_ICON
public static final byte[] PASTE_ICON_BYTES
public static final Icon PASTE_ICON
public static final byte[] SELECT_ALL_ICON_BYTES
public static final Icon SELECT_ALL_ICON
public static final KeyStroke CUT_KEYSTROKE
public static final KeyStroke COPY_KEYSTROKE
public static final KeyStroke PASTE_KEYSTROKE
public static final 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
Method Detail |
---|
public static void installMappings(JComponent component)
component
- The component for which we should install the mappings. A
NullPointerException will be thrown if this is null.public static 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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |