java.lang.Object
net.datenwerke.rs.tsreportarea.client.tsreportarea.hookers.MenuRenameHooker
All Implemented Interfaces:
Hook, TsFavoriteMenuHook

public class MenuRenameHooker extends Object implements TsFavoriteMenuHook
  • Constructor Details

  • Method Details

    • addContextMenuEntries

      public boolean addContextMenuEntries(Menu menu, List<AbstractTsDiskNodeDto> items, ItemSelector selector, TsDiskMainComponent mainComponent)
      Specified by:
      addContextMenuEntries in interface TsFavoriteMenuHook
    • createToolbarButton

      public DwTextButton createToolbarButton(ToolbarService toolbarService)
      Creates a toolbar button for renaming functionality.
      Specified by:
      createToolbarButton in interface TsFavoriteMenuHook
      Parameters:
      toolbarService - the toolbar service used to create the button
      Returns:
      a configured DwTextButton with edit icon and rename text, styled for menu button appearance
    • removeHandlerRegistration

      public void removeHandlerRegistration()
      Removes any registered event handlers to prevent memory leaks. Safely handles null handlerRegistration references.
      Specified by:
      removeHandlerRegistration in interface TsFavoriteMenuHook
    • configureToolbarButton

      public boolean configureToolbarButton(DwTextButton renameBtn, List<AbstractTsDiskNodeDto> items, TsDiskMainComponent mainComponent)
      Configures the rename toolbar button based on current selection and permissions.
      Specified by:
      configureToolbarButton in interface TsFavoriteMenuHook
      Parameters:
      renameBtn - the button to configure
      items - the list of selected disk nodes
      mainComponent - the main component containing context information
      Returns:
      true if the button was successfully configured and enabled, false if configuration failed due to invalid selection or permissions
      Throws:
      NullPointerException - if renameBtn or mainComponent parameters are null