站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

FxProvider (Tab Control) - NetBeans API Javadoc (Current Development Version)

org.netbeans.swing.tabcontrol 1.8

org.netbeans.swing.tabcontrol.plaf
Class FxProvider

java.lang.Object
  extended by org.netbeans.swing.tabcontrol.plaf.FxProvider

public abstract class FxProvider
extends Object

Class which can provide sliding or other eye-candy effects as a component is displayed. To use, subclass TabbedContainerUI and create an instance in createFxProvider. The abstract doFinish() method is expected to call TabbedContainerUI.showComponent(), so this is best implemented as an inner class of a TabbbedContainerUI implementation.


Field Summary
protected  JComponent comp
           
protected  Object orientation
           
protected  JRootPane root
           
 
Constructor Summary
FxProvider()
          Creates a new instance of FxProvider
 
Method Summary
 void abort()
          Abort a running effect, so that finish will never be called.
abstract  void cleanup()
          Clean up any artifacts of the effect, shut down timers, etc.
protected abstract  void doFinish()
          Finish the operation - this method should be implemented to actually install the component and leave the displayer in its final state
protected abstract  void doStart()
          Implement whatever is needed to begin running the effect - starting a timer, playing with the glass pane, creating offscreen images, etc., here
 void finish()
          Perform any cleanup necessary and complete the effect.
 boolean isRunning()
          Determine if an effect is currently running
 void start(JComponent comp, JRootPane root, Object orientation)
          Start the effect running.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

comp

protected JComponent comp

root

protected JRootPane root

orientation

protected Object orientation
Constructor Detail

FxProvider

public FxProvider()
Creates a new instance of FxProvider

Method Detail

start

public final void start(JComponent comp,
                        JRootPane root,
                        Object orientation)
Start the effect running. This method will set up the fields with the passed values, set the running flag, and then call doStart(). If isRunning() is true, calls abort() before initializing.


finish

public final void finish()
Perform any cleanup necessary and complete the effect. Sets the running flag to false, calls doFinish() (in which the implementation should call showComponent() on the TabbedContainerUI to actually show the component for which an effect has been being presented. After calling finish(), it calls cleanup(). The common use case is for the effect to be painted on the window's glass pane, so the idea is to leave that onscreen while doing the work that will display the actual component, and then hide the glass pane containing the effect's product once the window is in its new state, with the component displayed.


abort

public final void abort()
Abort a running effect, so that finish will never be called. Sets the running flag to false and calls cleanup().


isRunning

public final boolean isRunning()
Determine if an effect is currently running


cleanup

public abstract void cleanup()
Clean up any artifacts of the effect, shut down timers, etc.


doStart

protected abstract void doStart()
Implement whatever is needed to begin running the effect - starting a timer, playing with the glass pane, creating offscreen images, etc., here


doFinish

protected abstract void doFinish()
Finish the operation - this method should be implemented to actually install the component and leave the displayer in its final state


org.netbeans.swing.tabcontrol 1.8

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.