Class ColumnControlButton.DefaultColumnControlPopup
java.lang.Object
org.jdesktop.swingx.table.ColumnControlButton.DefaultColumnControlPopup
- All Implemented Interfaces:
UIDependent, ColumnControlPopup, ColumnControlPopup.ActionGroupable
- Enclosing class:
ColumnControlButton
public class ColumnControlButton.DefaultColumnControlPopup
extends Object
implements ColumnControlPopup, ColumnControlPopup.ActionGroupable
A default implementation of ColumnControlPopup.
It uses a JPopupMenu with
MenuItems corresponding to the Actions as
provided by the ColumnControlButton.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ColumnControlPopup
ColumnControlPopup.ActionGroupable, ColumnControlPopup.ActionGrouper -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalActionItems(List<? extends Action> actions) Adds additional actions to the popup.protected voidprotected voidHere: creates and adds a menuItem to the popup for every Action in the list.protected voidadds a separator to the popup.voidaddVisibilityActionItems(List<? extends AbstractActionExt> actions) Adds items corresponding to the column's visibility actions.voidApplies the specified component orientation to all internal widgets.protected ColumnControlPopup.ActionGrouperprotected JPopupMenuvoidRemoves all items from the popup.voidvoidtoggleVisibility(JComponent owner) Toggles the popup's visibility.voidupdateUI()Updates all internal visuals after changing a UI-delegate.
-
Field Details
-
popupMenu
-
grouper
-
-
Constructor Details
-
DefaultColumnControlPopup
public DefaultColumnControlPopup() -
DefaultColumnControlPopup
-
-
Method Details
-
updateUI
public void updateUI()Description copied from interface:UIDependentUpdates all internal visuals after changing a UI-delegate.- Specified by:
updateUIin interfaceUIDependent- See Also:
-
toggleVisibility
Description copied from interface:ColumnControlPopupToggles the popup's visibility. This method is responsible for placing itself relative to the given owner if toggled to visible.- Specified by:
toggleVisibilityin interfaceColumnControlPopup- Parameters:
owner- the JComponent which triggered the visibility change, typically a ColumnControlButton.
-
applyComponentOrientation
Description copied from interface:ColumnControlPopupApplies the specified component orientation to all internal widgets. This method must be called by the owner if its component orientation changes.- Specified by:
applyComponentOrientationin interfaceColumnControlPopup- Parameters:
o- the componentOrientation to apply to all internal widgets.
-
removeAll
public void removeAll()Description copied from interface:ColumnControlPopupRemoves all items from the popup.- Specified by:
removeAllin interfaceColumnControlPopup
-
addVisibilityActionItems
Description copied from interface:ColumnControlPopupAdds items corresponding to the column's visibility actions.Each
Actionin the list is astateAction, itsselectedproperty bound to a column'svisibleproperty, that is toggling the selected will toggle the column's visibility (if the action is enabled). TheActionsnameproperty is bound to the column'stitle.- Specified by:
addVisibilityActionItemsin interfaceColumnControlPopup- Parameters:
actions- List of AbstractActionExt to add.
-
addAdditionalActionItems
Description copied from interface:ColumnControlPopupAdds additional actions to the popup.- Specified by:
addAdditionalActionItemsin interfaceColumnControlPopup- Parameters:
actions- List ofActions to add to the popup.
-
addItems
-
addSeparator
protected void addSeparator()adds a separator to the popup. -
addItem
- Parameters:
item- the menuItem to add to the popup.
-
getPopupMenu
- Returns:
- the popup to add menuitems. Guaranteed to be != null.
-
setActionGrouper
- Specified by:
setActionGrouperin interfaceColumnControlPopup.ActionGroupable
-
getGrouper
-