|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.gui.FocusActionAdapter
An adapter class for receiving focus events, and performing actions in response to those events.
| Field Summary | |
protected ActionSequence |
gainedActions
List of action listeners to be performed upon the notification of focus gained events. |
protected ActionSequence |
lostActions
List of action listeners to be performed upon the notification of focus lost events. |
| Constructor Summary | |
FocusActionAdapter()
Constructs a focus action adapter. |
|
FocusActionAdapter(Component target)
Constructs a focus action adapter listening for focus events generated by the given component. |
|
| Method Summary | |
void |
addFocusGainedAction(ActionListener a)
Adds an action listener to this adapter so that it will be performed when the focus is gained. |
void |
addFocusLostAction(ActionListener a)
Adds an action listener to this adapter so that it will be performed when the focus is lost. |
void |
focusGained(FocusEvent evt)
Performs the stored action sequence when the focus has been gained. |
void |
focusLost(FocusEvent evt)
Performs the stored action sequence when the focus has been lost. |
ActionSequence |
getFocusGainedActions()
Returns the action sequence for focus gained events. |
ActionSequence |
getFocusLostActions()
Returns the action sequence for focus lost events. |
void |
removeFocusGainedAction(ActionListener a)
Removes the given action listener from this adapter so that it will be no longer be performed when the focus is gained. |
void |
removeFocusLostAction(ActionListener a)
Removes the given action listener from this adapter so that it will be no longer be performed when the focus is lost. |
void |
setFocusGainedActions(ActionSequence sequence)
Sets the action sequence for focus gained events to the provided action sequence. |
void |
setFocusLostActions(ActionSequence sequence)
Sets the action sequence for focus lost events to the provided action sequence. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ActionSequence gainedActions
protected ActionSequence lostActions
| Constructor Detail |
public FocusActionAdapter()
public FocusActionAdapter(Component target)
null, this adapter does not listen
to a particular component by default.
target - the component that is listened to| Method Detail |
public final void focusGained(FocusEvent evt)
focusGained in interface FocusListenerevt - the focus gained event to be handledpublic final void focusLost(FocusEvent evt)
focusLost in interface FocusListenerevt - the focus lost event to be handledpublic void addFocusGainedAction(ActionListener a)
a - the action listener to be performedremoveFocusGainedAction(ActionListener),
setFocusGainedActions(ActionSequence),
getFocusGainedActions()public void addFocusLostAction(ActionListener a)
a - the action listener to be performedremoveFocusLostAction(ActionListener),
setFocusLostActions(ActionSequence),
getFocusLostActions()public void removeFocusGainedAction(ActionListener a)
a - the action listener to be removedaddFocusGainedAction(ActionListener),
setFocusGainedActions(ActionSequence),
getFocusGainedActions()public void removeFocusLostAction(ActionListener a)
a - the action listener to be removedaddFocusLostAction(ActionListener),
setFocusLostActions(ActionSequence),
getFocusLostActions()public void setFocusGainedActions(ActionSequence sequence)
null, the action sequence
for focus gained events is cleared.
sequence - the desired action sequencegetFocusGainedActions(),
addFocusGainedAction(ActionListener),
removeFocusGainedAction(ActionListener)public void setFocusLostActions(ActionSequence sequence)
null, the action sequence
for focus lost events is cleared.
sequence - the desired action sequencegetFocusLostActions(),
addFocusLostAction(ActionListener),
removeFocusLostAction(ActionListener)public ActionSequence getFocusGainedActions()
setFocusGainedActions(ActionSequence),
addFocusGainedAction(ActionListener),
removeFocusGainedAction(ActionListener)public ActionSequence getFocusLostActions()
setFocusLostActions(ActionSequence),
addFocusLostAction(ActionListener),
removeFocusLostAction(ActionListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||