public class SwingEnabledAdapter extends AbstractStateAdapter
| Constructor and Description | 
|---|
SwingEnabledAdapter()
Create a new adapter with no state associated. 
 | 
SwingEnabledAdapter(State pState)
Create a new adapter. 
 | 
SwingEnabledAdapter(State pState,
                   boolean pDeepEnable)
Create a new adapter. 
 | 
SwingEnabledAdapter(State pState,
                   boolean pDeepEnable,
                   boolean pHandleOpaque)
Create a new adapter. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
adjustInitialState(Object pTarget,
                  boolean pEnabled)
We don't need special treatment for the initial step, and
 just call processStateChange(). 
 | 
boolean | 
isDeepEnable()
Returns if we enable/disable recursively. 
 | 
protected void | 
processStateChange(Object pTarget,
                  boolean pEnabled)
We map the pEnabled boolean to the enabled/not enabled behaviour of a
 AbstractButton or a Action. 
 | 
void | 
setDeepEnable(boolean pDeepEnable)
Sets if we should enable/disable recursively. 
 | 
add, add, addInvert, getConsistencyCategory, getName, remove, setName, setState, stateChangedpublic SwingEnabledAdapter()
public SwingEnabledAdapter(State pState)
pState - the state we adaptpublic SwingEnabledAdapter(State pState, boolean pDeepEnable)
pState - the state we adaptpDeepEnable - true if we should enable/disable recursivelypublic SwingEnabledAdapter(State pState, boolean pDeepEnable, boolean pHandleOpaque)
pState - the state we adaptpDeepEnable - true if we should enable/disable recursivelypHandleOpaque - true if we should also seth the opaque propertypublic void setDeepEnable(boolean pDeepEnable)
pDeepEnable - true if we should enable/disable recursivelypublic boolean isDeepEnable()
protected void adjustInitialState(Object pTarget, boolean pEnabled)
adjustInitialState in class AbstractStateAdapterpTarget - the target we should adjustpEnabled - the state for the targetprotected void processStateChange(Object pTarget, boolean pEnabled)
processStateChange in class AbstractStateAdapterpTarget - target object, either a Component or a ActionpEnabled - true if the target object should get "enabled"IllegalStateException - if pTarget is not a Component or ActionCopyright © 2017 Jürgen Zeller (privat). All rights reserved.