Module org.autogui
Package org.autogui.swing
Class GuiSwingViewCollectionTable.PopupExtensionCollection
java.lang.Object
org.autogui.swing.util.PopupExtension
org.autogui.swing.GuiSwingViewCollectionTable.PopupExtensionCollection
- All Implemented Interfaces:
ActionListener,KeyListener,MouseListener,EventListener,PopupMenuListener
- Enclosing class:
GuiSwingViewCollectionTable
public static class GuiSwingViewCollectionTable.PopupExtensionCollection
extends PopupExtension
implements PopupMenuListener
menu creation for selected rows and columns.
For columns, it uses GuiSwingViewCollectionTable.CollectionColumnMenuSupplier.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.autogui.swing.util.PopupExtension
PopupExtension.DefaultPopupGetter, PopupExtension.DefaultPopupMenu, PopupExtension.MenuKeySelector, PopupExtension.PopupCancelChecker, PopupExtension.PopupExtensionDisplayAction, PopupExtension.PopupMenuBuilder, PopupExtension.PopupMenuBuilderEmpty, PopupExtension.PopupMenuFilter, PopupExtension.PopupMenuFilterAsIs, PopupExtension.PopupMenuHidingFix, PopupExtension.PopupMenuListenerForSetup, PopupExtension.PredicateKeyMatcher -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Set<ObjectTableColumn.TableMenuCompositeShared> protected intprotected booleanprotected Timerprotected intFields inherited from class org.autogui.swing.util.PopupExtension
action, cancelChecker, filter, keyMatcher, menu, MENU_CATEGORY_EDIT, MENU_CATEGORY_JUMP, MENU_CATEGORY_PREFS, MENU_CATEGORY_SELECT, MENU_CATEGORY_SET, MENU_CATEGORY_TRANSFER, MENU_CATEGORY_UNDO, MENU_CATEGORY_VIEW, MENU_CATEGORY_WINDOW, MENU_FILTER_IDENTITY, MENU_SUB_CATEGORY_COPY, MENU_SUB_CATEGORY_CUT, MENU_SUB_CATEGORY_DELETE, MENU_SUB_CATEGORY_EXPORT, MENU_SUB_CATEGORY_IMPORT, MENU_SUB_CATEGORY_NEW, MENU_SUB_CATEGORY_PASTE, MENU_SUB_CATEGORY_PREFS_CHANGE, MENU_SUB_CATEGORY_PREFS_WINDOW, MENU_SUB_CATEGORY_REDO, MENU_SUB_CATEGORY_SELECT, MENU_SUB_CATEGORY_UNDO, MENU_SUB_CATEGORY_WINDOW_SELECT, MENU_SUB_CATEGORY_WINDOW_VIEW, menuBuilder, pane -
Constructor Summary
ConstructorsConstructorDescriptionPopupExtensionCollection(GuiSwingViewCollectionTable.CollectionTable pane, Predicate<KeyEvent> keyMatcher, Supplier<? extends Collection<PopupCategorized.CategorizedMenuItem>> items) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuilder(PopupExtension.PopupMenuFilter filter, Consumer<Object> m, PopupCategorized tableActions, GuiSwingViewCollectionTable.CollectionColumnMenuSupplier columnBuilder, GuiSwingViewCollectionTable.CollectionCellMenuSupplier cellBuilder) the building impl.protected JMenubuildTableActionsAsSubMenu(PopupCategorized tableActions, PopupExtension.PopupMenuFilter filter) getTable()intvoidNote: currently disabled using the mechanism, instead shown by framework original impl.voidvoidvoidvoidvoidvoidvoidvoidvoidMethods inherited from class org.autogui.swing.util.PopupExtension
actionPerformed, addListenersTo, addListenersToAsPopupMenuListener, addListenersToPane, getAction, getDefaultKeyMatcher, getDefaultKeyStroke, getFilter, getKeyCode, getKeyMatcher, getKeyStroke, getMenu, getMenuBuilder, getMenuShortcutKeyMask, getPane, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseReleased, setFilter, setMenuBuilder, setupCancelChecker, show, show
-
Field Details
-
table
-
targetColumnIndex
protected int targetColumnIndex -
lastClickColumnIndex
protected int lastClickColumnIndex -
showing
protected boolean showing -
showingTimer
-
-
Constructor Details
-
PopupExtensionCollection
public PopupExtensionCollection(GuiSwingViewCollectionTable.CollectionTable pane, Predicate<KeyEvent> keyMatcher, Supplier<? extends Collection<PopupCategorized.CategorizedMenuItem>> items)
-
-
Method Details
-
builder
protected void builder(PopupExtension.PopupMenuFilter filter, Consumer<Object> m, PopupCategorized tableActions, GuiSwingViewCollectionTable.CollectionColumnMenuSupplier columnBuilder, GuiSwingViewCollectionTable.CollectionCellMenuSupplier cellBuilder) the building impl. for a collection-table; will be setPopupExtension.setMenuBuilder(PopupMenuBuilder)with sub-builders- Parameters:
filter- the given filterm- the target menutableActions- the action builder for "Table"columnBuilder- the action builder for "Target Column"cellBuilder- the action builder for "Selected Cells" and "Selected Rows"- Since:
- 1.8
-
buildTableActionsAsSubMenu
protected JMenu buildTableActionsAsSubMenu(PopupCategorized tableActions, PopupExtension.PopupMenuFilter filter) - Parameters:
tableActions- the given actionsfilter- the for building the actions- Returns:
- a new sub-menu with building the tableActions with the filter
- Since:
- 1.8
-
popupMenuWillBecomeVisible
- Specified by:
popupMenuWillBecomeVisiblein interfacePopupMenuListener
-
popupMenuWillBecomeInvisible
- Specified by:
popupMenuWillBecomeInvisiblein interfacePopupMenuListener
-
popupMenuCanceled
- Specified by:
popupMenuCanceledin interfacePopupMenuListener
-
setupMenu
public void setupMenu()- Overrides:
setupMenuin classPopupExtension
-
getTable
-
mousePressed
Description copied from class:PopupExtensionNote: currently disabled using the mechanism, instead shown by framework original impl. Some LAF relies on it.- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classPopupExtension- Parameters:
e- the handling event
-
updatePopupLocation
- Parameters:
p- location with the table coordinate- Since:
- 1.3
-
showByKey
- Overrides:
showByKeyin classPopupExtension
-
getTargetColumnIndex
public int getTargetColumnIndex()- Returns:
- model index
-
getTargetColumn
-
getTargetColumns
-
setupCompositeKeyMap
public void setupCompositeKeyMap() -
setupCompositeKeyMapByAddingColumn
-