Class Transition
- All Implemented Interfaces:
Animation
- Direct Known Subclasses:
BubbleTransition, CommonTransitions, FlipTransition, MorphTransition
com.codename1.ui.Form object using the in/out transitions, for ease of use
com.codename1.ui.plaf.LookAndFeel has support for default transitions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleananimate()Allows the animation to reduce "repaint" calls when it returns false.protected final voidAllows setting the source form to null to save memory if the transition doesn't need it in memory.voidcleanup()Optional operation to cleanup the garbage left over by a running transitioncopy(boolean reverse) Create a copy of the transition, usually the transition used is a copy.final ComponentReturns the destination form that should be set once animation is completedfinal ComponentReturns the source form which is the form from which the animation is starting.protected voidSets visibility on all shared InterFormContainers between the source and destination to be hidden.final voidInvoked bycom.codename1.ui.Displayto set the source and destination forms.voidCallback thats invoked before a transition begins, the source form may be null for the first form in the application.abstract voidDraws the animation, within a component the standard paint method would be invoked since it bares the exact same signature.protected voidPaints all shared InterFormContainers between the source and destination.protected voidSets visibility on all shared InterFormContainers between the source and destination to be visible.
-
Constructor Details
-
Transition
public Transition()
-
-
Method Details
-
init
Invoked by
com.codename1.ui.Displayto set the source and destination forms. This method should not be invoked by developers.Parameters
-
source: the source form from which the transition originates -
destination: the destination form to which the transition will lead
-
-
hideInterformContainers
protected void hideInterformContainers()Sets visibility on all shared InterFormContainers between the source and destination to be hidden. This is useful since these containers are not transitioned like the rest of components, so the transition may need to be able to paint the source or destination without these containers, and paint them separately.
Since
7.0
-
showInterformContainers
protected void showInterformContainers()Sets visibility on all shared InterFormContainers between the source and destination to be visible. This is useful since these containers are not transitioned like the rest of components, so the transition may need to be able to paint the source or destination without these containers, and paint them separately.
Since
7.0
-
paintInterformContainers
Paints all shared InterFormContainers between the source and destination.
Parameters
g: Graphics context to paint to.
Since
7.0
-
initTransition
public void initTransition()Callback thats invoked before a transition begins, the source form may be null for the first form in the application. -
getDestination
Returns the destination form that should be set once animation is completed
Returns
the destination component
-
getSource
Returns the source form which is the form from which the animation is starting. This may be null for the first form in the application
Returns
the source component
-
cleanup
public void cleanup()Optional operation to cleanup the garbage left over by a running transition -
copy
Create a copy of the transition, usually the transition used is a copy.
Parameters
reverse: @param reverse creates a new transition instance with "reverse" behavior useful for signifying "back" operations
Returns
new transition instance
-
cleanSource
protected final void cleanSource()Allows setting the source form to null to save memory if the transition doesn't need it in memory. -
animate
public abstract boolean animate()Allows the animation to reduce "repaint" calls when it returns false. It is called once for every frame. Frames are defined by the
com.codename1.ui.Displayclass.Returns
true if a repaint is desired or false if no repaint is necessary
-
paint
-