Class DetachablePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, PopupMenuProvider
Direct Known Subclasses:
MultiPagePane.DetachablePage

public class DetachablePanel extends BasePanel implements PopupMenuProvider
Ancestor for panels that can be detached in a frame and also reattached again.
Author:
FracPete (fracpete at waikato dot ac dot nz)
See Also:
  • Field Details

    • m_ContentPanel

      protected BasePanel m_ContentPanel
      the content panel.
    • m_PopupMenuCustomizer

      protected PopupMenuCustomizer<DetachablePanel> m_PopupMenuCustomizer
      the optional popup menu customizer.
    • m_DetachedFrame

      protected BaseFrame m_DetachedFrame
      the frame for detaching the component.
    • m_PanelReattach

      protected BasePanel m_PanelReattach
      the panel with a "reattach" frame.
    • m_ButtonReattach

      protected JButton m_ButtonReattach
      the button for reattaching.
    • m_FrameTitle

      protected String m_FrameTitle
      the frame title to use.
  • Constructor Details

    • DetachablePanel

      public DetachablePanel()
  • Method Details

    • initialize

      protected void initialize()
      Initializes the members.
      Overrides:
      initialize in class BasePanel
    • initGUI

      protected void initGUI()
      Initializes the widgets.
      Overrides:
      initGUI in class BasePanel
    • getContentPanel

      public BasePanel getContentPanel()
      Returns the content panel where to add the other widgets.
      Returns:
      the panel for the content
    • isDetached

      public boolean isDetached()
      Returns whether the content is currently detached and displayed in a frame.
      Returns:
      true if detached
    • detach

      public void detach()
      Detaches the content into a separate frame.
    • reattach

      public void reattach()
      Reattaches the content from a separate frame.
    • setPopupMenuCustomizer

      public void setPopupMenuCustomizer(PopupMenuCustomizer<DetachablePanel> value)
      Sets the popup customizer to use.
      Parameters:
      value - the customizer, can be null
    • getPopupMenuCustomizer

      public PopupMenuCustomizer<DetachablePanel> getPopupMenuCustomizer()
      Returns the current popup customizer in use.
      Returns:
      the customizer, null if none set
    • createPopupMenu

      protected JPopupMenu createPopupMenu()
      Creates and returns the popup menu.
      Returns:
      the menu
    • getPopupMenu

      public JPopupMenu getPopupMenu()
      Returns the popup menu.
      Specified by:
      getPopupMenu in interface PopupMenuProvider
    • setFrameTitle

      public void setFrameTitle(String value)
      Sets the frame title to use.
      Parameters:
      value - the title for the detached frame
    • getFrameTitle

      public String getFrameTitle()
      Returns the frame title to use.
      Returns:
      the title fro the detached frame
    • cleanUp

      public void cleanUp()
      Cleans up data structures, frees up memory.