Home
Categories
Dictionary

Synth2 Look and Feel


    1  File format and supported properties
    2  Structure
       2.1  Global properties
          2.1.1  Example
       2.2  Constants
          2.2.1  Example
       2.3  Resources
          2.3.1  Example
       2.4  Styles Definition
          2.4.1  Definition of the style element
          2.4.2  Definition of the bind element
    3  See also


The Synth2 Look and Feel is a Swing Look and Feel which can be configured through an XML file. This Look and Feel is specific to the J661 Server, and is derived from the Swing synth Look and Feel.

File format and supported properties

See the Synth2 File format. See the Synth2 components XML properties.

Structure

The synth2 XML configuration file is composed by the following top−level nodes:

Global properties

The "globalProperty" element allows to define several global properties which will be used for all components. The supported properties are:

Example

      <globalProperty key="labelsEllipsis" value="false"/>

Constants

Constants can be of the following types:

Example

      <constant key="AMBER" value="#FFC700" type="color"/>
      <constant key="FRAMED" value="1 ! 4" />

Resources

Resources can be fonts or image paths.

Example

      <resource key="DU1310MediumLarge" value="DU1310Mediumlarge.ttf" type="font"/>

Styles Definition

The definition for the Look for one component is itself composed of two consecutive elements
For example:
      <style id="line">
         <state styleSet="0">
            <stroke width="2" endCap="CAP_ROUND" />
            <property key="graphicWidget.halo" type="boolean" value="false" />
            <property key="halo" type="string" value="supersmall" />
         </state>
      </style>
      <bind style="line" key="line"/>

Definition of the style element

The "style" element defines the properties for each of the StyleSets for a widget. Note that this element does not define the widget name nor its associated Swing component, which will be specified in the consecutive "bind" element.

Definition of the bind element

The "bind" element binds the style with its specified id to a component.

See Also


Category:lookandfeel Category:server Category:swing Category:user

Copyright 2016 Dassault Aviation. All Rights Reserved. Documentation and source under the GPL v2 licence

Project Web Hosted by SourceForge.net Copyright 1999-2010 - Geeknet, Inc., All Rights Reserved About - Legal - Help