com.samskivert.swing
Class EnablingAdapter
java.lang.Object
com.samskivert.swing.EnablingAdapter
- Direct Known Subclasses:
- EnablingAdapter.PropertyChangeEnabler
public class EnablingAdapter
- extends Object
Used to enable or disable a source component based on some
asynchronously changing state.
|
Constructor Summary |
protected |
EnablingAdapter(JComponent target,
boolean invert)
Creates an enabling adapter with the specified target component. |
|
Method Summary |
static PropertyChangeListener |
getPropChangeEnabler(String property,
JComponent target,
boolean invert)
Creates and returns an enabler that listens for changes in the
specified property (which must be a Boolean valued
property) and updates the target's enabled state accordingly. |
protected void |
stateChanged(boolean newState)
Called by the appropriate derived adapter to adjust the target's
enabled state. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_target
protected JComponent _target
_invert
protected boolean _invert
EnablingAdapter
protected EnablingAdapter(JComponent target,
boolean invert)
- Creates an enabling adapter with the specified target component.
- Parameters:
invert - if true, the target component's enabled state is set
to the inverse of the monitored state.
getPropChangeEnabler
public static PropertyChangeListener getPropChangeEnabler(String property,
JComponent target,
boolean invert)
- Creates and returns an enabler that listens for changes in the
specified property (which must be a
Boolean valued
property) and updates the target's enabled state accordingly.
stateChanged
protected void stateChanged(boolean newState)
- Called by the appropriate derived adapter to adjust the target's
enabled state.
Copyright © 2000-2008 Michael Bayne.
All Rights Reserved.