Class TabPagerManager
java.lang.Object
org.pushingpixels.radiance.theming.extras.internal.tabbed.TabPagerManager
Tab pager manager.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Implementation of the tab preview callback for the tab pager. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JTabbedPane
The tabbed pane that is currently paged.protected int
Index of the central tab.protected JWindow
Preview window for the central (current) tab.protected static TabPagerManager
Singleton instance of the tab pager manager.protected boolean
Indicates whether the tab pager windows are visible.protected int
Index of the next tab.protected JWindow
Preview window for the right (next) tab.protected int
Index of the previous tab.protected JWindow
Preview window for the left (previous) tab. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TabPagerManager
getPager()
Returns the tab pager instance.int
hide()
Hides the tab pager windows.boolean
Returns indication whether the tab pager windows are showing.void
page
(boolean isForward) Flips the pages in the currently shown tabbed pane.void
page
(JTabbedPane tabbedPane, boolean isForward) Flips the pages.private void
Recomputes the bounds of tab pager windows.static void
reset()
Resets the internal caches.private void
setTabbedPane
(JTabbedPane jtp) Sets the tabbed pane onthis
tab pager manager.
-
Field Details
-
instance
Singleton instance of the tab pager manager. -
currTabbedPane
The tabbed pane that is currently paged. -
currTabIndex
protected int currTabIndexIndex of the central tab. -
nextTabIndex
protected int nextTabIndexIndex of the next tab. -
prevTabIndex
protected int prevTabIndexIndex of the previous tab. -
prevTabWindow
Preview window for the left (previous) tab. -
currTabWindow
Preview window for the central (current) tab. -
nextTabWindow
Preview window for the right (next) tab. -
isVisible
protected boolean isVisibleIndicates 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
Returns the tab pager instance.- Returns:
- Tab pager instance.
-
recomputeBounds
private void recomputeBounds()Recomputes the bounds of tab pager windows. -
setTabbedPane
Sets the tabbed pane onthis
tab pager manager.- Parameters:
jtp
- Tabbed pane to page.
-
page
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:
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.
-