Document Type Descriptor.

Enterprise Java
XMLTalk: A framework for automatic GUI rendering from XML specs
by Frank Sauer
Listing 4. Document Type Descriptor.


<?xml version='1.0' encoding='UTF-8' ?>
<!--
This DTD is annotated for use with the XMLTalk XML Editor. This editor will read
the comments and use them to display tips and help. These comments are also used
to generate HTML reference documentation for XMLTalk. Each comment applies to the
ELEMENT or ATTLIST immediately following it. The ATTLIST comments are formatted to
be parsed with Properties.load()... See the JavaDoc for this method for an elaborate
discussion of the possible formats.
-->
<!--
the UISPECIFICATION specifies the entire user interface for a component.
It includes lists of models, actions, popupmenus and views. Only models
and views are required, all others are optional. You can optionally
specify a look and feel attribute. By default the platforms default
look and feel is used. Only the very toplevel ui spec uses this attribute.
-->
<!ELEMENT UISPECIFICATION (PROPERTIES? , MODELS , ACTIONS? , POPUPMENUS? , VIEWS)>

<!--
lookandfeel     Specifies the pluggable look and feel the application will                 use. Only the toplevel window can specify a                 look and feel. All embedded components will use the toplevel look and feel.
-->
<!ATTLIST UISPECIFICATION  lookandfeel  (Metal | Motif | Windows )  'Metal' >

<!--
A UI Specification file can be used to define properties accessible by the
application with the getProperty() method inherited from ApplicationModel.
In the ui spec itself properties can be accessed by using ${name} for any
attribute value in your spec. These will be substituted with the value if
it can be found. Optionally, properties can be specified in an external
properties file as well. Use the optional resource attribute to specify this file.
Its location will be resolved relative to this uispec.
-->
<!ELEMENT PROPERTIES (PROPERTY)*>
<!--
resource    Name of an external resource file to read the properties from
-->
<!ATTLIST PROPERTIES  resource CDATA  #IMPLIED >
<!ELEMENT PROPERTY EMPTY>
<!--
name    Name of the property
value   Value of the property
-->
<!ATTLIST PROPERTY  name  CDATA  #REQUIRED
                    value CDATA  #REQUIRED >
<!--
MODELS is the list of models used by this component. Models are
ValueModels as first used in the VisualWorks Smalltalk Environment.
Most original Smalltalk ValueModels are supported, as well as some
new ones invented specifically for XMLTalk, such as XMLELEMENTADAPTOR.
-->
<!ELEMENT MODELS (VALUEHOLDER | BUFFEREDVALUEHOLDER | SELECTIONINLIST |
                 ASPECTADAPTOR | BUFFEREDASPECTADAPTOR | RANGEADAPTOR |
                 SELECTIONINTREE | XMLELEMENTADAPTOR | APPLICATIONMODEL)*>

<!--
A ValueHolder is the simplest ValueModel. It holds its value locally.
All ValueModels, and thus ValueHolder has a required attribute of type
ID, called name. Other ValueModels, actions and views use IDREF attributes
to refer to a model by this name. Optionally, a ValueModel can be promoted
and serve as a delegate for an embedded component's promoted valuemodel.
Also, models can notify the application of changes using the onchange
attribute.
-->
<!ELEMENT VALUEHOLDER EMPTY>

<!--
name        name of this model. Used to refer to it from other models or views.
onchange    name of an application callback method to invoke when the value of this             model changes
promote     if true, this model will be made public to parent applications
delegatefor list of promoted value models to connect to this model.<BR> These models             are prefixed with the VIEW or name,<BR> e.g. editor.customer
-->
<!ATTLIST VALUEHOLDER  name        ID     #REQUIRED
                         onchange    CDATA  #IMPLIED
                         promote      (false | true )  #IMPLIED
                         delegatefor CDATA  #IMPLIED >

<!--
A BufferedValueHolder does not hold the value locally. It gets its value
from another ValueModel referenced by its subjectChannel attribute. It does
not update this subjectChannel until it receives an event from its trigger
channel and the value of the triggerchannel is TRUE. If the trigger channel
contains FALSE when the event is received, the changes are aborted and the
original value is re-fetched from the subjectChannel.
-->
<!ELEMENT BUFFEREDVALUEHOLDER EMPTY>
<!--
name                    name of this model. Used to refer to it from other models or views.
onchange                name of an application callback method to invoke when the value of this model changes
promote                 if true, this model will be made public to parent applications
delegatefor             list of promoted value models to connect to this model.<BR> These models are prefixed                         with the VIEW or name,<BR> e.g. editor.customer
triggerChannel          reference to the model used as the trigger channel. Value must be a valid                         ID. When the trigger channel is set to Boolean.TRUE, this model will update                         its subject channel. When the trigger channel is set to Boolean.FALSE                         this model will re-retrieve the value contained in its subject channel.
subjectChannel          Reference to this model's subject channel. Value must be a valid                         ID. The subject channel contains the actual value for this model.
subjectSendsUpdates     Set this to true in order to propagate events from the objects contained in                         this model's subject channel.
-->
<!ATTLIST BUFFEREDVALUEHOLDER    name                ID     #REQUIRED
                                 triggerChannel      IDREF  #REQUIRED
                                 subjectChannel      IDREF  #REQUIRED
                                 onchange            CDATA  #IMPLIED
                                 promote             (false | true )  #IMPLIED
                                 delegatefor         CDATA  #IMPLIED
                                 subjectSendsUpdates (false | true )  #IMPLIED >
<!--
An AspectAdaptor translates getValue/setValue to an arbitrary get/set method
on objects contained in its subjectChannel using reflection. The aspect
attribute follows common JavaBeans conventions, e.g. aspect="name" results
in a get method called getName and a set method called setName.
-->
<!ELEMENT ASPECTADAPTOR EMPTY>
<!--
aspect                  Name of the property this AspectAdaptor adapts. This name will be translated                         to get/set methods to invoke on the object contained in the subject channel                         when the value of this model is requested or set.
name                    name of this model. Used to refer to it from other models or views.
onchange                name of an application callback method to invoke when the value of this model changes
promote                 if true, this model will be made public to parent applications
delegatefor             list of promoted value models to connect to this model.<BR> These models are prefixed                         with the VIEW or name,<BR> e.g. editor.customer
subjectChannel          Reference to this model's subject channel. Value must be a valid                         ID. The subject channel contains the actual value for this model.
subjectSendsUpdates     Set this to true in order to propagate events from the objects contained in                         this model's subject channel.
-->
<!ATTLIST ASPECTADAPTOR     name                ID     #REQUIRED
                            aspect              CDATA  #REQUIRED
                            subjectChannel      IDREF  #REQUIRED
                            onchange            CDATA  #IMPLIED
                            promote             (false | true )  #IMPLIED
                            delegatefor         CDATA  #IMPLIED
                            subjectSendsUpdates (false | true )  #IMPLIED >
<!--
    Combination of AspectAdaptor and BufferedValueHolder behavior
-->
<!ELEMENT BUFFEREDASPECTADAPTOR EMPTY>
<!--
aspect                  Name of the property this AspectAdaptor adapts. This name will be translated                         to get/set methods to invoke on the object contained in the subject channel                         when the value of this model is requested or set.
name                    name of this model. Used to refer to it from other models or views.
onchange                name of an application callback method to invoke when the value of this model changes
promote                 if true, this model will be made public to parent applications
delegatefor             list of promoted value models to connect to this model.<BR> These models are prefixed                         with the VIEW or name,<BR> e.g. editor.customer
triggerChannel          reference to the model used as the trigger channel. Value must be a valid                         ID. When the trigger channel is set to Boolean.TRUE, this model will update                         its subject channel. When the trigger channel is set to Boolean.FALSE                         this model will re-retrieve the value contained in its subject channel.
subjectChannel          Reference to this model's subject channel. Value must be a valid                         ID. The subject channel contains the actual value for this model.
subjectSendsUpdates     Set this to true in order to propagate events from the objects contained in                         this model's subject channel.
-->
<!ATTLIST BUFFEREDASPECTADAPTOR     name           ID     #REQUIRED
                                    aspect         CDATA  #REQUIRED
                                    subjectChannel IDREF  #REQUIRED
                                    triggerChannel IDREF  #IMPLIED
                                    onchange       CDATA  #IMPLIED
                                    promote        (false | true )  #IMPLIED
                                    delegatefor    CDATA  #IMPLIED
                                    subjectSendsUpdates (false | true )  #IMPLIED
>
<!--
An XMLELEMENTADAPTOR adapts a JDOM Element, just like an AspectAdaptor
adapts arbitrary object. If children is defined with value "Foo", its value
will be the list of children with tag "Foo" of the Element contained in the
subject channel. If children is defined with name "all", ALL children will
be in the list. If child is defined with value "Foo" its value will be the
single child  Element with tag "Foo" of the Element contained in the
subject channel. If attribute is defined with value "foo" its value will be
the attribute named "foo" of the Element in the subject channel. If none of
the above applies, its value will be the textual content of the element
contained in the subject channel
-->
<!ELEMENT XMLELEMENTADAPTOR EMPTY>
<!--
name                    name of this model. Used to refer to it from other models or views.
onchange                name of an application callback method to invoke when the value of this model changes
promote                 if true, this model will be made public to parent applications
delegatefor             list of promoted value models to connect to this model.<BR> These models are prefixed                         with the VIEW or name,<BR> e.g. editor.customer
subjectChannel          Reference to this model's subject channel. Value must be a valid                         ID. The subject channel contains the actual value for this model.
attribute               When set, this adaptor gets/sets the value of the given attribute on the XML Element                         contained in the subject channel.
child                   When set, this adaptor gets/sets value of this adaptor is the named child element                         of the element in the subject channel.
children                When set, the value of this adaptor is the list of all named children of                         the element in the subject channel.
-->
<!ATTLIST XMLELEMENTADAPTOR     name           ID               #REQUIRED
                                attribute      CDATA            #IMPLIED
                                children       CDATA            #IMPLIED
                                child          CDATA            #IMPLIED
                                subjectChannel IDREF            #IMPLIED
                                onchange       CDATA            #IMPLIED
                                promote        (false | true )  #IMPLIED
                                delegatefor    CDATA            #IMPLIED >

<!--
A RangeAdaptor serves as the model for sliders, scrollbars, progress bars,
etc. It adapts a value within a range. The Value, Minimum, Maximum and
Extent are all stored in separate valuemodels.
-->
<!ELEMENT RANGEADAPTOR EMPTY>
<!--
name                    name of this model. Used to refer to it from other models or views.
promote                 if true, this model will be made public to parent applications
delegatefor             list of promoted value models to connect to this model.<BR> These models are prefixed                         with the VIEW or name,<BR> e.g. editor.customer.
initialValue            Initial value to be stored in my valueHolder.
extent                  value for extent (width of 'selected' area, only meaningful in scrollbars)
min                     minimum value of the range
max                     maximum value of the range
minHolder               Valuemodel containing the minimum value, use for dynamic ranges
maxHolder               Valuemodel containing the maximum value, use for dynamic ranges
extentHolder            Valuemodel containing the extent value, use for dynamic selections
valueHolder             Valuemodel containing the current value
-->
<!ATTLIST RANGEADAPTOR  name         ID     #REQUIRED
                          min          CDATA  #IMPLIED
                          max          CDATA  #IMPLIED
                          extent       CDATA  #IMPLIED
                          initialValue CDATA  #IMPLIED
                          minHolder    IDREF  #IMPLIED
                          maxHolder    IDREF  #IMPLIED
                          extentHolder IDREF  #IMPLIED
                          valueHolder  IDREF  #IMPLIED
                          promote       (false | true )  #IMPLIED
                          delegatefor  CDATA  #IMPLIED >

<!--
A SelectionInList combines a list of objects with a current selection in
that list. It is the model for Listboxes, Tables, Comboboxes, etc. The List,
Selection and SelectionIndex are all stored in separate Value Models.
-->
<!ELEMENT SELECTIONINLIST EMPTY>
<!--
name                    name of this model. Used to refer to it from other models or views.
promote                 if true, this model will be made public to parent applications
delegatefor             list of promoted value models to connect to this model.<BR> These models are prefixed                         with the VIEW or name,<BR> e.g. editor.customers.
list                    Name of a method in the owner application model that returns a java.util.List with                         the data for this model
listHolder              Reference to a Valuemodel containing the data for this model. Must be a valid IDREF to                         a defined Valuemodel in MODELS. The object contained in that Valuemodel is assumed                         to be a java.util.List
selectionHolder         ValueModel containing the currently selected object in the list. Must be a valid IDREF.
selectionIndexHolder    Valuemodel containing the numeric index of the selected object in its list, an Integer.
-->
<!ATTLIST SELECTIONINLIST  name                 ID     #REQUIRED
                             list                 CDATA  #IMPLIED
                             listHolder           IDREF  #IMPLIED
                             selectionHolder      IDREF  #IMPLIED
                             selectionIndexHolder IDREF  #IMPLIED
                             promote               (false | true )  #IMPLIED
                             delegatefor          CDATA  #IMPLIED >
<!--
A SelectionInTree is similar to a SelectionInList, except the selection is
in a tree, not a list. Model for Trees. The objectHolder contains the
userObject of the selected tree node. The selectionHolder will contain
the tree node itself. filterSwitch can be used to activate the hiding of
invisible children. See com.trcinc.xmltalk.tree.FilteredTreeModel
-->
<!ELEMENT SELECTIONINTREE EMPTY>
<!--
name                    name of this model. Used to refer to it from other models or views.
root                    Method in the owning application model returning a TreeNode object
selectionHolder         ValueModel containing the currently selected TreeNode object in the tree. Must be a valid IDREF.
objectHolder            Valuemodel containing the user object of the selected TreeNode
filterSwitch            See com.trcinc.xmltalk.tree.FilteredTreeModel
-->
<!ATTLIST SELECTIONINTREE  name            ID     #REQUIRED
                             root            CDATA  #REQUIRED
                             selectionHolder IDREF  #IMPLIED
                             objectHolder    IDREF  #IMPLIED
                             filterSwitch    IDREF  #IMPLIED >
<!--
An APPLICATIONMODEL describes an embedded component. It can be created in one of two ways:
The first way is to specify an absolute class name in the class attribute. The builder will
attempt to create an instance of this class using the default (zero argument) constructor and
cast the result to an ApplicationModel. The second method for creation consists of specifying the
name of a method in "myself" that is assumed to return an instance of ApplicationModel. The created
instance can be accessed from "myself" through the getAspect("name") method just like any other model.
Note that since instances of these models are cached in the aspect cache, if two views reference the
same application model using the same name, the same instance of that model will handle both views.
If separate views need separate instances of a given application model class, you will have to specify
two APPLICATIONMODEL elements with different names (again, just like with any other model).
-->
<!ELEMENT APPLICATIONMODEL EMPTY>
<!--
name        name of this application model
class       used to instantiate new instances of this application. Must be a fully qualified class name.
method      Method in owning application model that returns an instance of an ApplicationModel subclass.
-->
<!ATTLIST APPLICATIONMODEL  name   ID     #REQUIRED
                              class  CDATA  #IMPLIED
                              method CDATA  #IMPLIED >
<!--
Actions define callback methods in the application or any objects contained
in any of the models defined under MODELS.
-->
<!ELEMENT ACTIONS (PERFORMACTION | ASYNCACTION | COMMITACTION | ABORTACTION)*>

<!--
A perform action defines a callback in the application by name. The
application model must implement the method specified by the method
attribute as a no-parameter void method. Optionally, the action can
specify a subjectChannel, in which case the method will be called on the
object contained in that subjectChannel, instead of the application model.
The text and icon can be specified as the text and icon to be displayed 
in menu items and action buttons.
-->
<!ELEMENT PERFORMACTION EMPTY>
<!--
name                Name of this action. Used to refer to this action by buttons and menu items
text                Text that buttons and menu items using this action will display.
icon                Icon that buttons and menu items will display for this action.
method              Application model method that will be called when this action is invoked
subjectChannel      Actions can be invoked on objects other than the owning application. If                     specified, this Value model contains the object this action will be                     invoked on.
-->
<!ATTLIST PERFORMACTION    name           ID     #REQUIRED
                           text           CDATA  #REQUIRED
                           method         CDATA  #REQUIRED
                           subjectChannel IDREF  #IMPLIED
                           icon           CDATA  #IMPLIED >
<!--
An AsyncAction defines an action that will be performed on a separate
thread using SwingWorker. The before method is called first, on the Swing
event thread. Then the actual method is invoked on a new thread, and when
it completes, the after method is invoked, again on the Swing event thread.
Use this to prevent long lasting operations to freeze up the user interface.
-->
<!ELEMENT ASYNCACTION EMPTY>
<!--
name                Name of this action. Used to refer to this action by buttons and menu items
text                Text that buttons and menu items using this action will display.
icon                Icon that buttons and menu items will display for this action.
method              Application model method that will be called when this action is invoked. This                     method will be invoked on a newly created background thread that will terminate when                     this method returns.
subjectChannel      Actions can be invoked on objects other than the owning application. If                     specified, this Value model contains the object this action will be                     invoked on.
beforeMethod        Method to be invoked on the Swing event thread <EM>before</EM> the main method is                     invoked on the background thread.
afterMethod         Method to be invoked on the Swing event thread <EM>after</EM> the main method is                     invoked on the background thread.
-->
<!ATTLIST ASYNCACTION  name           ID     #REQUIRED
                         text           CDATA  #REQUIRED
                         beforeMethod   CDATA  #REQUIRED
                         method         CDATA  #REQUIRED
                         afterMethod    CDATA  #REQUIRED
                         subjectChannel IDREF  #IMPLIED
                         icon           CDATA  #IMPLIED >
<!--
A commit action can be used to store a Boolean.TRUE in a trigger channel.
Can be used to make a BUFFEREDVALUEHOLDER or BUFFEREDASPECTADAPTOR propagate
its value to its subject channel.
-->
<!ELEMENT COMMITACTION EMPTY>
<!--
name                Name of this action. Used to refer to this action by buttons and menu items
text                Text that buttons and menu items using this action will display.
icon                Icon that buttons and menu items will display for this action.
trigger             Valuemodel to store a Boolean.TRUE in when invoked
-->
<!ATTLIST COMMITACTION    name    ID     #REQUIRED
                          text    CDATA  #REQUIRED
                          trigger IDREF  #REQUIRED
                          icon    CDATA  #IMPLIED >

<!--
An abort action can be used to store a Boolean.FALSE in a trigger channel.
Can be used to make a BUFFEREDVALUEHOLDER or BUFFEREDASPECTADAPTOR discard
values modified by the user and retrieve the original unmodified value from
its subject channel.
-->
<!ELEMENT ABORTACTION EMPTY>
<!--
name                Name of this action. Used to refer to this action by buttons and menu items
text                Text that buttons and menu items using this action will display.
icon                Icon that buttons and menu items will display for this action.
trigger             Valuemodel to store a Boolean.FALSE in when invoked
-->
<!ATTLIST ABORTACTION    name    ID     #REQUIRED
                         text    CDATA  #REQUIRED
                         trigger IDREF  #REQUIRED
                         icon    CDATA  #IMPLIED >
<!--
    VIEWS is the list of views (panels) used in the component
-->
<!ELEMENT VIEWS (VIEW)+>

<!--
A view consists of an optional menu bar, appearance attributes, a layout
manager and any number of widgets. Optional attributes include width,
height, fixedsize and a background image that will be tiled behind all
the widgets. As of 7/25/2001, VIEW elements can be nested and SUBCANVAS
no longer exists. Therefore, a VIEW can have an optional model attribute
specifying an APPLICATIONMODEL in the MODELS section. if the model attribute is not specified,
"myself" is implied. If a model is specified, an optional targetview attribute
can further specify a named view in that model's ui specification file.
Without a targetview attribute, its VIEW element called "main" will be used.
-->
<!ELEMENT VIEW (MENUBAR? , APPEARANCE? , CONSTRAINTS? , LAYOUTMANAGER ,
               (INPUTFIELD | LABEL | LISTBOX | NOTEBOOK | ACTIONBUTTON | CHECKBUTTON |
                RADIOBUTTON | SPLITVIEW | COMBOBOX | SLIDER | PROGRESSBAR | SCROLLBAR |
                TOOLBAR | DESKTOP | TREE | TABLE | CARDVIEW | TEXTAREA | PASSWORD |
                VIEW | WIDGET)*)>

<!--
name            Name of this view.
title           Title used for a toplevel frame decoration, or a tab on a NOTEBOOK
model           APPLICATIONMODEL for this VIEW, used for embedding applications into                 other APPLICATIONMODELs. Special value "myself" can be used to indicate                 that this VIEW is served by the parent application.
targetview      Name of the VIEW specified in the MODEL's uispec file. If not specified                 "main" is assumed.
width           initial width of this VIEW
height          initial height of this VIEW
fixedsize       Indicates whether a toplevel window must be allowed to resize or not
scrollable      If true, a panel will be decorated with a scrollbar
backgroundimage An image that will be tiled in the background of this VIEW
tooltip         Tooltip to display on this VIEWs tab in a NOTEBOOK.
icon            Icon to render in the tab of this VIEW when used in a NOTEBOOK.
-->
<!ATTLIST VIEW    name            CDATA  #REQUIRED
                  title           CDATA  #REQUIRED
                  model           IDREF  #IMPLIED
                  targetview      CDATA  #IMPLIED
                  width           CDATA  #IMPLIED
                  height          CDATA  #IMPLIED
                  fixedsize       (false | true )  'false'
                  scrollable      (false | true )  'false'
                  backgroundimage CDATA  #IMPLIED
                  tooltip         CDATA  #IMPLIED
                  icon            CDATA  #IMPLIED >

<!--The layoutmanager tag defines the layout manager used for the view-->
<!ELEMENT LAYOUTMANAGER (GRIDBAGLAYOUT | BORDERLAYOUT | GRIDLAYOUT | EASYGRIDLAYOUT | FLOWLAYOUT)>

<!--
    An input field can specify an optional visible width in characters (columns),
    a type, a validation mask, a max length (it won't accept more input
    characters than maxlength). As all widgets, INPUTFIELD can have a
    CONSTRAINTS child specifying layoutmanager constraints and an APPEARANCE
    child specifying optional rendering attributes such as borders, colors, etc.
    As most widgets, INPUTFIELD has a required attribute model which references
    a value model specified in MODELS.
-->
<!ELEMENT INPUTFIELD (CONSTRAINTS? , APPEARANCE?)>
<!--
name            Name of this widget. Can be used to obtain programmatic access with widgetAt(name).
model           Model for this widget. Must be a reference to a defined Valuemodel in MODELS
columns         Width of the input field in characters
type            The value of this attribute drives a translation to and from the indicated type                 when getting and setting the model's value. E.g. when set to Number, the model                 can contain any subclass of Number, e.g. Float, Integer, etc.
decimalformat   A String containing a formatting string like <TT>$###.##</TT>, indicating that values are                 rendered with a dollar sign and three digits before the decimal point, and two after.
maxlength       Maximum number of input characters accepted
mask            Adds non-value characters to the data, e.g. When a phone number is stored as a Number                 and its value is 8881234567, it can be displayed as (888)123-4567 by specifying the mask                 as <TT>(***)***-****</TT>. These non-data characters don't have to be typed in and                 are automatically skipped when the user is typing.
-->
<!ATTLIST INPUTFIELD    name          CDATA  #REQUIRED
                        model         IDREF  #REQUIRED
                        columns       CDATA  #IMPLIED
                        type          (Double | Integer | Long | Number )  #IMPLIED
                        decimalformat CDATA  #IMPLIED
                        maxlength     CDATA  #IMPLIED
                        mask          CDATA  #IMPLIED >

<!--
A PASSWORD is similar to an INPUTFIELD, but it does not echo the characters
-->
<!ELEMENT PASSWORD (CONSTRAINTS? , APPEARANCE?)>
<!--
name            Name of this widget. Can be used to obtain programmatic access with widgetAt(name).
model           Model for this widget. Must be a reference to a defined Valuemodel in MODELS
columns         Width of the input field in characters
-->
<!ATTLIST PASSWORD    name    CDATA  #REQUIRED
                      model   IDREF  #REQUIRED
                      columns CDATA  #IMPLIED >

<!--
A TEXTAREA is a multi-line text input field
-->
<!ELEMENT TEXTAREA (CONSTRAINTS? , APPEARANCE?)>
<!--
name            Name of this widget. Can be used to obtain programmatic access with widgetAt(name).
model           Model for this widget. Must be a reference to a defined Valuemodel in MODELS
columns         Width of the input field in characters.
rows            Number of visible rows
maxlength       Maximum number of accepted input characters
scrollable      If true, the text area will be decorated with a scrollbar
editable        If true, the user can modify the text, if false, the text area will be read-only
linewrap        If set to true the lines will be wrapped if they are too long to fit within the                 allocated width. If set to false, the lines will always be unwrapped.
wrapstyleword   If set to true the lines will be wrapped at word boundaries (ie whitespace)                 if they are too long to fit within the allocated width. If set to false, the                 lines will be wrapped at character boundaries.

-->
<!ATTLIST TEXTAREA    name          CDATA  #REQUIRED
                      model         IDREF  #REQUIRED
                      rows          CDATA  #IMPLIED
                      columns       CDATA  #IMPLIED
                      maxlength     CDATA  #IMPLIED
                      scrollable     (false | true )  #IMPLIED
                      editable       (false | true )  #IMPLIED
                      linewrap       (false | true )  #IMPLIED
                      wrapstyleword  (false | true )  #IMPLIED >

<!--
Renders a list of objects. A listbox's model is assumed to be a SelectionInList.
Since JList has a problem with initial width, a prototype attribute can be
specified to indicate an estimated width for the listbox. E.g. if prototype="hello there",
the listbox will be wide enough to fit the text "hello there".
-->
<!ELEMENT LISTBOX (CONSTRAINTS? , APPEARANCE?)>
<!--
name            Name of this listbox.
model           Model for this listbox. Must be a valid IDREF to a SELECTIONINLIST defined in MODELS.
rows            Number of visible rows
prototype       Estimated width of widest text to be displayed
popup           IDREF to a popup menu defined in POPUPS. This popup menu will be displayed on right                 mouse click
-->
<!ATTLIST LISTBOX    name      CDATA  #REQUIRED
                     model     IDREF  #REQUIRED
                     rows      CDATA  #IMPLIED
                     prototype CDATA  #IMPLIED
                     popup     IDREF  #IMPLIED >

<!--
A notebook renders a JTabPanel. A notebook 's model is a ValueModel containing the name of the selected page.
Instead of nested VIEW elements, a NOTEBOOK can define a views attribute which
is semantically identical to nested VIEW elements with model="myself". In this case
all views have to be defined in the same uispec file and be controlled by the same
ApplicationModel as this NOTEBOOK.
-->
<!ELEMENT NOTEBOOK (CONSTRAINTS? , APPEARANCE? , (VIEW)*)>
<!--
name            Name of this notebook.
model           Model for this listbox. Must be a valid IDREF to a value model                 defined in MODELS.
views           comma-separated list of VIEW names. The must be VIEW elements                 defined in this same                 UI specification file. This attribute is optional. A more                 flexible way of specifying content is to use nested VIEW                 elements.
tabplacement    Indicates where the tabs go relative to the content.
-->
<!ATTLIST NOTEBOOK    name         CDATA  #REQUIRED
                      model        IDREF  #REQUIRED
                      views        CDATA  #IMPLIED
                      tabplacement  (TOP | BOTTOM | LEFT | RIGHT )  'TOP' >
<!--
A CARDVIEW renders a JPanel with a CardLayout. A CARDVIEW's model is a
ValueModel containing the name of the selected page. Instead of nested VIEW
elements, a CARDVIEW can define a views attribute which is semantically
identical to nested VIEW elements with model="myself". In this case all views
have to be defined in the same uispec file and be controlled by the same
ApplicationModel as this CARDVIEW.
-->
<!ELEMENT CARDVIEW (CONSTRAINTS? , APPEARANCE? , (VIEW)*)>
<!--
name            Name of this notebook.
model           Model for this listbox. Must be a valid IDREF to a value model                 defined in MODELS.
views           comma-separated list of VIEW names. The must be VIEW elements                 defined in this same                 UI specification file. This attribute is optional. A more                 flexible way of specifying content is to use nested VIEW                 elements.
-->
<!ATTLIST CARDVIEW  name  CDATA  #REQUIRED
                      model IDREF  #REQUIRED
                      views CDATA  #IMPLIED >

<!--
A DESKTOP is another container similar to CARDVIEW and NOTEBOOK. In this case,
the nested VIEW elements are rendered as inner frames.
-->
<!ELEMENT DESKTOP (CONSTRAINTS? , APPEARANCE? , MENU? , (VIEW)*)>
<!--
name            Name of this notebook.
model           Model for this listbox. Must be a valid IDREF to a value model                 defined in MODELS.
views           comma-separated list of VIEW names. The must be VIEW elements                 defined in this same                 UI specification file. This attribute is optional. A more                 flexible way of specifying content is to use nested VIEW                 elements.
width           Width of the desktop area
height          Height of the desktop area
backgroundimage Image to be tiled in the background of the desktop behind                 any windows
-->
<!ATTLIST DESKTOP    name            CDATA  #REQUIRED
                     model           IDREF  #REQUIRED
                     views           CDATA  #IMPLIED
                     width           CDATA  #IMPLIED
                     height          CDATA  #IMPLIED
                     backgroundimage CDATA  #IMPLIED >

<!--
A LABEL simply defines a JLabel widget and has a lot of alignment options.
-->
<!ELEMENT LABEL (CONSTRAINTS? , APPEARANCE?)>
<!--
name                    Name of this widget
text                    Text for this label
horizontalalignment     How text is aligned horizontally
horizontaltextposition  Position of text relative to icon
verticalalignment       How text is aligned vertically
verticaltextposition    Position of text relative to icon
icon                    Icon for this label. The filename will be loaded as a                         resource, so must be found on the class path relative                         to the owning application model. Filenames starting                         with '/' are resolved from the root of the class path.
disabledicon            Icon to use when this label is disabled
icontextgap             Space in pixels between the icon and the text
-->
<!ATTLIST LABEL    name                   CDATA  #REQUIRED
                   text                   CDATA  #REQUIRED
                   horizontalalignment     (LEFT | CENTER | RIGHT )  #IMPLIED
                   horizontaltextposition  (LEFT | CENTER | RIGHT | LEADING | TRAILING )  #IMPLIED
                   verticalalignment       (TOP | CENTER | BOTTOM )  #IMPLIED
                   verticaltextposition    (TOP | CENTER | BOTTOM )  #IMPLIED
                   icon                   CDATA  #IMPLIED
                   disabledicon           CDATA  #IMPLIED
                   icontextgap            CDATA  #IMPLIED >
<!--
An ACTIONBUTTON is connected to an ACTION which will be invoked when the button is pressed.
-->
<!ELEMENT ACTIONBUTTON (CONSTRAINTS? , APPEARANCE?)>
<!--
name                        Name of this button
action                      reference to the action for this button. Must be a                             valid IDREF to an action defined in the ACTIONS                             section of this ui specification.
disabledicon                Icon to display when button is disabled
pressedicon                 Icon to display when button is pressed
rollovericon                Icon to display when the mouse is over this button.
default                     Indicates if this is the default button for this                             window. A window can have only one default button                             which is activated when the enter key is pressed.
-->
<!ATTLIST ACTIONBUTTON    name         CDATA  #REQUIRED
                          action       IDREF  #REQUIRED
                          disabledicon CDATA  #IMPLIED
                          pressedicon  CDATA  #IMPLIED
                          rollovericon CDATA  #IMPLIED
                          default       (false | true )  #IMPLIED >

<!--
A CHECKBUTTON renders the boolean value of a ValueModel as a check mark in a box.
-->
<!ELEMENT CHECKBUTTON (CONSTRAINTS? , APPEARANCE?)>
<!--
name                        Name of this checkbutton
model                       reference to the value model for this button. Must be a                             valid IDREF to a model defined in the MODELS                             section of this ui specification.
icon                        Icon to display for this check button when model is FALSE
disabledicon                Icon to display when button is disabled and model is FALSE
disabledselectedicon        Icon to display when button is disabled and model is TRUE
pressedicon                 Icon to display when button is pressed
selectedicon                Icon to display for this check button when model is TRUE
rollovericon                Icon to display when the mouse is over this button and model is FALSE.
rolloverselectedicon        Icon to display when the mouse is over this button and model is TRUE.
alignment                   Text position relative to the checkbox
text                        Text (label) for this check button
-->
<!ATTLIST CHECKBUTTON    name                 CDATA  #REQUIRED
                         text                 CDATA  #REQUIRED
                         model                IDREF  #REQUIRED
                         icon                 CDATA  #IMPLIED
                         disabledicon         CDATA  #IMPLIED
                         disabledselectedicon CDATA  #IMPLIED
                         pressedicon          CDATA  #IMPLIED
                         rollovericon         CDATA  #IMPLIED
                         rolloverselectedicon CDATA  #IMPLIED
                         selectedicon         CDATA  #IMPLIED
                         alignment             (left | right )  #IMPLIED
>
<!--
Usually RADIOBUTTONs come in multiples. In Swing this is called a ButtonGroup.
In XMLTalk, all radio buttons connected to the same ValueModel form a group.
A RADIOBUTTON is "on" when the value contained in the model is equal to its
onvalue.
-->
<!ELEMENT RADIOBUTTON (CONSTRAINTS? , APPEARANCE?)>
<!--
name                        Name of this checkbutton
model                       reference to the value model for this button. Must be a                             valid IDREF to a model defined in the MODELS                             section of this ui specification.
icon                        Icon to display for this check button when model is FALSE
disabledicon                Icon to display when button is disabled and model is FALSE
disabledselectedicon        Icon to display when button is disabled and model is TRUE
pressedicon                 Icon to display when button is pressed
selectedicon                Icon to display for this check button when model is TRUE
rollovericon                Icon to display when the mouse is over this button and model is FALSE.
rolloverselectedicon        Icon to display when the mouse is over this button and model is TRUE.
alignment                   Text position relative to the checkbox
text                        Text (label) for this check button
onvalue                     Value in the value model for which this radio button turns on
-->
<!ATTLIST RADIOBUTTON  name                 CDATA  #REQUIRED
                         text                 CDATA  #REQUIRED
                         model                IDREF  #REQUIRED
                         onvalue              CDATA  #REQUIRED
                         icon                 CDATA  #IMPLIED
                         disabledicon         CDATA  #IMPLIED
                         disabledselectedicon CDATA  #IMPLIED
                         pressedicon          CDATA  #IMPLIED
                         rollovericon         CDATA  #IMPLIED
                         rolloverselectedicon CDATA  #IMPLIED
                         selectedicon         CDATA  #IMPLIED
                         alignment             (left | right )  #IMPLIED >
<!--
a WIDGET is used to embed non-xmltalk third party components into an XMLTalk UI.
Instances of widgets are obtained by calling the specified method on "myself". The result is assumed to
be a JComponent that will be embedded in the parent view using the layout constraints specified in this
element's CONSTRAINTS child. If scrollable is true, it will first be decoarated with a JScrollPane. In this
case it can be beneficial to specify a viewport size for the scrollpane.
-->
<!ELEMENT WIDGET (CONSTRAINTS? , APPEARANCE?)>
<!--
name            Name to give this widget. Can be used to find it with <TT>widgetAt(name)</TT>
method          Method of owning application model to call to get an instance of this widget
scrollable      Indicates whether this widget needs to be embedded in a ScrollPane or not
viewportsize    Size of the visible area when scrollable
-->
<!ATTLIST WIDGET    name         CDATA  #REQUIRED
                    method       CDATA  #REQUIRED
                    scrollable    (false | true )  'false'
                    viewportsize CDATA  #IMPLIED >
<!--
SPLITVIEW works the same way as CARDVIEW,NOTEBOOK,DESKTOP and nested VIEW.
In other words a SPLITVIEW contains two (fixed) nested VIEW elements. The first one is the left (or top) view,
the second one is the right (or top) view. The model attribute refers to a ValueModel holding the ratio (a Float)
-->

<!ELEMENT SPLITVIEW (CONSTRAINTS? , APPEARANCE? , VIEW+)>
<!--
name            Name for this SPLITVIEW
model           Value model that holds the current ratio
orientation     The direction of the splitter
oneclickexpand   Indicates whether or not to allow the user to expand or                 collapse the splitter with a single click
barwidth        Width of the splitter in pixels
-->
<!ATTLIST SPLITVIEW  name           CDATA  #REQUIRED
                       model          IDREF  #REQUIRED
                       orientation     (horizontal | vertical )  #REQUIRED
                       oneclickexpand  (true | false )  'true'
                       barwidth       CDATA  #IMPLIED >

<!--
Specifies the layout constraints for a VIEW or widget
-->
<!ELEMENT CONSTRAINTS (GRIDBAG | BORDER | EASYGRID)?>

<!--
Specifies GridbagConstraints for a VIEW or widget
-->
<!ELEMENT GRIDBAG EMPTY>

<!--
anchor              This field is used when the component is smaller than its                     display area. It determines where, within the display area,                     to place the component. Possible values are CENTER, NORTH,                     NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST, and                     NORTHWEST. The default value is CENTER.
fill                This field is used when the component's display area is                     larger than the component's requested size. It determines                     whether to resize the component, and if so, how.                     The following values are valid for fill:                     <ul><li>NONE: Do not resize the component.                     <li>HORIZONTAL: Make the component wide enough to fill its                     display area horizontally, but do not change its height.                     <li>VERTICAL: Make the component tall enough to fill its                     display area vertically, but do not change its width.                     <li>BOTH: Make the component fill its display area                     entirely.</ul>                     The default value is NONE.
gridx               Specifies the cell at the left of the component's display                     area, where the leftmost cell has gridx=0. The value RELATIVE                     specifies that the component be placed just to the right of                     the component that was added to the container just before                     this component was added. <BR>                     The default value is RELATIVE. gridx should be a non-negative                     value.
gridy               Specifies the cell at the top of the component's display                     area, where the topmost cell has gridy=0. The value RELATIVE                     specifies that the component be placed just below the component                     that was added to the container just before this component                     was added. <BR>                     The default value is RELATIVE. gridy should be a                     non-negative value.
gridwidth           Specifies the number of cells in a row for the component's                     display area.<BR> \ 
                    Use REMAINDER to specify that the component be the last one                     in its row. Use RELATIVE to specify that the component be                     the next-to-last one in its row.
gridheight          Specifies the number of cells in a column for the component's                     display area. <BR>                     Use REMAINDER to specify that the component be the last one                     in its column. Use RELATIVE to specify that the component be                     the next-to-last one in its column.
insets              This field specifies the external padding of the component,                     the minimum amount of space between the component and the                     edges of its display area. Example: insets = "2,2,2,2".
ipadx               This field specifies the internal padding of the component,                     how much space to add to the minimum width of the component.                     The width of the component is at least its minimum width plus                     (ipadx * 2) pixels.
ipady               This field specifies the internal padding, that is, how much                     space to add to the minimum height of the component.                     The height of the component is at least its minimum height                     plus (ipady * 2) pixels.
weightx             Specifies how to distribute extra horizontal space.                     The grid bag layout manager calculates the weight of a                     column to be the maximum weightx of all the components in a                     column. If the resulting layout is smaller horizontally than                     the area it needs to fill, the extra space is distributed to                     each column in proportion to its weight. A column that has a                     weight of zero receives no extra space. <BR>                     If all the weights are zero, all the extra space appears                     between the grids of the cell and the left and right edges.
weighty             Specifies how to distribute extra vertical space.                     The grid bag layout manager calculates the weight of a row                     to be the maximum weighty of all the components in a row.                     If the resulting layout is smaller vertically than the area                     it needs to fill, the extra space is distributed to each row                     in proportion to its weight. A row that has a weight of zero                     receives no extra space. <BR>                     If all the weights are zero, all the extra space appears                     between the grids of the cell and the top and bottom edges.
-->
<!ATTLIST GRIDBAG  anchor      (CENTER |
                                  NORTH |
                                  SOUTH |
                                  EAST |
                                  WEST |
                                  NORTHEAST |
                                  NORTHWEST |
                                  SOUTHEAST |
                                  SOUTHWEST )  #IMPLIED
                     fill        (NONE | HORIZONTAL | VERTICAL | BOTH )  #IMPLIED
                     gridx      CDATA  #IMPLIED
                     gridy      CDATA  #IMPLIED
                     gridwidth  CDATA  #IMPLIED
                     gridheight CDATA  #IMPLIED
                     insets     CDATA  #IMPLIED
                     ipadx      CDATA  #IMPLIED
                     ipady      CDATA  #IMPLIED
                     weightx    CDATA  #IMPLIED
                     weighty    CDATA  #IMPLIED
>

<!--
BORDER specifies the BorderLayout constraint.
-->
<!ELEMENT BORDER EMPTY>
<!--
side            Specifies where in the conatiner this widget or view will be placed.                 Default value is Center.
-->
<!ATTLIST BORDER  side  (Center | North | South | East | West )  'Center' >

<!--
Specifies the constraints for a widget in a <A href="VIEW.html">VIEW</A>
with a <A href="EASYGRIDLAYOUT.html">EASYGRIDLAYOUT</A>
-->
<!ELEMENT EASYGRID EMPTY>
<!--
gridx           x coordinate of the top left cell where this component starts
gridy           y coordinate of the top left cell where this component starts
width           number of columns this component will occupy
height          number of rows this component will occupy
-->
<!ATTLIST EASYGRID  gridx  CDATA  #REQUIRED
                      gridy  CDATA  #REQUIRED
                      width  CDATA  #REQUIRED
                      height CDATA  #REQUIRED >

<!--
All optional properties that apply to most if not all widgets are specified in
an APPEARANCE element.
-->
<!ELEMENT APPEARANCE EMPTY>
<!--
background              Background color specified by name (the names of the constants                         defined in the java.awt.Color class) or as a comma-separated                         R,G,B triplet. Example: 255,255,255 is white
foreground              Foreground color specified by name (the names of the constants                         defined in the java.awt.Color class) or as a comma-separated                         R,G,B triplet. Example: 255,255,255 is white
cursor                  Defines the shape of the mouse cursor when it is on top of this                         component. Values are named after the constants defined in the                         java.awt.CURSOR class.
font                    Specifies the font used for text in this component. Font is                         specified as a comma-separated list name,style,size. These are                         used as the 3 arguments to the java.awt.Font constructor.
border                  Specifies what kind of border to draw around this component.
borderlabel             Specifies to draw a String as a label inside the border. The only                         supported position of this label is currently top left.
borderfont              Specifies which font to use for the border label
bordercolor             Specifies a color for the border label
buffering               Specifies whether or not to use double buffereing when                         drawing this component
disabled                If true, the component is initially disabled
-->
<!ATTLIST APPEARANCE    background  CDATA  #IMPLIED
                        foreground  CDATA  #IMPLIED
                        cursor       (CROSSHAIR |
                                      CUSTOM |
                                      DEFAULT |
                                      E_RESIZE |
                                      HAND |
                                      MOVE |
                                      N_RESIZE |
                                      NE_RESIZE |
                                      NW_RESIZE |
                                      S_RESIZE |
                                      SE_RESIZE |
                                      SW_RESIZE |
                                      TEXT |
                                      W_RESIZE |
                                      WAIT )  #IMPLIED
                        font        CDATA  #IMPLIED
                        border       (grooved | lowered | raised )  #IMPLIED
                        borderlabel CDATA  #IMPLIED
                        borderfont  CDATA  #IMPLIED
                        bordercolor CDATA  #IMPLIED
                        buffering    (false | true )  'false'
                        disabled     (false | true )  'false' >

<!--
Specifies that the VIEW uses a GridBagLayout as its layout manager.
-->
<!ELEMENT GRIDBAGLAYOUT EMPTY>

<!--
Specifies that the VIEW uses a BorderLayout as its layout manager.
-->
<!ELEMENT BORDERLAYOUT EMPTY>
<!--
hgap        horizontal space between components
vgap        vertical space between components
-->
<!ATTLIST BORDERLAYOUT    hgap CDATA  #IMPLIED
                          vgap CDATA  #IMPLIED >

<!--
Specifies that the VIEW uses a GridLayout as its layout manager.
-->
<!ELEMENT GRIDLAYOUT EMPTY>
<!--
hgap        horizontal space between components
vgap        vertical space between components
columns     number of columns in the grid
rows        number of rows in the grid
-->
<!ATTLIST GRIDLAYOUT    columns CDATA  #REQUIRED
                        rows    CDATA  #REQUIRED
                        hgap    CDATA  #REQUIRED
                        vgap    CDATA  #REQUIRED
>

<!--
Specifies that the VIEW must use a GraphpaperLayout. This is a third party
free layout manager that is a variation on the gridlayout. It allows components
to span rows and columns. See also <A href="EASYGRID.html">EASYGRID</A>
-->
<!ELEMENT EASYGRIDLAYOUT EMPTY>
<!--
hgap        horizontal space between components
vgap        vertical space between components
columns     number of columns in the grid
rows        number of rows in the grid
-->
<!ATTLIST EASYGRIDLAYOUT    columns CDATA  #REQUIRED
                            rows    CDATA  #REQUIRED
                            hgap    CDATA  #IMPLIED
                            vgap    CDATA  #IMPLIED
>

<!--
Specifies that the VIEW must use a FlowLayout as its layout manager.
-->
<!ELEMENT FLOWLAYOUT EMPTY>
<!--
alignment       Specifies how components are aligned within the container
hgap            horizontal space between components
vgap            vertical space between components
-->
<!ATTLIST FLOWLAYOUT  alignment  (left | center | right )  'center'
                        hgap      CDATA  #IMPLIED
                        vgap      CDATA  #IMPLIED
>

<!--
A MENUBAR is used for toplevel VIEW elements only. It specifies a list of MENU
elements that each specify a menu to be added just below the title bar of the
toplevel window or inner frame in a DESKTOP.
-->
<!ELEMENT MENUBAR (MENU)+>

<!--
Use this section of the UI specification to define any popup menus for use by
widgets that support popups (LISTBOX, TABLE and TREE at this time (8/20/2001)).
-->
<!ELEMENT POPUPMENUS (POPUPMENU)+>

<!--
A MENU is a list of menu items, separators, checkboxes or radio buttons.
-->
<!ELEMENT MENU (SEPARATOR* | MENUITEM* | MENU* | CHECKMENUITEM* | RADIOMENUITEM*)+>
<!--
text        The only attribute of MENU is the one specifying which text to display in             the parent MENU or MENUBAR.
-->
<!ATTLIST MENU  text CDATA  #REQUIRED >

<!--
A POPUPMENU is simply a MENU with a name so it can be referenced by other elements in
their popup attribute.
-->
<!ELEMENT POPUPMENU (SEPARATOR* | MENUITEM* | MENU* | CHECKMENUITEM* | RADIOMENUITEM*)+>
<!--
name        Name of this popup menu. Used by LISTBOX, TABLE or TREE to define this popup as             the popup menu to display on right mouse click.
-->
<!ATTLIST POPUPMENU  name ID  #REQUIRED >

<!--
Adds a separator line to a MENU or TOOLBAR
-->
<!ELEMENT SEPARATOR EMPTY>

<!--
Adds a menu item to a MENU. A menu item invokes an action when selected
-->
<!ELEMENT MENUITEM EMPTY>
<!--
action      References an action defined in ACTIONS.
-->
<!ATTLIST MENUITEM  action IDREF  #REQUIRED >

<!--
Same as CHECKBUTTON, but part of a MENU
-->
<!ELEMENT CHECKMENUITEM EMPTY>
<!--
model                       reference to the value model for this button. Must be a                             valid IDREF to a model defined in the MODELS                             section of this ui specification.
icon                        Icon to display for this check button when model is FALSE
disabledicon                Icon to display when button is disabled and model is FALSE
disabledselectedicon        Icon to display when button is disabled and model is TRUE
pressedicon                 Icon to display when button is pressed
selectedicon                Icon to display for this check button when model is TRUE
rollovericon                Icon to display when the mouse is over this button and model is FALSE.
rolloverselectedicon        Icon to display when the mouse is over this button and model is TRUE.
alignment                   Text position relative to the checkbox
text                        Text (label) for this check button
-->
<!ATTLIST CHECKMENUITEM    text                 CDATA  #REQUIRED
                           model                IDREF  #REQUIRED
                           icon                 CDATA  #IMPLIED
                           disabledicon         CDATA  #IMPLIED
                           disabledselectedicon CDATA  #IMPLIED
                           pressedicon          CDATA  #IMPLIED
                           rollovericon         CDATA  #IMPLIED
                           rolloverselectedicon CDATA  #IMPLIED
                           selectedicon         CDATA  #IMPLIED
>

<!--
Same as RADIOBUTTON, but part of a MENU
-->
<!ELEMENT RADIOMENUITEM EMPTY>
<!--
model                       reference to the value model for this button. Must be a                             valid IDREF to a model defined in the MODELS                             section of this ui specification.
icon                        Icon to display for this check button when model is FALSE
disabledicon                Icon to display when button is disabled and model is FALSE
disabledselectedicon        Icon to display when button is disabled and model is TRUE
pressedicon                 Icon to display when button is pressed
selectedicon                Icon to display for this check button when model is TRUE
rollovericon                Icon to display when the mouse is over this button and model is FALSE.
rolloverselectedicon        Icon to display when the mouse is over this button and model is TRUE.
alignment                   Text position relative to the checkbox
text                        Text (label) for this check button
-->
<!ATTLIST RADIOMENUITEM    text                 CDATA  #REQUIRED
                           model                IDREF  #REQUIRED
                           onvalue              CDATA  #REQUIRED
                           icon                 CDATA  #IMPLIED
                           disabledicon         CDATA  #IMPLIED
                           disabledselectedicon CDATA  #IMPLIED
                           pressedicon          CDATA  #IMPLIED
                           rollovericon         CDATA  #IMPLIED
                           rolloverselectedicon CDATA  #IMPLIED
                           selectedicon         CDATA  #IMPLIED
>

<!--
A COMBOBOX renders a list of objects as a dropdown list of items. Currently, the
user can edit the text in the input field part of the combobox, but it is unspecified
what the application does with this modified or new data. What I want to do is
have this data be automatically added to the listHolder of the underlying model, but
there are issues with text to object conversions. Probably a 3.0 feature. For lists
that don't change this is not a problem though.
-->
<!ELEMENT COMBOBOX (CONSTRAINTS? , APPEARANCE?)>
<!--
name            Name of this widget
model           Reference to a SelectionInList specified in MODELS
editable        If true, the user can modify the text. Not recommended at this point
rows            Number of elements that will be displayed without a scrollbar on the dropdown.
-->
<!ATTLIST COMBOBOX    name     CDATA  #REQUIRED
                      model    IDREF  #REQUIRED
                      editable  (false | true )  #IMPLIED
                      rows     CDATA  #IMPLIED
>

<!--
SLIDER renders a JSlider representation of the underlying RangeAdaptor model.
-->
<!ELEMENT SLIDER (CONSTRAINTS? , APPEARANCE?)>
<!--
name                Name of this slider widget
model               Reference to a RANGEADAPTOR model in MODELS
orientation         Is this a vertical or horizontal slider?
ticks               Whether or not to draw tick marks on the slider
track               Whether or not to draw a track
filled              Whether or not to fill up the slider up to the value
labels              Whether or not to draw labels with the tick marks
major               Interval between major tick marks
minor               Interval between minor tick marks
labeltable          Not used at this time (8/20/2001)
inverted            Specify true to reverse the value-range shown for the slider                     and false to put the value range in the normal order. The order                     depends on the slider's orientation property. Normal (non-inverted)                     horizontal sliders with a ComponentOrientation value of LEFT_TO_RIGHT                     have their maximum on the right. Normal horizontal sliders with a
                    orientation value of RIGHT_TO_LEFT have their maximum on the left.                     Normal vertical sliders have their maximum on the top. These labels are                     reversed when the slider is inverted.
snap                Specifying true makes the knob (and the data value it represents)                     resolve to the closest tick mark next to where the user positioned the knob.
-->
<!ATTLIST SLIDER    name        CDATA  #REQUIRED
                    model       IDREF  #REQUIRED
                    orientation  (HORIZONTAL | VERTICAL )  #REQUIRED
                    ticks        (false | true )  #IMPLIED
                    track        (false | true )  #IMPLIED
                    filled       (false | true )  #IMPLIED
                    labels       (false | true )  #IMPLIED
                    major       CDATA  #IMPLIED
                    minor       CDATA  #IMPLIED
                    labeltable  CDATA  #IMPLIED
                    inverted     (false | true )  #IMPLIED
                    snap         (false | true )  #IMPLIED
>

<!--
PROGRESSBAR renders a JProgressBar representation of the underlying RangeAdaptor model.
-->
<!ELEMENT PROGRESSBAR (CONSTRAINTS? , APPEARANCE?)>
<!--
name                Name of this progress widget
model               Reference to a RANGEADAPTOR model in MODELS
orientation         Is this a vertical or horizontal progressbar?
painstring          Whether or not to draw a string in the filled area of the bar.
string              String to draw in the filled area of the progress bar.                     By default it draws "<value> %" if paintstring is true but                     no custom string is specified.
-->
<!ATTLIST PROGRESSBAR    name        CDATA  #REQUIRED
                         model       IDREF  #REQUIRED
                         orientation  (HORIZONTAL | VERTICAL )  #REQUIRED
                         paintstring  (false | true )  #IMPLIED
                         string      CDATA  #IMPLIED
>

<!--
A SCROLLBAR renders an underlying RangeAdaptor as a JScrollbar. You rarely have to
use this since scrollable views and widgets have a scrollable attribute.
-->
<!ELEMENT SCROLLBAR (CONSTRAINTS? , APPEARANCE?)>
<!--
name                Name of this scrollbar
model               Reference to a RANGEADAPTOR model in MODELS
orientation         Is this a vertical or horizontal scrollbar?
unitincrement       Determines how much the value increases/decreases upon a click on the arrow
blockincrement      Detrermines how much the value decreases/increases on pagedown or up
-->
<!ATTLIST SCROLLBAR    name           CDATA  #REQUIRED
                       model          IDREF  #REQUIRED
                       orientation     (HORIZONTAL | VERTICAL )  #REQUIRED
                       unitincrement  CDATA  #IMPLIED
                       blockincrement CDATA  #IMPLIED
>

<!--
A TOOLBAR is a sequence of ACTIONREF elements which refer to PERFORMACTION
elements defined under the ACTIONS section. ACTIONREF objects can be spaced
by adding SEPARATOR elements between them. A TOOLBAR can be vertical or horizontal
and can be defined to be floatable (so it can be put in its own window, separate
from the application window).
-->
<!ELEMENT TOOLBAR (CONSTRAINTS? , APPEARANCE? , (ACTIONREF | SEPARATOR)*)>
<!--
name                Name of the toolbar
orientation         Is this a vertical or horizontal toolbar?
floatable           Can this toolbar be dragged away from the main window?
-->
<!ATTLIST TOOLBAR  name        CDATA  #REQUIRED
                     orientation  (HORIZONTAL | VERTICAL )  #IMPLIED
                     floatable    (false | true )  #IMPLIED
>

<!--
A reference to an action defined in ACTIONS. USed in TOOLBAR
-->
<!ELEMENT ACTIONREF EMPTY>
<!--
action              Reference to the action
showtext            If false, the text defined by the ACTION will not be displayed
tooltip             Text to dispolay when the mouse cursor hovers over this toolbar 'button'                     for a prolonged period.
-->
<!ATTLIST ACTIONREF    action   IDREF  #REQUIRED
                       showtext  (false | true )  #IMPLIED
                       tooltip  CDATA  #IMPLIED
>

<!--
Probably the most complicated widget in both Swing and XMLTalk. A table renders the data
in a SelectionInList as a JTable. The application model can specify a custom table model
by implementing the com.trcinc.com.xmltalk.table.TableModelProvider interface or the table
can be specified further in the XML ui specification using the ROWHEADER and COLUMNS elements.
Editable cells use the same widget as INPUTFIELD so they have the same validation and formatting
capabilities.
-->
<!ELEMENT TABLE (CONSTRAINTS? , APPEARANCE? , ROWHEADER? , COLUMNS?)>
<!--
name                    Name of the table
model                   Reference to a SelectionInList in MODELS
autoresize              Determines how a resize of the table translates to                         resizing the individual columns
showgrid                Whether or not to draw lines between the cells
horizontallines         Whether or not to draw lines between the rows
verticallines           Whether or not to draw lines between the columns
allowreordering         Allow the user to reorder the columns by dragging them
allowresizing           Allow the user to resize the column width
striped                 Draw alternate colors for rows (Currently broken after moving to JDK1.3)
selectionbackground     Background color of the selected row
selectionforeground     Foreground color of the selected row
oddbackground           When striped, this specifies the background color for the odd numbered rows
evenbackground          When striped, this specifies the background color for the even numbered rows
oddforeground           When striped, this specifies the foreground color for the odd numbered rows
evenforeground          When striped, this specifies the foreground color for the even numbered rows
viewportsize            Size of the visible area of the table when the table is larger than                         what can be shown.
sortable                Allows the user to sort on each column by clicking on it
paging                  Breaks the data from the model up into smaller pages to allow                         for faster table rendering.
pagesize                If paging, this specifies the page size in number of rows
popup                   Reference to a POPUP menu specified in POPUPS
-->
<!ATTLIST TABLE    name                CDATA  #REQUIRED
                   model               IDREF  #REQUIRED
                   autoresize          (ALL_COLUMNS |
                                        LAST_COLUMN |
                                        NEXT_COLUMN |
                                        OFF |
                                        SUBSEQUENT_COLUMNS )  #IMPLIED
                   showgrid             (false | true )  #IMPLIED
                   horizontallines      (false | true )  #IMPLIED
                   verticallines        (false | true )  #IMPLIED
                   allowreordering      (false | true )  #IMPLIED
                   allowresizing        (false | true )  #IMPLIED
                   striped              (false | true )  #IMPLIED
                   selectionbackground CDATA  #IMPLIED
                   selectionforeground CDATA  #IMPLIED
                   oddbackground       CDATA  #IMPLIED
                   evenbackground      CDATA  #IMPLIED
                   evenforeground      CDATA  #IMPLIED
                   oddforeground       CDATA  #IMPLIED
                   viewportsize        CDATA  #IMPLIED
                   sortable             (false | true )  #IMPLIED
                   paging               (false | true )  #IMPLIED
                   pagesize            CDATA  #IMPLIED
                   popup               IDREF  #IMPLIED
>

<!--
Specifies a list of COLUMN elements for a TABLE
-->
<!ELEMENT COLUMNS (COLUMN+)>

<!--
Specifies a ROWHEADER for a TABLE. A ROWHEADER is a COLUMN that will not be scrolled
when the table is scrolled horizontally. It is rendered the same way as column headers.
-->
<!ELEMENT ROWHEADER EMPTY>
<!--
header              Text to display on top of the column (to the left of the column headers)
aspect              Method to invoke on the object in the model to get the text to use for the row header
width               Width in pixels of the row header cells
-->
<!ATTLIST ROWHEADER     header CDATA  #REQUIRED
                        aspect CDATA  #REQUIRED
                        width  CDATA  #IMPLIED >

<!--
Specifies properties for a column in a TABLE.
-->
<!ELEMENT COLUMN EMPTY>
<!--
header              Column header text
class               Class of the data in the cells in this column, e.g. String or Integer
aspect              Method to invoke on the object for this row to get the data for this cell
minwidth            Minimum width in pixels for this column
maxwidth            Maximum width in pixels for this column
width               Initial width for this column
editable            Whether or not this cell is editable
decimalformat       For numeric editable cells, specifies the decimal format string. See INPUTFIELD
mask                For numeric editable cells, specifies the mask. See INPUTFIELD
-->
<!ATTLIST COLUMN    header        CDATA  #REQUIRED
                    class         CDATA  #REQUIRED
                    aspect        CDATA  #REQUIRED
                    minwidth      CDATA  #IMPLIED
                    maxwidth      CDATA  #IMPLIED
                    width         CDATA  #IMPLIED
                    editable       (false | true )  #IMPLIED
                    decimalformat CDATA  #IMPLIED
                    mask          CDATA  #IMPLIED
>

<!--
A TREE specifies a JTree. In XMLTalk The JTree widget has been augmented with drag and drop
and other capabilities not found in Swing such as node icons and node filters.
-->
<!ELEMENT TREE (CONSTRAINTS? , APPEARANCE?)>
<!--
name                    Name of this tree
model                   Reference to a SELECTIONINTREE defined in MODELS
onexpand                Defines a callback method in the ApplicationModel invoked                         when a node expands.
oncollapse              Defines a callback method in the ApplicationModel invoked                         when a node is collapsed
rowHeight               height in pixels of each row in the tree
visibleRowsCount        How many rows are shown without scrollbars
largeModel              Sets the JTree largeModel property
showsRootHandles        Sets the JTree showsRootHandles property
rootVisible             Show or hide the root node
scrollsOnExpand         Make the tree scroll to make the children of an expanded node visible
nodeDefinesPopup        Indicates that the TreeNode objects in the model define their own popup menus.                         See the com.trcinc.xmltalk.tree.PopupProvider interface
dragSource              Specifies a method in the ApplicationModel that returns a drag source for this tree
dropTarget              Specifies a method in the ApplicationModel that returns a drop target for this tree
-->
<!ATTLIST TREE    name             CDATA  #REQUIRED
                  model            IDREF  #REQUIRED
                  onexpand         CDATA  #IMPLIED
                  oncollapse       CDATA  #IMPLIED
                  rowHeight        CDATA  #IMPLIED
                  visibleRowsCount CDATA  #IMPLIED
                  largeModel        (false | true )  #IMPLIED
                  showsRootHandles  (false | true )  #IMPLIED
                  rootVisible       (false | true )  #IMPLIED
                  scrollsOnExpand   (false | true )  #IMPLIED
                  nodeDefinesPopup  (false | true )  #IMPLIED
                  dragSource       CDATA  #IMPLIED
                  dropTarget       CDATA  #IMPLIED >