public class SwingVisibleAdapter extends AbstractStateAdapter
Constructor and Description |
---|
SwingVisibleAdapter()
Create a new adapter with no state associated.
|
SwingVisibleAdapter(State pState)
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 inital step, and
just call processStateChange().
|
protected void |
processStateChange(Object pTarget,
boolean pEnabled)
We map the pEnabled boolean to the visible/not visible behaviour of a
JComponent.
|
add, add, addInvert, getConsistencyCategory, getName, remove, setName, setState, stateChanged
public SwingVisibleAdapter()
public SwingVisibleAdapter(State pState)
pState
- the state we adaptprotected void adjustInitialState(Object pTarget, boolean pEnabled)
adjustInitialState
in class AbstractStateAdapter
pTarget
- the target we should adjustpEnabled
- the state for the targetprotected void processStateChange(Object pTarget, boolean pEnabled)
processStateChange
in class AbstractStateAdapter
pTarget
- target object, must be a JComponentpEnabled
- true if the target object should get "enabled"IllegalStateException
- if pTarget is not a JComponentCopyright © 2017 Jürgen Zeller (privat). All rights reserved.