org.eclipse.nebula.effects.stw
Class TransitionManager

java.lang.Object
  extended by org.eclipse.nebula.effects.stw.TransitionManager

public class TransitionManager
extends java.lang.Object

Transition manager applies the required transition on a Transitionable object.

Author:
Ahmed Mahran (ahmahran@gmail.com)

Constructor Summary
TransitionManager(org.eclipse.swt.custom.CTabFolder tabFolder)
          Constructs a transition manager to handle transitions on the provided CTabFolder as the transitionable object.
TransitionManager(org.eclipse.swt.widgets.TabFolder tabFolder)
          Constructs a transition manager to handle transitions on the provided TabFolder as the transitionable object.
TransitionManager(Transitionable transitionable)
          Constructs a transition manager to handle transitions on the provided transitionable object.
 
Method Summary
 void addTransitionListener(TransitionListener transitionListener)
          Adds a new transition listener to be invoked at the end of each transition
 org.eclipse.swt.graphics.Color getBackground()
          Returns the background color of the transition frame
 org.eclipse.swt.graphics.Image getBackgroundImage()
          Returns the background image of the transition frame
 Transition getTransition()
          Returns the current transition effect
 Transitionable getTransitionable()
          Returns the transitionable object
 void removeTransitionListener(TransitionListener transitionListener)
          Removes a transition listener from the list of transition listeners
 void setBackground(org.eclipse.swt.graphics.Color color)
          Sets the background color of the transition frame
 void setBackgroundImage(org.eclipse.swt.graphics.Image image)
          Sets the background image of the transition frame
 void setTransition(Transition transition)
          Sets and changes the transition effect
 void startTransition(int fromIndex, int toIndex, double direction)
          Carries out the transition effect on the transitionable object by transitioning from fromIndex to toIndex in the direction direction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransitionManager

public TransitionManager(Transitionable transitionable)
Constructs a transition manager to handle transitions on the provided transitionable object.

Parameters:
transitionable - the transitionable object to perform transitions on

TransitionManager

public TransitionManager(org.eclipse.swt.custom.CTabFolder tabFolder)
Constructs a transition manager to handle transitions on the provided CTabFolder as the transitionable object.

Parameters:
tabFolder - the CTabFolder as the transitionable object to perform transitions on

TransitionManager

public TransitionManager(org.eclipse.swt.widgets.TabFolder tabFolder)
Constructs a transition manager to handle transitions on the provided TabFolder as the transitionable object.

Parameters:
tabFolder - the TabFolder as the transitionable object to perform transitions on
Method Detail

startTransition

public void startTransition(int fromIndex,
                            int toIndex,
                            double direction)
Carries out the transition effect on the transitionable object by transitioning from fromIndex to toIndex in the direction direction

Parameters:
fromIndex - the index of the Control to start transition from
toIndex - the index of the Control to make transition to
direction - the direction of the transition

setTransition

public void setTransition(Transition transition)
Sets and changes the transition effect

Parameters:
transition - the transition effect to be applied on the transitionable object

getTransition

public Transition getTransition()
Returns the current transition effect

Returns:
the current transition effect

setBackground

public 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

getBackground

public org.eclipse.swt.graphics.Color getBackground()
Returns the background color of the transition frame

Returns:
the background color of the transition frame

setBackgroundImage

public 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

getBackgroundImage

public org.eclipse.swt.graphics.Image getBackgroundImage()
Returns the background image of the transition frame

Returns:
the background image of the transition frame

getTransitionable

public Transitionable getTransitionable()
Returns the transitionable object

Returns:
the transitionable object

addTransitionListener

public void addTransitionListener(TransitionListener transitionListener)
Adds 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

removeTransitionListener

public void removeTransitionListener(TransitionListener transitionListener)
Removes a transition listener from the list of transition listeners

Parameters:
transitionListener - the transition listener to be removed