PenProfile 2.x

com.livescribe.display
Class Transition

java.lang.Object
  extended by com.livescribe.display.Transition

public abstract class Transition
extends Object

Transition encapsulates screen transition. It is a framework class that must be extended to implement various transitions. The platform provides DEFAULT, RIGHT_TO_LEFT and LEFT_TO_RIGHT concrete implementations. New transitions can be created by extending this class and provide implementation for execute(Image, Image, Graphics) method.

The Transition should be set on the Display using Display.setTransition(Transition) method before the Displyable is shown.


Field Summary
static Transition DEFAULT
          Default transtion which swaps one screen on top of the other.
static Transition LEFT_TO_RIGHT
          Transition that goes from left to right.
static Transition RIGHT_TO_LEFT
          Transtion that goes from right to left.
 
Constructor Summary
protected Transition()
          Construct a Transition instance.
 
Method Summary
protected abstract  void execute(Image outgoingFrame, Image incomingFrame, Graphics graphics)
          Execute the transition.
protected  void updateDisplay()
          Update the Display with the current contents of the composite surface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final Transition DEFAULT
Default transtion which swaps one screen on top of the other.


RIGHT_TO_LEFT

public static final Transition RIGHT_TO_LEFT
Transtion that goes from right to left.


LEFT_TO_RIGHT

public static final Transition LEFT_TO_RIGHT
Transition that goes from left to right.

Constructor Detail

Transition

protected Transition()
Construct a Transition instance.

Method Detail

updateDisplay

protected final void updateDisplay()
Update the Display with the current contents of the composite surface.

Throws:
NullPointerException - if invoked not within the context of the execute(Image, Image, Graphics) method.

execute

protected abstract void execute(Image outgoingFrame,
                                Image incomingFrame,
                                Graphics graphics)
Execute the transition.

Parameters:
outgoingFrame - outgoing frame on the display
incomingFrame - incoming frame on the display
graphics - graphics of the destination surface where the composed frame must be rendered.

PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.