public class SwingEditableAdapter extends AbstractStateAdapter
Constructor and Description |
---|
SwingEditableAdapter()
Creates a new adapter, that monitors no state and has an
empty string as its name.
|
SwingEditableAdapter(State pState)
Creates a new adapter, that monitors the handed state and has an
empty string as its name.
|
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 editable/not editable behaviour
of a JTextComponent.
|
add, add, addInvert, getConsistencyCategory, getName, remove, setName, setState, stateChanged
public SwingEditableAdapter()
public SwingEditableAdapter(State pState)
pState
- the state we adopt toIllegalArgumentException
- if pState is nullprotected void adjustInitialState(Object pTarget, boolean pEnabled)
adjustInitialState
in class AbstractStateAdapter
pTarget
- target object, never nullpEnabled
- true if the target object should get "enabled"protected void processStateChange(Object pTarget, boolean pEnabled)
processStateChange
in class AbstractStateAdapter
pTarget
- target object, never nullpEnabled
- true if the target object should get "enabled"Copyright © 2017 Jürgen Zeller (privat). All rights reserved.