Class AbstractTableHeaderMenu
java.lang.Object
slash.navigation.converter.gui.helpers.AbstractTableHeaderMenu
- Direct Known Subclasses:
PhotosTableHeaderMenu,PointsOfInterestTableHeaderMenu,PositionsTableHeaderMenu,RoutesTableHeaderMenu
Helps to make popups for tables headers useable.
- Author:
- Christian Pesch
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractTableHeaderMenu(AbstractTableColumnModel columnModel, ActionManager actionManager, String preferencesPrefix) -
Method Summary
Modifier and TypeMethodDescriptionvoidenableSortActions(boolean enable) protected voidinitializePopup(JTableHeader tableHeader) protected voidRegisters aToggleColumnVisibilityActiononce per prepared column and builds the header right-click popup.protected voidinitializeSortPositions(JMenu sortPositionListMenu, PositionsModel positionsModel) voidpopulateShowColumnMenu(JMenu menu) Rebuilds the given menu-bar "Show Column" submenu from this table's prepared columns, reusing the actions registered once byinitializeShowColumn()- repeated calls (one per tab switch) must not re-register actions with theActionManager.
-
Constructor Details
-
Method Details
-
initializeShowColumn
protected void initializeShowColumn()Registers aToggleColumnVisibilityActiononce per prepared column and builds the header right-click popup. The menu-bar "Show Column" submenu is no longer built here - seepopulateShowColumnMenu(JMenu), which reuses these registered actions. -
populateShowColumnMenu
Rebuilds the given menu-bar "Show Column" submenu from this table's prepared columns, reusing the actions registered once byinitializeShowColumn()- repeated calls (one per tab switch) must not re-register actions with theActionManager. All mutation happens on the EDT. -
initializePopup
-
enableSortActions
public void enableSortActions(boolean enable)