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

Server renderers configuration file



This Server widgets rendering pipeline XML configuration file specifies the Java classes which implements the renderers of the ARINC 661 widgets and MapItems defined in the meta-definition. This file depends on the UI framework.

Grammar

See the Widgets renderers configuration Schema.

Structure

The XML file contains the following elements:
  • The paths for the classes implementing the renderer for each MapItem
  • The paths for the classes implementing the renderer for each Symbol Command
  • The paths for the classes implementing the renderer for each widget
  • The paths for the classes implementing the renderer for ARINC 661 extensions which have an associated renderer
The structure of the file has a few additional elements in Swing compared ot JavaFX to address for the Swing UIComponents architecture.

General structure

Widget renderers

The "widget" element specifies the list of renderers for the widget in the UI framework.

Widget Basic declaration

The most simple declaration is:
      <widget arincID="A661_GP_ARC_ELLIPSE">
         <renderer path="arinc661.server.jfx.model.stdrenderer.ArcEllipseRenderer"/>
      </widget>

Widget Multiple renderers declarations

It is also possible to specify more than one renderer for the same widget. For example:
      <widget arincID="A661_EDIT_BOX_NUMERIC">
         <renderer path="arinc661.server.jfx.model.stdrenderer.EditBoxNumericRenderer"/>
         <renderer id="label" path="arinc661.server.jfx.model.stdrenderer.LabelEditBoxNumericRenderer"/>
         <renderer id="spinner" path="arinc661.server.jfx.model.stdrenderer.EditBoxNumericSpinnerRenderer"/>
      </widget>
In that case:
  • Defining a renderer without setting the "id" attribute, of with the "id" attribute set to "default" will define this renderer as the default renderer for the widget in the UIFramework. It means that is will be the renderer which will be chosen by the Server if not specific Styles configuration has been defined for the widget
  • Defining a renderer with an "id" attribute specifies a renderer which can be chosen for a specific StyleSet in the Styles configuration

Swing specificities

The Swing renderers XML configuration file contains the following additional elements for the "renderer" element:
      <xs:complexType name="renderer">
         <xs:sequence>
            <xs:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
         <xs:attribute name="path" type="xs:anySimpleType" use="required"/>
         <xs:attribute name="id" type="xs:token"/>
         <xs:attribute name="uiClassID" type="xs:token"/>
         <xs:attribute name="uiClass" type="xs:token"/>
         <xs:attribute name="lfName" type="xs:token"/>
      </xs:complexType>
In some cases, ARINC 661 widgets can't be modelled by existing Swing ComponentUI classes. In these cases, the XML renderer i mplementation can specify the additional optional following elements for the widget Swing renderer implementation:
  • It's uiClassID
  • The Look and Feel name for this component (used in the Synth2 Look and Feel)
  • Its default ComponentUI implementation

Examples

JavaFX examples

Simple examples

For a SymbolCommand:
    <command arincID="A661_SYMBOL_DEFN_ARC_CIRCLE" path="arinc661.server.jfx.model.symbols.JFXSymbolCommand$DefArcCircle"/>
For a widget:
      <widget arincID="A661_GP_ARC_ELLIPSE">
         <renderer path="arinc661.server.jfx.model.stdrenderer.ArcEllipseRenderer"/>
      </widget>
For an extension:
      <extension arincID="A661_INITIAL_FOCUS_EXTENSION">
         <extensionRenderer path="arinc661.server.model.arinc.InitialFocusExtensionRenderer"/>
      </extension>
For an MapItem:
      <mapItem arincID="A661_LINE_SEGMENT">
         <mapItemRenderer path="arinc661.jfx.mapitems.LineCurveRenderer"/>
      </mapItem>

Examples with alternate paths

The A661_BASIC_CONTAINER widget is also used for in SuperLayers to model Displays and Layouts:
      <widget arincID="A661_BASIC_CONTAINER">
         <renderer path="arinc661.server.jfx.model.stdrenderer.BasicContainerRenderer"/>
         <widgetPath path="arinc661.server.jfx.wm.JFXServerDisplay"/>
         <widgetPath path="arinc661.server.wm.superlayer.AbstractServerCockpit$Selector"/>
         <widgetPath path="arinc661.server.wm.superlayer.ServerLayoutImpl"/>
      </widget>

Examples with alternate renderers

The A661_EDIT_BOX_NUMERIC widget has 3 renderers implementations:
  • The default one, which used a TextField for the Numerical value
  • Another one using a Label for the Numerical value
  • Another one using the JavaFX Spinner Node for the Numerical value
      <widget arincID="A661_EDIT_BOX_NUMERIC">
         <renderer path="arinc661.server.jfx.model.stdrenderer.EditBoxNumericRenderer"/>
         <renderer id="label" path="arinc661.server.jfx.model.stdrenderer.LabelEditBoxNumericRenderer"/>
         <renderer id="spinner" path="arinc661.server.jfx.model.stdrenderer.EditBoxNumericSpinnerRenderer"/>
      </widget>

Swing examples

Examples with UI definition

As there is no Swing UIComponent to model the A661_GP_LINE widget, one specific UIComponent is provided in the J661 Swing implementation. The XML renderer implementation specifies the following elements for this widget Swing renderer implementation:
  • It's uiClassID. In that case, we chose the name "LineUI"
  • The Look and Feel name for this component (used in the Synth2 Look and Feel). In that case, we chose the name "Line
  • Its default ComponentUI implementation"
      <widget arincID="A661_GP_LINE" >
         <renderer path="arinc661.server.swing.model.stdrenderer.LineRenderer"
      uiClassID="LineUI"
      uiClass="arinc661.server.swing.ui.basic.LineRendererUI"
      lfName="Line" />
      </widget>

See also


Categories: dev | server

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