Home
Categories
Dictionary
Download
Project Details
Changes Log
Who We Are
FAQ
License

JavaFX properties bindings



This article list the implementation-dependant bindings that have been defined on J661 on widgets properties. These bindings can be used for example to define animations on widgets.

Bindings properties

Java class Property name Property ARINC ID Property type Usage
javafx.scene.Node opacity 0xB003 float property Allows to change the opacity of a Node
javafx.scene.shape.Shape strokeWidth 0xB800 float property Allows to change the width of a Shape
javafx.scene.shape.Shape stroke 0xB8001 color property Allows to change the border color (stroke) of a Shape. See Color properties representation
javafx.scene.shape.Shape fill 0xB002 color property Allows to change the fill color of a Shape. See Color properties representation
javafx.scene.layout.Region fill 0xB002 color property Allows to change the fill color of a Region. See Color properties representation
javafx.scene.layout.Region stroke 0xB002 color property Allows to change the border color (stroke) of a Region. See Color properties representation

Color properties representation

The conversion from a float value to a Color uses the following algorithm: The value cast as int is considered to be the RGBA value of the color, with:
  • the two first bytes being the red component
  • the two next bytes being the green component
  • the two next bytes being the blue component
  • the two last bytes being the alpha component

Usage examples

Changing the border width of a rectangle

The following Definition File specifies an animation which changes the border width of a rectangle:
      <a661_widget name="gpRectangle" type="A661_GP_RECTANGLE">
         <model>
            <prop name="WidgetIdent" value="1" />
            <prop name="Anonymous" value="A661_FALSE" />
            <prop name="Visible" value="A661_TRUE" />
            <prop name="PosX" value="2000" />
            <prop name="PosY" value="2000" />
            <prop name="SizeX" value="2000" />
            <prop name="SizeY" value="2000" />
            <prop name="StyleSet" value="0" />
            <prop name="ColorIndex" value="red" />
            <prop name="Filled" value="A661_TRUE" />
            <prop name="FillIndex" value="blue" />
            <prop name="Halo" value="A661_FALSE" />
         </model>
      </a661_widget>
      <a661_widget name="animationOnparam" type="A661_ANIMATION_ONPARAM">
         <model>
            <prop name="WidgetIdent" value="2" />
            <prop name="Anonymous" value="A661_FALSE" />
            <prop name="StyleSet" value="0" />
            <prop name="TargetWidgetID" value="1" />
            <prop name="TargetParamID" value="0xB800"/>
            <prop name="FromValue" value="1.0" />
            <prop name="ToValue" value="5.0" />
            <prop name="AnimationLawRef" value="0" />
            <prop name="Duration" value="100" />
            <prop name="Delay" value="0" />
            <prop name="AnimationRepetition" value="0" />
         </model>
      </a661_widget>

Changing the opacity of a Panel

The following Definition File specifies an animation which changes the opacity of a Panel:
      <a661_widget name="panel" type="A661_PANEL">
         <model>
            <prop name="WidgetIdent" value="1" />
            <prop name="Enable" value="A661_TRUE" />
            <prop name="Visible" value="A661_TRUE" />
            <prop name="PosX" value="2000" />
            <prop name="PosY" value="2000" />
            <prop name="SizeX" value="5000" />
            <prop name="SizeY" value="5000" />
            <prop name="StyleSet" value="1" />
         </model>
      </a661_widget>
      <a661_widget name="animationOnparam" type="A661_ANIMATION_ONPARAM">
         <model>
            <prop name="WidgetIdent" value="2" />
            <prop name="Anonymous" value="A661_FALSE" />
            <prop name="StyleSet" value="0" />
            <prop name="TargetWidgetID" value="1" />
            <prop name="TargetParamID" value="0xB003"/>
            <prop name="FromValue" value="1." />
            <prop name="ToValue" value="0." />
            <prop name="AnimationLawRef" value="0" />
            <prop name="Duration" value="2000" />
            <prop name="Delay" value="0" />
            <prop name="AnimationRepetition" value="0" />
         </model>
      </a661_widget>

See also


Categories: jfx | lookandfeel | server | user

Copyright 2016-2017 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v2 licence