public class SwingJTableEnabledAdapter extends AbstractStateAdapter
| Constructor and Description |
|---|
SwingJTableEnabledAdapter()
Create a new adapter with no state associated.
|
SwingJTableEnabledAdapter(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 enabled/not enabled behaviour of a
JTable by disabling the table, settting the foreground color to the
disabled color of a combobox and setting the selection fore/background
color to the disabled for/background color of a combobox.
|
add, add, addInvert, getConsistencyCategory, getName, remove, setName, setState, stateChangedpublic SwingJTableEnabledAdapter()
public SwingJTableEnabledAdapter(State pState)
pState - the state we adaptprotected 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 JComponent or a ActionpEnabled - true if the target object should get "enabled"IllegalStateException - if pTarget is not a JComponent or ActionCopyright © 2017 Jürgen Zeller (privat). All rights reserved.