Package org.eclipse.nebula.effects.stw
Class TransitionManager
java.lang.Object
org.eclipse.nebula.effects.stw.TransitionManager
public class TransitionManager
extends java.lang.Object
Transition manager applies the required transition on a 
Transitionable object.- 
Field SummaryFields Modifier and Type Field Description (package private) org.eclipse.swt.graphics.ColorbackgroundColor(package private) org.eclipse.swt.graphics.ImagebackgroundImage
- 
Constructor SummaryConstructors Constructor Description TransitionManager(Transitionable transitionable)Constructs a transition manager to handle transitions on the provided transitionable object.TransitionManager(org.eclipse.swt.custom.CTabFolder tabFolder)Constructs a transition manager to handle transitions on the providedCTabFolderas the transitionable object.TransitionManager(org.eclipse.swt.widgets.TabFolder tabFolder)Constructs a transition manager to handle transitions on the providedTabFolderas the transitionable object.
- 
Method SummaryModifier and Type Method Description voidaddTransitionListener(TransitionListener transitionListener)Adds a new transition listener to be invoked at the end of each transitionvoidclearControlImages()Clears the control images used in the transitions processing.voidfinalize()org.eclipse.swt.graphics.ColorgetBackground()Returns the background color of the transition frameorg.eclipse.swt.graphics.ImagegetBackgroundImage()Returns the background image of the transition frameTransitiongetTransition()Returns the current transition effectTransitionablegetTransitionable()Returns the transitionable objectvoidremoveTransitionListener(TransitionListener transitionListener)Removes a transition listener from the list of transition listenersvoidsetBackground(org.eclipse.swt.graphics.Color color)Sets the background color of the transition framevoidsetBackgroundImage(org.eclipse.swt.graphics.Image image)Sets the background image of the transition framevoidsetControlImages(org.eclipse.swt.graphics.Image[] images)Sets the control images used in the transitions processing.voidsetTransition(Transition transition)Sets and changes the transition effectvoidstartTransition(int fromIndex, int toIndex, double direction)Carries out the transition effect on the transitionable object by transitioning fromfromIndextotoIndexin the directiondirection
- 
Field Details- 
backgroundColororg.eclipse.swt.graphics.Color backgroundColor
- 
backgroundImageorg.eclipse.swt.graphics.Image backgroundImage
 
- 
- 
Constructor Details- 
TransitionManagerConstructs a transition manager to handle transitions on the provided transitionable object.- Parameters:
- transitionable- the transitionable object to perform transitions on
 
- 
TransitionManagerpublic TransitionManager(org.eclipse.swt.custom.CTabFolder tabFolder)Constructs a transition manager to handle transitions on the providedCTabFolderas the transitionable object.- Parameters:
- tabFolder- the- CTabFolderas the transitionable object to perform transitions on
 
- 
TransitionManagerpublic TransitionManager(org.eclipse.swt.widgets.TabFolder tabFolder)Constructs a transition manager to handle transitions on the providedTabFolderas the transitionable object.- Parameters:
- tabFolder- the- TabFolderas the transitionable object to perform transitions on
 
 
- 
- 
Method Details- 
startTransitionpublic void startTransition(int fromIndex, int toIndex, double direction)Carries out the transition effect on the transitionable object by transitioning fromfromIndextotoIndexin the directiondirection- Parameters:
- fromIndex- the index of the- Controlto start transition from
- toIndex- the index of the- Controlto make transition to
- direction- the direction of the transition
 
- 
setControlImagespublic void setControlImages(org.eclipse.swt.graphics.Image[] images)Sets the control images used in the transitions processing. The control images are updated during the application execution. The old images are disposed during the control images update. This method should be invoked in the beginning of the application execution, to set the control images at an initial state. If this method is not invoked, the control images will be populated internally by this transition manager, but some flicks may be seen on the first transitions processing.- Parameters:
- images- Control images used in the transitions processing.
 
- 
clearControlImagespublic void clearControlImages()Clears the control images used in the transitions processing. Disposes all the images as well.
- 
finalizepublic void finalize()- Overrides:
- finalizein class- java.lang.Object
 
- 
setTransitionSets and changes the transition effect- Parameters:
- transition- the transition effect to be applied on the transitionable object
 
- 
getTransitionReturns the current transition effect- Returns:
- the current transition effect
 
- 
setBackgroundpublic void setBackground(org.eclipse.swt.graphics.Color color)Sets the background color of the transition frame- Parameters:
- color- the background color of the transition frame
 
- 
getBackgroundpublic org.eclipse.swt.graphics.Color getBackground()Returns the background color of the transition frame- Returns:
- the background color of the transition frame
 
- 
setBackgroundImagepublic void setBackgroundImage(org.eclipse.swt.graphics.Image image)Sets the background image of the transition frame- Parameters:
- image- the background image of the transition frame
 
- 
getBackgroundImagepublic org.eclipse.swt.graphics.Image getBackgroundImage()Returns the background image of the transition frame- Returns:
- the background image of the transition frame
 
- 
getTransitionableReturns the transitionable object- Returns:
- the transitionable object
 
- 
addTransitionListenerAdds a new transition listener to be invoked at the end of each transition- Parameters:
- transitionListener- the new transition listener to be invoked at the end of each transition
 
- 
removeTransitionListenerRemoves a transition listener from the list of transition listeners- Parameters:
- transitionListener- the transition listener to be removed
 
 
-