Class AbstractAsiContainerTopComponent<P extends AbstractAsiContainerPanel>

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
org.openide.windows.TopComponent
uno.anahata.asi.nb.AbstractAsiContainerTopComponent<P>
Type Parameters:
P - The concrete AbstractAsiContainerPanel type.
All Implemented Interfaces:
ImageObserver, MenuContainer, Externalizable, Serializable, Accessible, org.openide.util.HelpCtx.Provider, org.openide.util.Lookup.Provider, ReloadableTopComponent
Direct Known Subclasses:
AsiCardsTopComponent, AsiTableTopComponent

public abstract class AbstractAsiContainerTopComponent<P extends AbstractAsiContainerPanel> extends org.openide.windows.TopComponent implements ReloadableTopComponent
Abstract base class for container-level dashboard TopComponents (Cards and Table views).

Manages the embedding of an AbstractAsiContainerPanel, automatically binding its periodic refresh timer to the TopComponent's visibility lifecycle (componentOpened() and componentClosed()), and implementing ReloadableTopComponent to guarantee timer stoppage during module reloads.

Author:
anahata
See Also:
  • Field Details

    • sessionsPanel

      protected final P extends AbstractAsiContainerPanel sessionsPanel
      The UI panel displaying the container dashboard.
  • Constructor Details

    • AbstractAsiContainerTopComponent

      protected AbstractAsiContainerTopComponent(P sessionsPanel)
      Constructs a new container TopComponent wrapping the given sessions panel.
      Parameters:
      sessionsPanel - The container UI panel instance.
  • Method Details

    • componentOpened

      public void componentOpened()

      Starts the periodic refresh timer on the underlying panel when the tab becomes active.

      Overrides:
      componentOpened in class org.openide.windows.TopComponent
    • componentClosed

      public void componentClosed()

      Stops the periodic refresh timer on the underlying panel to conserve CPU and prevent leaks.

      Overrides:
      componentClosed in class org.openide.windows.TopComponent
    • detachForNbmReload

      public void detachForNbmReload()
      Detaches this TopComponent from active listeners, background timers, and domain models, ensuring that all hard references to the current OneModuleClassLoader are severed before the component is closed.

      Unconditionally stops the background refresh timer and closes this TopComponent, ensuring no lingering timer tasks hold onto the module classloader during a reload.

      Specified by:
      detachForNbmReload in interface ReloadableTopComponent