|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
org.jdesktop.swingx.action.AbstractActionExt
org.jdesktop.swingx.table.ColumnControlButton.ColumnVisibilityAction
public class ColumnControlButton.ColumnVisibilityAction
A specialized Action
which takes care of keeping in synch with
TableColumn state.
NOTE: client must call releaseColumn if this action is no longer needed!
Field Summary |
---|
Fields inherited from class org.jdesktop.swingx.action.AbstractActionExt |
---|
GROUP, IS_STATE, LARGE_ICON |
Fields inherited from class javax.swing.AbstractAction |
---|
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
---|---|
ColumnControlButton.ColumnVisibilityAction(TableColumn column)
Creates a action synched to the table column. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
Does nothing. |
protected boolean |
canControlColumn()
Returns flag to indicate if column's visibility can be controlled. |
protected PropertyChangeListener |
createPropertyChangeListener()
Creates and returns the listener to column's property changes. |
protected PropertyChangeListener |
getColumnListener()
Returns the listener to column's property changes. |
boolean |
isEnabled()
Returns true if the action is enabled. |
void |
itemStateChanged(ItemEvent e)
Callback method as ItemListener . |
void |
releaseColumn()
Releases all references to the synched TableColumn . |
void |
setSelected(boolean newValue)
Changes the state of the action |
Methods inherited from class org.jdesktop.swingx.action.AbstractActionExt |
---|
dispose, getAccelerator, getActionCommand, getGroup, getLargeIcon, getLongDescription, getMnemonic, getName, getShortDescription, getSmallIcon, isSelected, isStateAction, setAccelerator, setActionCommand, setGroup, setLargeIcon, setLongDescription, setMnemonic, setMnemonic, setName, setShortDescription, setSmallIcon, setStateAction, setStateAction, toString |
Methods inherited from class javax.swing.AbstractAction |
---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ColumnControlButton.ColumnVisibilityAction(TableColumn column)
column
- the TableColumn
to keep synched to.Method Detail |
---|
public void releaseColumn()
TableColumn
.
Client code must call this method if the
action is no longer needed. After calling this action must not be
used any longer.
public boolean isEnabled()
isEnabled
in interface Action
isEnabled
in class AbstractAction
canControlColumn()
protected boolean canControlColumn()
TableColumnExt
.
public void itemStateChanged(ItemEvent e)
AbstractActionExt
ItemListener
. Updates internal state based
on the given ItemEvent. Here: synchs selected property if isStateAction(), does nothing otherwise.
itemStateChanged
in interface ItemListener
itemStateChanged
in class AbstractActionExt
e
- the ItemEvent fired by a ItemSelectable on changing the selected
state.public void setSelected(boolean newValue)
AbstractActionExt
setSelected
in class AbstractActionExt
newValue
- true to set the action as selected of the action.public void actionPerformed(ActionEvent e)
protected PropertyChangeListener getColumnListener()
PropertyChangeListener
listening to
TableColumn
's property changes, guaranteed to be
not null
.protected PropertyChangeListener createPropertyChangeListener()
Implementation note: this listener reacts to column's
visible
and headerValue
properties and
calls the respective updateFromXX
methodes.
PropertyChangeListener
to use with the
column
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |