Class AnimationEvent
java.lang.Object
com.codename1.ui.events.ActionEvent
com.codename1.ui.events.AnimationEvent
An event reported by an interactive animated image, such as a Rive
animation, delivered to the listeners added with
Image.addAnimationListener(ActionListener).
The animation designer names each event and may attach custom properties
to it. An event of type TYPE_OPEN_URL asks the application to open
getUrl(); nothing is opened on its behalf.
-
Nested Class Summary
Nested classes/interfaces inherited from class ActionEvent
ActionEvent.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA general event.static final intAn event asking the application to open a URL, seegetUrl(). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()The name the designer gave the event.The custom properties of the event by name: aFloatfor a number, aBooleanor aString.The browser target of an open-URL event:_blank,_parent,_selfor_top.intgetType()The kind of event,TYPE_GENERALorTYPE_OPEN_URL.getUrl()The URL of an open-URL event.toString()Returns a string representation of the object.Methods inherited from class ActionEvent
consume, getActualComponent, getCommand, getComponent, getDraggedComponent, getDropTarget, getEventType, getKeyEvent, getPointerEvent, getProgress, getSource, getX, getY, isConsumed, isLongEvent, isPointerPressedDuringDrag, setPointerEvent, setPointerPressedDuringDrag
-
Field Details
-
TYPE_GENERAL
public static final int TYPE_GENERALA general event.- See Also:
-
TYPE_OPEN_URL
public static final int TYPE_OPEN_URLAn event asking the application to open a URL, seegetUrl().- See Also:
-
-
Constructor Details
-
AnimationEvent
public AnimationEvent(Object source, String name, int type, String url, String target, Map<String, Object> properties) Creates an event.
Parameters
source: the image that reported the eventname: the name the designer gave the eventtype:TYPE_GENERALorTYPE_OPEN_URLurl: the URL of an open-URL event, or nulltarget: the browser target of an open-URL event, or nullproperties: the custom properties of the event, or null for none
-
-
Method Details
-
getName
The name the designer gave the event.
Returns
the name, never null
-
getType
public int getType() -
getUrl
The URL of an open-URL event.
Returns
the URL, or null for a general event
-
getTarget
The browser target of an open-URL event:
_blank,_parent,_selfor_top.Returns
the target, or null for a general event
-
getProperties
-
toString
Description copied from class:ObjectReturns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
-