org.jvnet.lafwidget.tabbed
Class TabPagerManager

java.lang.Object
  extended by org.jvnet.lafwidget.tabbed.TabPagerManager

public class TabPagerManager
extends java.lang.Object

Tab pager manager.

Author:
Kirill Grouchnikov

Nested Class Summary
 class TabPagerManager.TabPagerPreviewCallback
          Implementation of the tab preview callback for the tab pager.
 
Field Summary
protected  javax.swing.JTabbedPane currTabbedPane
          The tabbed pane that is currently paged.
protected  int currTabIndex
          Index of the central tab.
protected  javax.swing.JWindow currTabWindow
          Preview window for the central (current) tab.
static FadeKind HIDE_TAB_PAGER_FADE_KIND
          Fade kind for hiding the tab pager.
protected static TabPagerManager instance
          Singleton instance of the tab pager manager.
protected  boolean isVisible
          Indicates whether the tab pager windows are visible.
protected  int nextTabIndex
          Index of the next tab.
protected  javax.swing.JWindow nextTabWindow
          Preview window for the right (next) tab.
protected  int prevTabIndex
          Index of the previous tab.
protected  javax.swing.JWindow prevTabWindow
          Preview window for the left (previous) tab.
 
Method Summary
static TabPagerManager getPager()
          Returns the tab pager instance.
 int hide()
          Hides the tab pager windows.
 boolean isVisible()
          Returns indication whether the tab pager windows are showing.
 void page(boolean isForward)
          Flips the pages in the currently shown tabbed pane.
 void page(javax.swing.JTabbedPane tabbedPane, boolean isForward)
          Flips the pages.
static void reset()
          Resets the internal caches.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIDE_TAB_PAGER_FADE_KIND

public static final FadeKind HIDE_TAB_PAGER_FADE_KIND
Fade kind for hiding the tab pager.


instance

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


currTabbedPane

protected javax.swing.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 javax.swing.JWindow prevTabWindow
Preview window for the left (previous) tab.


currTabWindow

protected javax.swing.JWindow currTabWindow
Preview window for the central (current) tab.


nextTabWindow

protected javax.swing.JWindow nextTabWindow
Preview window for the right (next) tab.


isVisible

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

Method Detail

getPager

public static TabPagerManager getPager()
Returns the tab pager instance.

Returns:
Tab pager instance.

page

public void page(javax.swing.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.