|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.gui.ComponentActionAdapter
An adapter class for receiving component events and performing actions in response to those events.
| Field Summary | |
protected ActionSequence |
hiddenActions
List of action listeners to be performed upon the notification of component hidden events. |
protected ActionSequence |
movedActions
List of action listeners to be performed upon the notification of component moved events. |
protected ActionSequence |
resizedActions
List of action listeners to be performed upon the notification of component resized events. |
protected ActionSequence |
shownActions
List of action listeners to be performed upon the notification of component shown events. |
| Constructor Summary | |
ComponentActionAdapter()
Constructs a component action adapter. |
|
ComponentActionAdapter(Component target)
Constructs a component action adapter listening for component events generated by the given component. |
|
| Method Summary | |
void |
addComponentHiddenAction(ActionListener a)
Adds the given action listener to the action sequence so that it will be performed when the component is hidden. |
void |
addComponentMovedAction(ActionListener a)
Adds the given action listener to the action sequence so that it will be performed when the component is moved. |
void |
addComponentResizedAction(ActionListener a)
Adds the given action listener to the action sequence so that it will be performed when the component is resized. |
void |
addComponentShownAction(ActionListener a)
Adds the given action listener to the action sequence so that it will be performed when the component is shown. |
void |
componentHidden(ComponentEvent evt)
Performs the stored action listener sequence when the component is hidden. |
void |
componentMoved(ComponentEvent evt)
Performs the stored action listener sequence when the component enters the component. |
void |
componentResized(ComponentEvent evt)
Performs the stored action listener sequence when the component exits the component. |
void |
componentShown(ComponentEvent evt)
Performs the stored action listener sequence when a component button is shown. |
ActionSequence |
getComponentHiddenActions()
Returns the action sequence for component hidden events. |
ActionSequence |
getComponentMovedActions()
Returns the action sequence for component moved events. |
ActionSequence |
getComponentResizedActions()
Returns the action sequence for component resized events. |
ActionSequence |
getComponentShownActions()
Returns the action sequence for component shown events. |
void |
removeComponentHiddenAction(ActionListener a)
Removes the given action listener from this adapter so that it will be no longer be performed when the component is hidden. |
void |
removeComponentMovedAction(ActionListener a)
Removes the given action listener from this adapter so that it will be no longer be performed when the component is moved. |
void |
removeComponentResizedAction(ActionListener a)
Removes the given action listener from this adapter so that it will be no longer be performed when the component is resized. |
void |
removeComponentShownAction(ActionListener a)
Removes the given action listener from this adapter so that it will be no longer be performed when the component is shown. |
void |
setComponentHiddenActions(ActionSequence sequence)
Sets the action sequence for component hidden events to the given action sequence. |
void |
setComponentMovedActions(ActionSequence sequence)
Sets the action sequence for component moved events to the given action sequence. |
void |
setComponentResizedActions(ActionSequence sequence)
Sets the action sequence for component resized events to the given action sequence. |
void |
setComponentShownActions(ActionSequence sequence)
Sets the action sequence for component shown events to the given action sequence. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ActionSequence hiddenActions
protected ActionSequence movedActions
protected ActionSequence resizedActions
protected ActionSequence shownActions
| Constructor Detail |
public ComponentActionAdapter()
public ComponentActionAdapter(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 componentHidden(ComponentEvent evt)
componentHidden in interface ComponentListenerevt - the component eventaddComponentHiddenAction(ActionListener),
getComponentHiddenActions()public final void componentMoved(ComponentEvent evt)
componentMoved in interface ComponentListenerevt - the component eventaddComponentMovedAction(ActionListener),
getComponentMovedActions()public final void componentResized(ComponentEvent evt)
componentResized in interface ComponentListenerevt - the component eventaddComponentResizedAction(ActionListener),
getComponentResizedActions()public final void componentShown(ComponentEvent evt)
componentShown in interface ComponentListenerevt - the component eventaddComponentShownAction(ActionListener),
getComponentShownActions()public void addComponentHiddenAction(ActionListener a)
a - the desired action listenerremoveComponentHiddenAction(ActionListener),
setComponentHiddenActions(ActionSequence),
getComponentHiddenActions()public void addComponentMovedAction(ActionListener a)
a - the desired action listenerremoveComponentMovedAction(ActionListener),
setComponentMovedActions(ActionSequence),
getComponentMovedActions()public void addComponentResizedAction(ActionListener a)
a - the desired action listenerremoveComponentResizedAction(ActionListener),
setComponentResizedActions(ActionSequence),
getComponentResizedActions()public void addComponentShownAction(ActionListener a)
a - the desired action listenerremoveComponentShownAction(ActionListener),
setComponentShownActions(ActionSequence),
getComponentShownActions()public void removeComponentHiddenAction(ActionListener a)
a - the action listener to be removedaddComponentHiddenAction(ActionListener),
setComponentHiddenActions(ActionSequence),
getComponentHiddenActions()public void removeComponentMovedAction(ActionListener a)
a - the action to be removedaddComponentMovedAction(ActionListener),
setComponentMovedActions(ActionSequence),
getComponentMovedActions()public void removeComponentResizedAction(ActionListener a)
a - the action listener to be removedaddComponentResizedAction(ActionListener),
setComponentResizedActions(ActionSequence),
getComponentResizedActions()public void removeComponentShownAction(ActionListener a)
a - the action to be removedaddComponentShownAction(ActionListener),
setComponentShownActions(ActionSequence),
getComponentShownActions()public void setComponentHiddenActions(ActionSequence sequence)
null, the action sequence
for component hidden events is cleared.
sequence - the desired action sequencegetComponentHiddenActions(),
addComponentHiddenAction(ActionListener),
removeComponentHiddenAction(ActionListener)public void setComponentMovedActions(ActionSequence sequence)
null, the action sequence
for component moved events is cleared.
sequence - the desired action sequencegetComponentMovedActions(),
addComponentMovedAction(ActionListener),
removeComponentMovedAction(ActionListener)public void setComponentResizedActions(ActionSequence sequence)
null, the action sequence
for component resized events is cleared.
sequence - the desired action sequencesetComponentResizedActions(ActionSequence),
addComponentResizedAction(ActionListener),
removeComponentResizedAction(ActionListener)public void setComponentShownActions(ActionSequence sequence)
null, the action sequence
for component shown events is cleared.
sequence - the desired action sequencegetComponentShownActions(),
addComponentShownAction(ActionListener),
removeComponentShownAction(ActionListener)public ActionSequence getComponentHiddenActions()
setComponentHiddenActions(ActionSequence),
addComponentHiddenAction(ActionListener),
removeComponentHiddenAction(ActionListener)public ActionSequence getComponentMovedActions()
setComponentMovedActions(ActionSequence),
addComponentMovedAction(ActionListener),
removeComponentMovedAction(ActionListener)public ActionSequence getComponentResizedActions()
setComponentResizedActions(ActionSequence),
addComponentResizedAction(ActionListener),
removeComponentResizedAction(ActionListener)public ActionSequence getComponentShownActions()
setComponentShownActions(ActionSequence),
addComponentShownAction(ActionListener),
removeComponentShownAction(ActionListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||