24.08.2013 Views

Tango ATK Tutorial

Tango ATK Tutorial

Tango ATK Tutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Tango</strong> Numeric Attribute<br />

A <strong>Tango</strong> numeric attribute can be associated to a Dyno (Dynamic Object) or to an adapted<br />

Atk Viewer (for example SimpleScalarViewer).<br />

Associated to a Dyno (Dynamic Object)<br />

As described in the previous sections a Dynamic Object (Dyno) has a specific dynamic<br />

behavior which has been defined during the drawing phase. In order to define your own<br />

behavior with a Dyno associated to a tango numeric attribute, you should define the mapping<br />

between different values of the tango attribute and the caracteristique affected by the value.<br />

You can for example associate “value intervals” to a caracteristique change. See the Dynamic<br />

Objects in Jdraw (Flash Demo).<br />

It’s important to know that the Dyno will receive at run time the numeric value of the tango<br />

attribute when it changes.<br />

Associated to an Atk Viewer (for example SimpleScalarViewer)<br />

The tango attribute will be set as the model of the AtkViewer (SimpleScalarViewer) and<br />

that’s it. All the run-time behavior is defined by the AtkViewer which is used.<br />

Some of the bean properties of the Atk Viewer are available in the extension Tab of the Jdraw<br />

properties window.<br />

User interaction<br />

When the mouse enters the graphic component associated to the tango numeric attribute, the<br />

name of the tango attribute is displayed inside a tooltip.<br />

When an object associated to the tango attribute is selected by the user at run time, <strong>ATK</strong> tries<br />

to popup a panel :<br />

If the “className” extension is defined, the class is instantiated using a constructor<br />

with a String parameter.<br />

If the “classParam” extension is defined, the string is passed as the argument to the<br />

constructor of the panel class.<br />

If the “classParam” extension is not defined, the name of the Jdraw object (which is<br />

the name of the <strong>Tango</strong> numeric attribute) is passed as the argument to the constructor<br />

of the panel class.<br />

If the “className” extension is not defined nothing happens

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!