java.lang.Object
org.pushingpixels.radiance.theming.extras.internal.tabbed.TabPagerManager

public class TabPagerManager extends Object
Tab pager manager.
  • Field Details

    • instance

      protected static TabPagerManager instance
      Singleton instance of the tab pager manager.
    • currTabbedPane

      protected JTabbedPane currTabbedPane
      The tabbed pane that is currently paged.
    • currTabIndex

      protected int currTabIndex
      Index of the central tab.
    • nextTabIndex

      protected int nextTabIndex
      Index of the next tab.
    • prevTabIndex

      protected int prevTabIndex
      Index of the previous tab.
    • prevTabWindow

      protected JWindow prevTabWindow
      Preview window for the left (previous) tab.
    • currTabWindow

      protected JWindow currTabWindow
      Preview window for the central (current) tab.
    • nextTabWindow

      protected JWindow nextTabWindow
      Preview window for the right (next) tab.
    • isVisible

      protected boolean isVisible
      Indicates whether the tab pager windows are visible.
  • Constructor Details

    • TabPagerManager

      private TabPagerManager()
      Constructs a new tab pager manager. Is made private to enforce single instance.
  • Method Details

    • getPager

      public static TabPagerManager getPager()
      Returns the tab pager instance.
      Returns:
      Tab pager instance.
    • recomputeBounds

      private void recomputeBounds()
      Recomputes the bounds of tab pager windows.
    • setTabbedPane

      private void setTabbedPane(JTabbedPane jtp)
      Sets the tabbed pane on this tab pager manager.
      Parameters:
      jtp - Tabbed pane to page.
    • page

      public void page(JTabbedPane tabbedPane, boolean isForward)
      Flips the pages.
      Parameters:
      tabbedPane - Tabbed pane.
      isForward - if true, the tabs are flipped one page (tab) forward, if false, the tabs are flipped one page (tab) backward.
    • page

      public void page(boolean isForward)
      Flips the pages in the currently shown tabbed pane.
      Parameters:
      isForward - if true, the tabs are flipped one page (tab) forward, if false, the tabs are flipped one page (tab) backward.
    • isVisible

      public boolean isVisible()
      Returns indication whether the tab pager windows are showing.
      Returns:
      true if the tab pager windows are visible, false otherwise.
    • hide

      public int hide()
      Hides the tab pager windows.
      Returns:
      The index of the center (current) tab.
    • reset

      public static void reset()
      Resets the internal caches.