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

Look and Feel configuration


    1  Grammar
    2  Structure
       2.1  ui element
       2.2  property element
    3  Supported Look and Feel types
       3.1  metal
       3.2  nimbus
       3.3  platform
       3.4  external
       3.5  synth2
       3.6  jfx
    4  Example
    5  See also

The Look and Feel configuration file specifies the cockpit configuration for a SuperLayer Window Manager. This configuration file is specified through the ui property in the Server configuration properties.

Grammar

See the Look and Feel configuration Schema.

Structure

The structure of the Look and Feel configuration file contains "ui" elements, each of these elements defining one Swing or JavaFX Look and Feel The effective Look and Feel is specified through the lf property in the Server configuration properties.

ui element

The "ui" element has the following XML attributes:
  • name: the name of the Look and Feel, which can be adressed through the lf property in the Server configuration properties
  • type: the Look and Feel type. The supported types are:
    • "metal": Swing Metal Look and Feel
    • "platform": Swing Platform Look and Feel
    • "nimbus": Swing nimbus Look and Feel
    • "external": Swing Look and Feel specified by a jar File
    • "synth": Swing synth Look and Feel
    • "synth2": Swing Synth2 Look and Feel
    • "jfx": JavaFX Look and Feel


This element may have the following children "property" elements.

property element

The "property" element specify the additional properties which can be necessary to specify completely the Look and Feel. See the various Look and Feel types to look for the supported properties for each type.

The following properties are usable for all Look and Feel types:

Supported Look and Feel types

All Look and Feels types are Swing Look and Feel, except "jfx", which is a JavaFX Look and Feel based on a CSS file.

metal

The "metal" type correspond to the Swing Metal Look and Feel. This Look and Feel has no specific property. For example:
      <ui name="myLook" type="metal" />

nimbus

The "nimbus" type correspond to the Swing Nimbus Look and Feel. This Look and Feel has no specific property. For example:
      <ui name="myLook" type="nimbus" />

platform

The "platform" type correspond to a Swing Platform Look and Feel. This Look and Feel has one specific property:
  • "path": the value is the classPath of the Platform LookAndFeel class


For example (for the Windows Platform Look and Feel):
         <ui name="windows" type="platform">
            <property name="path" value="com.sun.java.swing.plaf.windows.WindowsLookAndFeel" />
         </ui>

external

The "external" type correspond to a Swing Look and Feel specified in a jar file. This Look and Feel has two specific properties:
  • "jar": the path of the jar file (relative to the Look and Feel configuration file, or absolute)
  • "path": the classPath of the LookAndFeel class (to be found in the jar file)


For example:
         <ui name="myLook" type="external">
            <property name="jar" value="liquidlnf.jar" />
            <property name="path" value="com.birosoft.liquid.LiquidLookAndFeel" />
         </ui>

synth2

The "synth2" type correspond to a Synth2 Look and Feel. This Look and Feel is specific to the J661 Server, and is derived from the Swing synth Look and Feel. This Look and Feel has two specific properties:
  • "file": the path of the XML file specifying the synth styles (relative to the Look and Feel configuration file, or absolute)
  • "baseURL": the path of the directory where to find synth2 resources when relative to a file. Should Usually be "."


For example:
         <ui name="synth" type="synth2" >
            <property name="file" value="synthStyle.xml" />
            <property name="baseURL" value="." />
         </ui>

jfx

The "jfx" type is a JavaFX Look and Feel. This Look and Feel has three specific property:
  • "url": the path of the JavaFX CSS configuration file for the Look and Feel (relative to the Look and Feel configuration file, or absolute)
  • " componentsStructure: (optional) the path of an XML file specifying the structure of the of the widgets sub-components
  • " componentsStyles: (optional) the path of an XML file specifying the styles of the widgets sub-components
See the JavaFX Component structure article for the usage of the componentsStructure and componentsStyles.

For example:
         <ui name="JavaFX" type="jfx" >
            <property name="url" value="javaFX.css" />
         </ui>

Example

      <LookandFeel>
         <ui name="metal" type="metal" />
         <ui name="synth" type="synth2" >
            <property name="file" value="synthStyle.xml" />
            <property name="baseURL" value="." />
         </ui>
         <ui name="windows" type="platform">
            <property name="path" value="com.sun.java.swing.plaf.windows.WindowsLookAndFeel" />
         </ui>
         <ui name="JavaFX" type="jfx" >
            <property name="url" value="javaFX.css" />
            <property name="styleSets" value="jfxStyles.xml" />
            <property name="rendererStyles" value="JFXrendererStyles.xml" />
         </ui>
      </LookandFeel>

See also


Categories: conf | lookandfeel | server | user

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