|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jguiraffe.gui.platform.swing.builder.components.SwingComponentHandler
abstract class SwingComponentHandler
A base class for all ComponentHandler classes of the Swing
implementation.
This base class maintains a JComponent reference and provides
some common functionality, especially related to event handling.
| Constructor Summary | |
|---|---|
protected |
SwingComponentHandler(javax.swing.JComponent comp)
Creates a new instance of SwingComponentHandler and sets
the component to manage. |
| Method Summary | |
|---|---|
void |
addActionListener(java.awt.event.ActionListener l)
Adds an action listener at the managed component. |
void |
addChangeListener(ChangeListener l)
Adds a change listener at the managed component. |
void |
addFocusListener(java.awt.event.FocusListener l)
Registers a focus listener at the managed component. |
protected void |
fireChangeEvent(java.lang.Object event)
Fires a change event to the registered change listeners. |
java.lang.Object |
getComponent()
Returns a reference to the managed component. |
javax.swing.JComponent |
getJComponent()
Returns a reference to the managed Swing component. |
java.lang.Object |
getOuterComponent()
Returns the outer most component. |
boolean |
isEnabled()
Checks whether the managed component is enabled. |
protected void |
registerChangeListener()
Registers this component handler as a change listener at the managed component. |
void |
removeActionListener(java.awt.event.ActionListener l)
Removes an action listener from the managed component. |
void |
removeChangeListener(ChangeListener l)
Removes a change listener from this component. |
void |
removeFocusListener(java.awt.event.FocusListener l)
Removes the specified focus listener from this component. |
void |
setEnabled(boolean f)
Sets the enabled flag of the managed component. |
protected void |
unregisterChangeListener()
Unregisters this component as change listener from the managed component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.jguiraffe.gui.forms.ComponentHandler |
|---|
getData, getType, setData |
| Constructor Detail |
|---|
protected SwingComponentHandler(javax.swing.JComponent comp)
SwingComponentHandler and sets
the component to manage.
comp - the associated component| Method Detail |
|---|
public javax.swing.JComponent getJComponent()
public java.lang.Object getComponent()
getComponent in interface ComponentHandlerpublic java.lang.Object getOuterComponent()
getComponent().
getOuterComponent in interface ComponentHandlerpublic boolean isEnabled()
isEnabled in interface ComponentHandlerpublic void setEnabled(boolean f)
setEnabled in interface ComponentHandlerf - the value of the enabled flagpublic void addActionListener(java.awt.event.ActionListener l)
UnsupportedOperationException exception. (Many
components do not support action listeners.)
addActionListener in interface SwingEventSourcel - the listener to registerpublic void removeActionListener(java.awt.event.ActionListener l)
UnsupportedOperationException
exception. (Many components do not support action listeners.)
removeActionListener in interface SwingEventSourcel - the listener to removepublic void addChangeListener(ChangeListener l)
FormEventManager will do the multiplexing).
Because there is no generic change listener in Swing
registerChangeListener() will be invoked for
doing the actual registration.
addChangeListener in interface SwingEventSourcel - the listener to registerpublic void removeChangeListener(ChangeListener l)
addChangeListener() can be removed again. If the passed in
listener is different from the registered listener, this operation will
have no effect.
removeChangeListener in interface SwingEventSourcel - the listener to be removedaddChangeListener(ChangeListener)public void addFocusListener(java.awt.event.FocusListener l)
addFocusListener in interface SwingEventSourcel - the listener to registerpublic void removeFocusListener(java.awt.event.FocusListener l)
removeFocusListener in interface SwingEventSourcel - the listener to be removedprotected void registerChangeListener()
fireEvent() method should be called. This
implementation throws an UnsupportedOperationException
exception.
protected void unregisterChangeListener()
removeChangeListener(). This
base implementation throws an UnsupportedOperationException
exception.
registerChangeListener()protected void fireChangeEvent(java.lang.Object event)
event - the event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||