public interface Animation

Known subtypesBannerAd, VisionCameraView, ARView, CameraView, ChartComponent, SeriesTransition, XYMultiSeriesTransition, XYSeriesTransition, XYValueSeriesTransition, Accordion, Ads, AudioRecorderComponent, ButtonList, ChatBubble, ChatInput, ChatView, CheckBoxList, ClearableTextField, FileTree, FloatingActionButton, FloatingHint, ImageViewer, InfiniteProgress, InteractionDialog, MediaPlayer, MultiButton, OnOffSwitch, OtpField, PhoneNumberField, PhoneVerification, Progress, RSSReader, RadioButtonList, ScaleImageButton, ScaleImageLabel, ShareButton, SignatureComponent, SliderBridge, SpanButton, SpanLabel, SpanMultiButton, SplitPane, StickyHeaderContainer, Switch, SwitchList, WebBrowser, LikeButton, GameView, GameSceneView, RenderView, LocationButton, MapComponent, MapView, NativeMap, TestRunnerComponent, AbstractEditorComponent, AutoCompleteTextComponent, AutoCompleteTextField, BrowserComponent, Button, Calendar, CheckBox, CodeEditor, ComboBox, CommonProgressAnimations.CircleProgress, CommonProgressAnimations.EmptyAnimation, CommonProgressAnimations.LoadingTextAnimation, CommonProgressAnimations.ProgressAnimation, Component, ComponentGroup, Container, Dialog, EditField, Form, InfiniteContainer, InputComponent, InterFormContainer, Label, List, MenuBar, PeerComponent, PickerComponent, RadioButton, RichTextArea, RichTextComponent, Sheet, SideMenuBar, Slider, SwipeableContainer, Tabs, TextArea, TextComponent, TextComponentPassword, TextField, Toolbar, Window, BubbleTransition, CommonTransitions, FlipTransition, MorphTransition, Timeline, Transition, CodeView, EditorView, RichView, HTMLComponent, ContainerList, DefaultListCellRenderer, MultiList, Scene, BaseSpinner, DateSpinner, DateTimeSpinner, GenericSpinner, NumericSpinner, Picker, TimeSpinner, Table, Tree, EmbeddedContainer, Media360View, VRView

Allows any object to react to events and draw an animation at a fixed interval. All animation methods are executed on the EDT. For simplicities sake all components are animatable, however no animation will appear unless it is explicitly registered into the parent form. In order to stop animation callbacks the animation must be explicitly removed from the form (notice that this differs from removing the component from the form!).

Methods

public abstract boolean animate()Allows the animation to reduce “repaint” calls when it returns false.
public abstract void paint(Graphics g)Draws the animation, within a component the standard paint method would be invoked since it bares the exact same signature.

Method details

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.Display class.

Returns

true if a repaint is desired or false if no repaint is necessary

paint

public abstract void paint(Graphics g)
Draws the animation, within a component the standard paint method would be invoked since it bares the exact same signature.

Parameters

g Graphics
graphics context