Class CColumnControlButton.ColumnVisibilityAction

    • Constructor Detail

      • ColumnVisibilityAction

        public ColumnVisibilityAction​(TableColumn column)
        Creates a action synched to the table column.
        Parameters:
        column - the TableColumn to keep synched to.
    • Method Detail

      • releaseColumn

        public void releaseColumn()
        Releases all references to the synched TableColumn. Client code must call this method if the action is no longer needed. After calling this action must not be used any longer.
      • itemStateChanged

        public void itemStateChanged​(ItemEvent e)
        Specified by:
        itemStateChanged in interface ItemListener
        Overrides:
        itemStateChanged in class org.jdesktop.swingx.action.AbstractActionExt
      • setSelected

        public void setSelected​(boolean newValue)
        Overrides:
        setSelected in class org.jdesktop.swingx.action.AbstractActionExt
      • actionPerformed

        public void actionPerformed​(ActionEvent e)
        Does nothing. Synch from action state to TableColumn state is done in itemStateChanged.
      • getColumnListener

        protected PropertyChangeListener getColumnListener()
        Returns the listener to column's property changes. The listener is created lazily if necessary.
        Returns:
        the PropertyChangeListener listening to TableColumn's property changes, guaranteed to be not null.
      • createPropertyChangeListener

        protected PropertyChangeListener createPropertyChangeListener()
        Creates and returns the listener to column's property changes. Subclasses are free to roll their own.

        Implementation note: this listener reacts to column's visible and headerValue properties and calls the respective updateFromXX methodes.

        Returns:
        the PropertyChangeListener to use with the column