Class TabPreviewWindow

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer

public class TabPreviewWindow extends JWindow implements ActionListener
Tab preview window. Is displayed when the mouse hovers over relevant (previewable) tabs.
See Also:
  • Field Details

    • instance

      protected static TabPreviewWindow instance
      Singleton instance of tab preview window.
    • currTabPreviewInfo

      protected static TabPreviewThread.TabPreviewInfo currTabPreviewInfo
      Information on the current tab preview request.
    • currTabPreviewTimer

      protected static Timer currTabPreviewTimer
      Currently running timer task.
  • Constructor Details

    • TabPreviewWindow

      public TabPreviewWindow()
  • Method Details

    • getInstance

      public static TabPreviewWindow getInstance()
      Returns the singleton instance of tab preview window.
      Returns:
      The singleton instance of tab preview window.
    • postPreviewRequest

      public void postPreviewRequest(JTabbedPane tabPane, int tabIndex)
      Posts a preview request for a tab component in the specified tabbed pane.
      Parameters:
      tabPane - Tabbed pane.
      tabIndex - Index of the tab to preview.
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • getPreviewWindowScreenRect

      protected Rectangle getPreviewWindowScreenRect(JTabbedPane tabPane, int tabIndex, int pWidth, int pHeight)
      Returns the screen rectangle for the preview window.
      Parameters:
      tabPane - Tabbed pane.
      tabIndex - Tab index.
      pWidth - Preview width.
      pHeight - Preview height.
      Returns:
      The screen rectangle for the preview window.
    • cancelPreviewRequest

      public static void cancelPreviewRequest()
      Cancels the currently pending preview request.