org.jvnet.lafwidget.tabbed
Class TabPagerManager.TabPagerPreviewCallback

java.lang.Object
  extended by org.jvnet.lafwidget.tabbed.TabPagerManager.TabPagerPreviewCallback
All Implemented Interfaces:
TabPreviewThread.TabPreviewCallback
Enclosing class:
TabPagerManager

public class TabPagerManager.TabPagerPreviewCallback
extends java.lang.Object
implements TabPreviewThread.TabPreviewCallback

Implementation of the tab preview callback for the tab pager.

Author:
Kirill Grouchnikov.

Constructor Summary
TabPagerManager.TabPagerPreviewCallback(javax.swing.JWindow previewWindow, javax.swing.JTabbedPane tabPane, int tabIndex)
          Creates a new tab preview callback for the tab pager.
 
Method Summary
 void offer(javax.swing.JTabbedPane tabPane, int tabIndex, java.awt.image.BufferedImage componentSnap)
          Offers the preview image (thumbnail) of a tab in the specified tabbed pane.
 void start(javax.swing.JTabbedPane tabPane, int tabCount, TabPreviewThread.TabPreviewInfo tabPreviewInfo)
          Starts the current cycle of TabPreviewThread.TabPreviewCallback.offer(JTabbedPane, int, BufferedImage) calls.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabPagerManager.TabPagerPreviewCallback

public TabPagerManager.TabPagerPreviewCallback(javax.swing.JWindow previewWindow,
                                               javax.swing.JTabbedPane tabPane,
                                               int tabIndex)
Creates a new tab preview callback for the tab pager.

Parameters:
previewWindow - The associated preview window.
tabPane - The associated tab preview control.
tabIndex - Tab index.
Method Detail

start

public void start(javax.swing.JTabbedPane tabPane,
                  int tabCount,
                  TabPreviewThread.TabPreviewInfo tabPreviewInfo)
Description copied from interface: TabPreviewThread.TabPreviewCallback
Starts the current cycle of TabPreviewThread.TabPreviewCallback.offer(JTabbedPane, int, BufferedImage) calls. This can be used by the implementing class to revalidate itself in case the tab count in the specified tabbed pane has changed since the previous cycle of TabPreviewThread.TabPreviewCallback.offer(JTabbedPane, int, BufferedImage) call.

Specified by:
start in interface TabPreviewThread.TabPreviewCallback
Parameters:
tabPane - Tabbed pane.
tabCount - Tab count in the tabbed pane.
tabPreviewInfo - Tab preview info. Can be changed in the implementation code.

offer

public void offer(javax.swing.JTabbedPane tabPane,
                  int tabIndex,
                  java.awt.image.BufferedImage componentSnap)
Description copied from interface: TabPreviewThread.TabPreviewCallback
Offers the preview image (thumbnail) of a tab in the specified tabbed pane.

Specified by:
offer in interface TabPreviewThread.TabPreviewCallback
Parameters:
tabPane - Tabbed pane.
tabIndex - Tab index.
componentSnap - Tab preview image.