|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--edu.neu.ccs.gui.JPTComponent
The abstract class JPTComponent extends JComponent
in order to support property change and add mouse and key adapters.
Specifically, this class:
SupportsPropertyChange that are
not already (publically) implemented in JComponentKeyActionAdapter for this componentMouseActionAdapter for this component
| Field Summary |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
JPTComponent()
|
|
| Method Summary | |
void |
addForwardingListener(Object object)
Add the forwarding listener as a property change listener for the given object if the object supports property change. |
void |
addPropertyChangeListeners(PropertyChangeListener[] listeners)
Add all items in the given PropertyChangeListener array
to the listener list. |
void |
addPropertyChangeListeners(String propertyName,
PropertyChangeListener[] listeners)
Add all items in the given PropertyChangeListener array to
the listener list for a specific property. |
void |
firePropertyChange(PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered
listeners. |
void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Report a bound property update to any registered listeners. |
PropertyChangeForwardingListener |
getForwardingListener()
Returns the PropertyChangeForwardingListener that
will forward the property change events it receives to this object. |
KeyActionAdapter |
getKeyActionAdapter()
Returns this component's key action adapter. |
MouseActionAdapter |
getMouseActionAdapter()
Returns this component's mouse action adapter. |
boolean |
hasListeners(String propertyName)
Check if there are any listeners for a specific property. |
void |
refreshComponent()
Refreshes the component by repacking the parent window. |
void |
removeAndAddForwardingListener(Object oldobject,
Object newobject)
Remove the forwarding listener as a property change listener for the old object if the old object supports property change and add the forwarding listener as a property change listener for the new object if the new object supports property change. |
void |
removeForwardingListener(Object object)
Remove the forwarding listener as a property change listener for the given object if the object supports property change. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public JPTComponent()
| Method Detail |
public final void addPropertyChangeListeners(PropertyChangeListener[] listeners)
PropertyChangeListener array
to the listener list. These items are registered for all properties.
addPropertyChangeListeners in interface SupportsPropertyChangelisteners - the PropertyChangeListener array to be added
public final void addPropertyChangeListeners(String propertyName,
PropertyChangeListener[] listeners)
PropertyChangeListener array to
the listener list for a specific property. These items will be invoked
only when a call on firePropertyChange names that specific
property.
addPropertyChangeListeners in interface SupportsPropertyChangelisteners - the PropertyChangeListener array to be addedpublic final boolean hasListeners(String propertyName)
hasListeners in interface SupportsPropertyChangepropertyName - the name of the property to check
public final void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Report a bound property update to any registered listeners.
No event is fired if the old and new values are equal and
non-null.
In order to implement SupportsPropertyChange, this
method makes public a method that is declared
protected in JComponent.
firePropertyChange in interface SupportsPropertyChangefirePropertyChange in class JComponentpropertyName - the programmatic name of the property that was changedoldValue - the old value of the propertynewValue - the new value of the propertypublic final void firePropertyChange(PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered
listeners.
No event is fired if the given event's old and new values are equal
and non-null.
firePropertyChange in interface SupportsPropertyChangeevt - the PropertyChangeEvent objectpublic final PropertyChangeForwardingListener getForwardingListener()
PropertyChangeForwardingListener that
will forward the property change events it receives to this object.
getForwardingListener in interface SupportsPropertyChangepublic final void addForwardingListener(Object object)
addForwardingListener in interface SupportsPropertyChangeobject - the object that should add the forwarding listenerpublic final void removeForwardingListener(Object object)
removeForwardingListener in interface SupportsPropertyChangeobject - the object that should remove the forwarding listener
public final void removeAndAddForwardingListener(Object oldobject,
Object newobject)
removeAndAddForwardingListener in interface SupportsPropertyChangeoldobject - the old object that should remove the forwarding listenernewobject - the new object that should add the forwarding listenerpublic final KeyActionAdapter getKeyActionAdapter()
public final MouseActionAdapter getMouseActionAdapter()
public void refreshComponent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||