Class MenuOpenHooker
java.lang.Object
net.datenwerke.rs.tsreportarea.client.tsreportarea.hookers.MenuOpenHooker
- All Implemented Interfaces:
Hook,TsFavoriteMenuHook
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddContextMenuEntries(Menu menu, List<AbstractTsDiskNodeDto> items, ItemSelector selector, TsDiskMainComponent mainComponent) booleanconfigureToolbarButton(DwTextButton openBtn, List<AbstractTsDiskNodeDto> items, TsDiskMainComponent mainComponent) Configures the toolbar button based on the selected items.createToolbarButton(ToolbarService toolbarService) Creates a toolbar button for opening items.voidRemoves the registered handler if it exists.
-
Constructor Details
-
MenuOpenHooker
-
-
Method Details
-
addContextMenuEntries
public boolean addContextMenuEntries(Menu menu, List<AbstractTsDiskNodeDto> items, ItemSelector selector, TsDiskMainComponent mainComponent) - Specified by:
addContextMenuEntriesin interfaceTsFavoriteMenuHook
-
createToolbarButton
Creates a toolbar button for opening items.- Specified by:
createToolbarButtonin interfaceTsFavoriteMenuHook- Parameters:
toolbarService- The toolbar service used to create the button- Returns:
- The created text button with rotate right icon and "open" text
-
removeHandlerRegistration
public void removeHandlerRegistration()Removes the registered handler if it exists. Cleans up any event handlers that were previously registered.- Specified by:
removeHandlerRegistrationin interfaceTsFavoriteMenuHook
-
configureToolbarButton
public boolean configureToolbarButton(DwTextButton openBtn, List<AbstractTsDiskNodeDto> items, TsDiskMainComponent mainComponent) Configures the toolbar button based on the selected items.- Specified by:
configureToolbarButtonin interfaceTsFavoriteMenuHook- Parameters:
openBtn- The button to configureitems- The list of selected itemsmainComponent- The main component reference- Returns:
- true if the button should be enabled (exactly one item selected), false otherwise
-