Animations are the things that make [JSup Graphic objects|graphic objects] active to display data/status/history etc. or receive some user input or commands.
Most of the animations have a [JSup Code|code] that defines a value or a condition (true/false) the animation use to determine its state. When the [JSup Code|code] associated with the animation changes, then the animation is updated.
[img:///img/JSup/ObjectAnimations-small.png|left|margin=10 width=200|]To '''add/edit animation''' of [JSup editor object selection and navigation|selected] [JSup Graphic objects|graphic object] use the [img:///img/JSup/animation.gif] toolbar button or the ''Enter'' key to open the '''[JSup Animation dialog|Object animation dialog]''' which enable to add and edit the animation allowed for the [JSup editor object selection and navigation|selected] [JSup Graphic objects|graphic object].
To quickly edit the tag used by the animations of an [JSup Graphic objects|object] see [JSup editing graphic object tags|'''Editing graphic object tags'''].
= Type of animations =
A brief description for every type of animation that [JSup] provides. For more detail (where no animation specific page is available) use the [JSup specific animation dialog|specific animation dialog] [JSup editor tooltip|tooltip].
=== Various ===
* [JSup Visible animation|'''Visible''']: define when an object has to be visible and when to hidden ([JSup Delayable animation|delayable]).
* [JSup Opacity animation|'''Opacity''']: define how opaque or transparent the object has to be ([JSup Smoothable animation|smoothable]).
* [JSup Blink animation|'''Blink''']: define when and how the object has to blink.
* [JSup Enable animation|'''Enable''']: define when the object have to receive user inputs and when not ([JSup Delayable animation|delayable]).
* [JSup Rotation animation|'''Rotation''']: define how/when the object has to rotate ([JSup Smoothable animation|smoothable]).
=== Action ===
These animations are '''disabled''' when an [JSup Enable animation|Enable animation] on the same [JSup Graphic objects|object] or a containing [JSup Binders|binder] tells to disable them.
* [JSup Action animation|'''Action''']: define a piece of [JSup Code|code] that will be executed when the user click over the object (or press the given [JSup runtime shortcuts|shortcut], if any) ([JSup Secureable animation|secureable]).
* [JSup Show win animation|'''Show win''']: define which [JSup graphic windows|windows] will be displayed when the user clicks over the object (or press the given [JSup runtime shortcuts|shortcut], if any) ([JSup Secureable animation|secureable]).
* [JSup Hide win animation|'''Hide win''']: define which [JSup graphic windows|windows] will be hidden when the user clicks over the object (or press the given [JSup runtime shortcuts|shortcut], if any) ([JSup Secureable animation|secureable]).
* [JSup Tooltip animation|'''Tooltip''']: a piece of [JSup Code|code] that return the [wikipedia:tooltip] string that will be displayed when the user points the animated [JSup Graphic objects|object] with the mouse cursor.
* [JSup Locale tip animation|'''Locale tip''']: Define a default language tip and many localized version of that tip (for [JSup Multilanguage support|multi language application]), the displayed tip will depend of the [JSup current locale].
=== User input ===
Available for [JSup Java GUI objects|Java GUI objects] only. These animations are '''disabled''' when an [JSup Enable animation|Enable animation] on the same [JSup Graphic objects|object] or a containing [JSup Binders|binder] tells to disable them.
* [JSup Number input animation|'''Number input''']: enable the user to enter a number in the [JSup TextField|Text field]/[JSup TextArea|Text area]. Min/max can be specified, the [JSup number format|format] is the static string of the [JSup Graphic objects|object] ([JSup Secureable animation|secureable]). See [JavaCode tip and tricks#Tag references|JavaCode tag references].
* [JSup String input animation|'''String input''']: enable the user to enter a string in the [JSup TextField|Text field]/[JSup TextArea|Text area]. Max length can be specified ([JSup Secureable animation|secureable]). See [JavaCode tip and tricks#Tag references|JavaCode tag references].
* [JSup Custom input animation|'''Custom input''']: a special animation for [JSup TextField|Text field]/[JSup TextArea|Text area] that provides a custom output code, used to display the value, and a custom input parser code that processes the user input ([JSup Secureable animation|secureable]). See the [standard JSup Trend window] (the ''trend length'' field) for an example of this kind of animation.
* [JSup Boolean input animation|'''Boolean input''']: connects a [JSup Checkbox|Checkbox] with a [JSup Tag type|boolean] [JSup tag|tag] value (see [JavaCode tip and tricks#Tag references|JavaCode tag references]). When the user changes the checkbox selection state the value of the tag is changed, and when the tag is elsewhare changed the checkbox state is updated ([JSup Secureable animation|secureable]).
* [JSup List animation|'''List input''']: provides the content (the [http://java.sun.com/javase/6/docs/api/javax/swing/ListModel.html|model]) of a [JSup list|list] object ([JSup Secureable animation|secureable]). The destination tag (see [JavaCode tip and tricks#Tag references|JavaCode tag references]) can receive/provide the selected index (0 based) or the selected value. The list content can be provided in '''three ways''':
* Static: a text whose lines will be the list items.
* [JSup Tag arrays|Tag array] whose elements will be the list items.
* [http://java.sun.com/javase/6/docs/api/javax/swing/ListModel.html|Java ListModel]: a [JavaCode] returning an object that implements the [http://java.sun.com/javase/6/docs/api/javax/swing/ListModel.html|ListModel] [http://en.wikipedia.org/wiki/Interface_%28Java%29|interface].
* [JSup ComboBox input|'''Combobox input''']: provides the content (the [http://java.sun.com/javase/6/docs/api/javax/swing/ComboBoxModel.html|model]) of a [JSup Combobox|Combo box] object ([JSup Secureable animation|secureable]). The destination tag (see [JavaCode tip and tricks#Tag references|JavaCode tag references]) can receive/provide the selected index (0 based) or the selected value. The combo box can be editable so the user can both select or type the desired value. The combo box content can be provided in '''three ways''':
* Static: a text whose lines will be the combo items.
* [JSup Tag arrays|Tag array] whose elements will be the combo items.
* [http://java.sun.com/javase/6/docs/api/javax/swing/ComboBoxModel.html|Java ComboBoxModel]: a [JavaCode] returning an object that implements the [http://java.sun.com/javase/6/docs/api/javax/swing/ComboBoxModel.html|ComboBoxModel] [http://en.wikipedia.org/wiki/Interface_%28Java%29|interface].
* [JSup TreeCombo animation|'''Tree combo''']: a piece of code that have to initialize a [JSup TreeCombo|Tree Combo] object by calling the setModel() or setRoot() methods. This animation can be used to provide the user the possibility to select an [JSup alarm groups|alarm group] (with the getAlarmGroupTreeNodeProvider() utility function) or a [JSup security groups|security group] (with the getSecurityGroupTreeNodeProvider() utility function). This is a [JSup Secureable animation|secureable] animation.
* [JSup CalendarCombo animation|'''Calendar combo'''] enable the user to select, in [JSup CalendarCombo|Calendar combo], a date and to assign it to a [JSup Tag type|long tag] (as millisecond from midnight, 01 January 1970, as [http://java.sun.com/javase/6/docs/api/java/lang/System.html#currentTimeMillis()|System.currentTimeMillis()] in [http://java.sun.com/javase/6/docs/api/index.html|Java API]) or an [JSup Tag type|object tag] of [http://java.sun.com/javase/6/docs/api/java/util/Date.html|Date] or [http://java.sun.com/javase/6/docs/api/java/util/Calendar.html|Calendar] type (see [JavaCode tip and tricks#Tag references|JavaCode tag references]). The output of the [JSup CalendarCombo|Calendar combo] object can be formatted with standard (Short/Medium/Long/Full) localized format or with a custom format (see the [http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html|java.text.SimpleDateFormat] class documentation).
* [JSup Alarm display animation|'''Alarm display'''] enable a [JSup Table|table] object to display real time [JSup tag alarms|alarms] for the given [JSup alarm groups|alarm groups] and with the selected column.
* [JSup TableModel animation|'''Java TableModel'''] a way to provide the content of [JSup Table] object. The [JavaCode] must return an object that implements the [http://java.sun.com/javase/6/docs/api/javax/swing/table/TableModel.html|javax.swing.table.TableModel] interface. The [JavaCode] have the access to the [http://java.sun.com/javase/6/docs/api/javax/swing/JTable.html|JTable] object that will display the table content via the table parameter. The '''column widths''' can also be provided by the animation, see the [JSup editor tooltip|tooltip] for the help.
* [JSup Slider animation|'''Slider'''] links the value of a [JSup Tag type|numeric tag] (see [JavaCode tip and tricks#Tag references|JavaCode tag references]) to a [JSup Slider|slider] object, so the user can set the value of the tag with the mouse. Min/max values can be constant or dynamic expressions; the same for the optional maj/min tick expression fields. ([JSup Secureable animation|secureable])
* [JSup Spinner animation|'''Spinner'''] link the value of a [JSup Tag type|numeric tag] (see [JavaCode tip and tricks#Tag references|JavaCode tag references]) to a [JSup Spinner|spinner] object, so the user can set the value of the tag with the mouse (by clicking the up/down arrow) or by type the value in the text field. Min/max and step values can be constant or dynamic expressions; the format specify the how the [JSup tag|tag] value will be displayed, see [http://java.sun.com/javase/6/docs/api/java/text/DecimalFormat.html|DecimalFormat class documentation] for more information about the format. ([JSup Secureable animation|secureable] animation)
=== Output ===
* [JSup Number output animation|'''Number'''] make the [JSup Graphic objects|graphic objects] to display the numeric value provided by the [JSup Code|code]. The format of the displayed numeric value is the static text of [JSup Graphic objects|graphic objects].
* [JSup String output animation|'''String'''] displays the string value of the [JSup tag|tag]/expression provided by the code. This animation has the ability to display the value of a [JSup Tag type|numeric tag] as a [JSup Multilanguage support|localized] string using the [JSup Using tag properties|tag properties].
* [JSup Localized animation|'''Localized'''] displays a [JSup Multilanguage support|localized] static text. The default version of the text is the static [JSup text editing|text] of the [JSup Graphic objects|graphic objects], you can add [JSup Multilanguage support|localized] versions of the text for every language you want (select the language in main/all language lists and click the ''Add'' button the add the proper [http://en.wikipedia.org/wiki/Language_code|language code] (lower-case, two-letter codes as defined by [wikipedia:ISO 639] standard). Enter the localized version of the text at the right of the '=' simbol.
* [JSup Progress bar animation|'''Progress bar'''] animation display a progress status in a [JSup progress bar|progress bar] object. Min/max values can be constant or dynamic expressions.
* [JSup Tabbed pane animation|'''Tabbed pane'''] enable to display multiple [JSup graphic windows|windows] in a multi tab frame. Optionally a [JSup tag|tag] can be linked to the index of the active tab (to receive/control the active tab).
* [JSup Image animation|'''Image''']: the [JavaCode] provides a dinamic [http://java.sun.com/javase/6/docs/api/java/awt/Image.html|java.awt.Image] object to be displayed in a [JSup Image|image]/[JSup Button|button] object.
* [JSup URL animation|'''URL'''] to set/get the [wikipedia:URL] of a [JSup HTML area|HTML area] object.
=== Special ===
* [JSup Point location animation|'''Point location''']: the [JavaCode] returns a [http://java.sun.com/javase/6/docs/api/java/awt/geom/Point2D.html|Point2D] array with the dynamic [JSup Multipoint objects|Multipoint object] point coordinates.
* [JSup Java Shape animation|'''Java Shape'''] animation define which is the [http://java.sun.com/javase/6/docs/api/java/awt/Shape.html|Shape] of a [JSup Java Shape|Java Shape] object. This animation/object couple is a way to use the generic Java [http://java.sun.com/javase/6/docs/api/java/awt/Shape.html|Shape] interface to draw an object which has other standard [JSup Graphic editor#Graphic object attributes|object attributes] ([JSup line color|line]/[JSup fill color|fill color], [JSup stroke|stroke] and related animations).
* [JSup Java paint animation|'''Java paint'''] animation defines the way a [JSup Java Paint|Java Paint] object is painted. The animation [JavaCode] receives the parameter a [http://java.sun.com/javase/6/docs/api/java/awt/Graphics2D.html|java.awt.Graphics2D] object where to paint. For an example of this object/animation couple see the [standard JSup Trend window]: the time axis ticks and labels are painted in this way.
=== Border/fill color ===
These animation define the [JSup line color|line color] of the [JSup Graphic objects|object] or its [JSup fill color|fill color].
* [JSup Binary color animations|'''Binary color'''] define a [JSup boolean values|boolean value] and two [JSup paints|paints]: one that will be used when the expression is false, and one when it's true.
* [JSup Thresholds color animations|'''Thresholds color'''] define numeric [JSup tag|tag]/expression whose value will be compared with a value/[JSup paints|paint] table to find which is the [JSup paints|paint] to be used. See [JSup Thresholds color animations|Thresholds color animations] for more details.
* [JSup Java Paint animations|'''Java Paint''']: the [JavaCode] provides a generic Java object that implements the standard [http://java.sun.com/javase/6/docs/api/java/awt/Paint.html|java.awt.Paint] interface to be used to paint the [JSup Graphic objects|object].
* [JSup Bargraph animation|'''Bargraph'''] ([JSup fill color|fill] only): the value of the ''bargraph expression'' is used to draw the [http://en.wikipedia.org/wiki/Bargraph|bargraph] with various parameter/color/options that can be used in the ''Bargraph animation dialog''. Read the [JSup editor tooltip|tooltips] in dialog for more detailed information.
* [JSup Trend animation|'''Trend'''] ([JSup fill color|fill] only): this animation enable an [JSup Graphic objects|object] to display [JSup Trend|historical trends]. Many tag / expression can be given to set/get various parameters.
=== Move/Size ===
'''Movement''':
* [JSup Horizontal move animation|'''Horizontal'''] a [JSup Smoothable animation|smoothable animation] that can move the [JSup graphic objects|object] horizontally for the given number of pixel (left and right) in proportion to the expression value (between left/right value range).
* [JSup Vertical move animation|'''Vertical'''] a [JSup Smoothable animation|smoothable animation] that can move the [JSup graphic objects|object] vertically for the given number of pixel (up and down) in proportion to the expression value (between up/down value range).
'''Resize''':
* [JSup Horizontal size animation|'''Horizontal'''] a [JSup Smoothable animation|smoothable animation] that can reduce the width of the [JSup graphic objects|object] in proportion to the expression value (between min/max value range). The width cannot be increased with this animation, use an [JSup Affine transform animation|Affine transform animation] to increase it.
* [JSup Vertical size animation|'''Vertical'''] a [JSup Smoothable animation|smoothable animation] that can reduce the height of the [JSup graphic objects|object] in proportion to the expression value (between min/max value range). The height cannot be increased with this animation, use an [JSup Affine transform animation|Affine transform animation] to increase it.
'''Special:'''
* [JSup Affine transform animation|'''Affine transformation''']: a very advanced animation where the [JavaCode] provides a [http://java.sun.com/javase/6/docs/api/java/awt/geom/AffineTransform.html|java.awt.geom.AffineTransform] object that will performs a linear mapping from 2D coordinates to other 2D coordinates of the [JSup Graphic objects|object] that preserves the "straightness" and "parallelness" of lines. Affine transformations can be constructed using sequences of translations, scales, flips, rotations, and shears. ([JSup Smoothable animation|smoothable])