Class TabPagerManager
- java.lang.Object
-
- org.pushingpixels.radiance.theming.extras.internal.tabbed.TabPagerManager
-
public class TabPagerManager extends java.lang.ObjectTab pager manager.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classTabPagerManager.TabPagerPreviewCallbackImplementation of the tab preview callback for the tab pager.
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JTabbedPanecurrTabbedPaneThe tabbed pane that is currently paged.protected intcurrTabIndexIndex of the central tab.protected javax.swing.JWindowcurrTabWindowPreview window for the central (current) tab.protected static TabPagerManagerinstanceSingleton instance of the tab pager manager.protected booleanisVisibleIndicates whether the tab pager windows are visible.protected intnextTabIndexIndex of the next tab.protected javax.swing.JWindownextTabWindowPreview window for the right (next) tab.protected intprevTabIndexIndex of the previous tab.protected javax.swing.JWindowprevTabWindowPreview window for the left (previous) tab.
-
Constructor Summary
Constructors Modifier Constructor Description privateTabPagerManager()Constructs a new tab pager manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TabPagerManagergetPager()Returns the tab pager instance.inthide()Hides the tab pager windows.booleanisVisible()Returns indication whether the tab pager windows are showing.voidpage(boolean isForward)Flips the pages in the currently shown tabbed pane.voidpage(javax.swing.JTabbedPane tabbedPane, boolean isForward)Flips the pages.private voidrecomputeBounds()Recomputes the bounds of tab pager windows.static voidreset()Resets the internal caches.private voidsetTabbedPane(javax.swing.JTabbedPane jtp)Sets the tabbed pane onthistab pager manager.
-
-
-
Field Detail
-
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.
-
recomputeBounds
private void recomputeBounds()
Recomputes the bounds of tab pager windows.
-
setTabbedPane
private void setTabbedPane(javax.swing.JTabbedPane jtp)
Sets the tabbed pane onthistab pager manager.- Parameters:
jtp- Tabbed pane to page.
-
page
public void page(javax.swing.JTabbedPane tabbedPane, boolean isForward)Flips the pages.- Parameters:
tabbedPane- Tabbed pane.isForward- iftrue, the tabs are flipped one page (tab) forward, iffalse, 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- iftrue, the tabs are flipped one page (tab) forward, iffalse, the tabs are flipped one page (tab) backward.
-
isVisible
public boolean isVisible()
Returns indication whether the tab pager windows are showing.- Returns:
trueif the tab pager windows are visible,falseotherwise.
-
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.
-
-