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

Developing a Server widget


    1  Classpath reference
    2  Widget class specification
       2.1  Fields properties declaration
       2.2  General widgets
       2.3  Containers declaration
    3  See also

A Server widget implementation is a Java class which store the values of a widgets properties.

Classpath reference

The reference of the widget class classpath is specified in the Server widgets implementation configuration file. For example the PushButton widget wil be defined with the following element:

      <widget arincID="A661_PUSH_BUTTON">
         <path path="arinc661.server.model.arinc.ARINCPushButton"/>
      </widget>

Widget class specification

All widget classes must implement the ServerWidget interface. Generally "normal" widgets only have to declare fields which will store their associated widget properties.

Fields properties declaration

The widget class should have one public field for each widgets property. The declaration of the field should use the @Attr Java annotation, to sepcify which property is implemented. For example, to declare the implementation of the "A661_STRING" propety of the PushButton widget:

      @Attr(arincID = "A661_STRING")
      public String labelString = "";

The annotation can also declare the property "type" which will be useful for the widget renderer implementation. The available types are: The declaration of the property type is performed through the "type" attribute. For example:

      @Attr(arincID = "A661_SIZE_X", type = Attr.Type.SIZE)
      public long width;

Note that if no type is declared, the assumed type will be PROPERTY by default.

General widgets

General widgets can extend the AbstractBuiltinWidget class.

Containers declaration

A container widget should implement the ServerContainer interface. They also can extend the AbstractContainer class.

See Also


Category: server Category: dev

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