com.sun.lwuit.animations
Class Transition3D

java.lang.Object
  extended by com.sun.lwuit.animations.Transition
      extended by com.sun.lwuit.animations.Transition3D
All Implemented Interfaces:
Animation

public final class Transition3D
extends Transition

Transitions utilizing the M3G API for 3D effects, this transition requires M3G (JSR 184) support on the device in order to work properly. Currently none of these transitions work with dialogs or any component type that is not a form


Method Summary
 boolean animate()
          Allows the animation to reduce "repaint" calls when it returns false.
 void cleanup()
          Optional operation to cleanup the garbage left over by a running transition
 Transition copy()
           
static Transition3D createCube(int duration, boolean rotateRight)
          Creates a cube rotation transition from the current form to the next form
static Transition3D createFlyIn(int duration)
          Creates a fly in transition object.
static Transition3D createRotation(int duration, boolean rotateRight)
          Creates a rotation transition from the current form to the next form
static Transition3D createStaticRotation(int duration, boolean rotateRight)
          Creates a rotation transition from the current form to the next dialog, in this rotation only the dialog will rotate and the form will remain static
static Transition3D createSwingIn(int duration)
          Creates a rotation transition from the top to the bottom giving a feeling of Swinging into place
static Transition3D createSwingIn(int duration, boolean topDown)
          Creates a rotation transition from the top to the bottom giving a feeling of Swinging into place
static Transition3D createVerticalCube(int duration, boolean rotateDown)
          Creates a cube rotation transition from the current form to the next form
 void initTransition()
          Callback thats invoked before a transition begins, the source form may be null for the first form in the application.
 boolean isHighQualityMode()
          High quality mode renders the transition using smoother graphics but can take a whole lot more memory per texture and bitmap resulting in a likely out of memory error on high resolution/low memory devices with complex UI elements.
 void paint(Graphics g)
          Draws the animation, within a component the standard paint method would be invoked since it bares the exact same signature.
 void setHighQualityMode(boolean highQualityMode)
          High quality mode renders the transition using smoother graphics but can take a whole lot more memory per texture and bitmap resulting in a likely out of memory error on high resolution/low memory devices with complex UI elements.
static void setMaxTextureDimension(int size)
          Allows performance/memory sensitive devices to define a maximum size for the texture thus increasing performance on the expense of quality.
 
Methods inherited from class com.sun.lwuit.animations.Transition
cleanSource, copy, getDestination, getSource, init
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

cleanup

public void cleanup()
Description copied from class: Transition
Optional operation to cleanup the garbage left over by a running transition

Overrides:
cleanup in class Transition

setMaxTextureDimension

public static void setMaxTextureDimension(int size)
Allows performance/memory sensitive devices to define a maximum size for the texture thus increasing performance on the expense of quality.

Parameters:
size -

createRotation

public static Transition3D createRotation(int duration,
                                          boolean rotateRight)
Creates a rotation transition from the current form to the next form

Parameters:
duration - duration in milliseconds of the transition
rotateRight - indicates rotating towards the right side or the left side true == right
Returns:
newly created transition object

createStaticRotation

public static Transition3D createStaticRotation(int duration,
                                                boolean rotateRight)
Creates a rotation transition from the current form to the next dialog, in this rotation only the dialog will rotate and the form will remain static

Parameters:
duration - duration in milliseconds of the transition
rotateRight - indicates rotating towards the right side or the left side true == right
Returns:
newly created transition object

createSwingIn

public static Transition3D createSwingIn(int duration)
Creates a rotation transition from the top to the bottom giving a feeling of Swinging into place

Parameters:
duration - duration in milliseconds of the transition
Returns:
new transtion object

createSwingIn

public static Transition3D createSwingIn(int duration,
                                         boolean topDown)
Creates a rotation transition from the top to the bottom giving a feeling of Swinging into place

Parameters:
duration - duration in milliseconds of the transition
topDown - indicates rotating downwards or upwards
Returns:
new transtion object

createCube

public static Transition3D createCube(int duration,
                                      boolean rotateRight)
Creates a cube rotation transition from the current form to the next form

Parameters:
duration - duration in milliseconds of the transition
rotateRight - indicates rotating towards the right side or the left side true == right
Returns:
newly created transition object

createVerticalCube

public static Transition3D createVerticalCube(int duration,
                                              boolean rotateDown)
Creates a cube rotation transition from the current form to the next form

Parameters:
duration - duration in milliseconds of the transition
rotateDown - indicates rotating towards the upper side when true
Returns:
newly created transition object

createFlyIn

public static Transition3D createFlyIn(int duration)
Creates a fly in transition object.

Parameters:
duration - duration in milliseconds of the transition
Returns:
newly created transition object

copy

public Transition copy()

animate

public boolean animate()
Description copied from interface: Animation
Allows the animation to reduce "repaint" calls when it returns false. It is called once for every frame. Frames are defined by the Display class.

Specified by:
animate in interface Animation
Specified by:
animate in class Transition
Returns:
true if a repaint is desired or false if no repaint is necessary

paint

public void paint(Graphics g)
Description copied from interface: Animation
Draws the animation, within a component the standard paint method would be invoked since it bares the exact same signature.

Specified by:
paint in interface Animation
Specified by:
paint in class Transition
Parameters:
g - graphics context

initTransition

public void initTransition()
Description copied from class: Transition
Callback thats invoked before a transition begins, the source form may be null for the first form in the application.

Overrides:
initTransition in class Transition

isHighQualityMode

public boolean isHighQualityMode()
High quality mode renders the transition using smoother graphics but can take a whole lot more memory per texture and bitmap resulting in a likely out of memory error on high resolution/low memory devices with complex UI elements.

Returns:
whether this is high quality rendering mode

setHighQualityMode

public void setHighQualityMode(boolean highQualityMode)
High quality mode renders the transition using smoother graphics but can take a whole lot more memory per texture and bitmap resulting in a likely out of memory error on high resolution/low memory devices with complex UI elements.

Parameters:
highQualityMode - indicates whether this is the high quality mode