|
||||||||||
| 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, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
ColumnControlButton.ColumnVisibilityAction(javax.swing.table.TableColumn column)
Creates a action synched to the table column. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Does nothing. |
protected boolean |
canControlColumn()
Returns flag to indicate if column's visibility can be controlled. |
protected java.beans.PropertyChangeListener |
createPropertyChangeListener()
Creates and returns the listener to column's property changes. |
protected java.beans.PropertyChangeListener |
getColumnListener()
Returns the listener to column's property changes. |
boolean |
isEnabled()
Returns true if the action is enabled. |
void |
itemStateChanged(java.awt.event.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(javax.swing.table.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 javax.swing.ActionisEnabled in class javax.swing.AbstractActioncanControlColumn()protected boolean canControlColumn()
TableColumnExt.
public void itemStateChanged(java.awt.event.ItemEvent e)
AbstractActionExtItemListener. Updates internal state based
on the given ItemEvent. Here: synchs selected property if isStateAction(), does nothing otherwise.
itemStateChanged in interface java.awt.event.ItemListeneritemStateChanged in class AbstractActionExte - the ItemEvent fired by a ItemSelectable on changing the selected
state.public void setSelected(boolean newValue)
AbstractActionExt
setSelected in class AbstractActionExtnewValue - true to set the action as selected of the action.public void actionPerformed(java.awt.event.ActionEvent e)
protected java.beans.PropertyChangeListener getColumnListener()
PropertyChangeListener listening to
TableColumn's property changes, guaranteed to be
not null.protected java.beans.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 | |||||||||