Introduction
The container and component objects used to design user interfaces have
a variety of properties that are different for each object class. This
document lists the properties that can be used with each object, including
comments and examples. These properties are accessed on the Attributes
panel in the Properties Panel in the
Design Window of Jargon Writer.
All properties in the Attributes panel are shown in a 2-column table
as "Property" and "Value" pairs. The Value can be selected or entered in
several ways, depending on the type of Property. These Value types are
listed below after the name of each property. The possible value types
are:
- Text - a normal textfield in which a value can be keyed directly.
- Combobox - a drop-down combo box with two or more choices.
- Boolean - a combo box with true/false choices.
- Special Editor - a display-only text string (sometimes a Java class
name) with a small button at the right edge of the value field which opens
a specialized editor window for this property when it is clicked. Various
special editor windows are used to select images, borders, layout managers,
and similar properties.
Application "Root" Properties
The "root" node of an application contains properties that apply to
the application as a whole, not necessarily to any one container or component.
Note that several properties such as HostURL and Script name that were
"root" properties in Version 1 are now specified in the external "system/preferences.ini"
file in Version 2.
- name (Text) The name of this app, used both internally and for the
external filename: <name>.xml.
- initTasklist (Text) The name of a function defined in the Script
Editor window which should be run immediately after this app is loaded,
before any user interaction is allowed.
Common Object Properties
Many container and component objects have the following properties,
which are listed here once rather than repeating them under each type of
object. (All objects have the "name" property).
- name (Text) The internal name of the object, which must be unique
within this app.
- toolTipText (Text) A one-line context-sensitive help message that
will be displayed when the application is run and the mouse cursor is left
motionless over this object for a few seconds. The message can be up to
79 characters in length (Windows default size). Not supported on PalmOS.
- isVisible (Boolean) Determines whether this object is displayed
on the screen (true) or is hidden and only exists in memory (false).
- isEnabled (Boolean) Determines whether an object is initially enabled
for input (true) or disabled to prevent user input or selection (false)
when it is first created and displayed. Not yet supported on most components.
Container Properties
Frame
- title (Text) The title that will be displayed in the top border
of the frame when it is visible.
- layout (Special Editor) Specifies the Java layout manager used for
this frame. Default (and only standard selection) is the java.awt.GridBagLayout.
Panel
- layout (Special Editor) Specifies the Java layout manager used for this panel.
Default (and only standard selection) is the java.awt.GridBagLayout.
- border (Special Editor) Specifies the border type, using the Border
Editor window which is opened by clicking the small button on the right end of
the value field.
Tabpanel (ReaderWIN only)
-
tabPlacement (Combobox) Select TOP(1) or BOTTOM(3) from the
combobox to control where the tabs are positioned on the tabpanel.
Note that this attribute value is stored in the xml file as an integer.
Tab (one of the panels in a tab panel)
-
title (Text) The caption which is displayed on the tab when the
tabpanel is visible.
Cardpanel (ReaderWIN only)
(no special properties; see Common Object Properties)
Card (one of the panels in a card panel)
(no special properties; see Common Object Properties)
Component Properties
Button
- label (Text) The text that will be displayed in the button when it is visible.
- componentSize (Combobox) The default size of the button (amount of white space between
text and button edges). Note that this attribute value is stored in the xml file as an integer.
Minimum (0) - no or very little extra padding, with borders tight to the caption text
Small (1) - one-half of the normal padding values
Normal (2) (the default) - normal padding values
Large (3) - double the normal padding values
- borderType (Combobox) The type of border display around the button:
Note that this attribute value is stored in the xml file as an integer.
Normal (0) - always visible
Hover (1) - visible only when cursor hovers over the button
None (2) - no border visible at any time
- imageFilename (Text) The pathname (relative to the image root directory specified in
the MediaRootDir parameter) of an (optional) image that will be displayed in the button
when it is in a normal enabled state.
- pressedImageFilename (Text) The pathname (relative to the image root directory specified in
the MediaRootDir parameter) of an (optional) image that will be displayed in the button
when it is depressed.
- hoverImageFilename (Text) The pathname (relative to the image root directory specified in
the MediaRootDir parameter) of an (optional) image that will be displayed in the button
when the cursor is over it.
- disabledImageFilename (Text) The pathname (relative to the image root directory specified in
the MediaRootDir parameter) of an (optional) image that will be displayed in the button
when it is disabled.
Special notes about platform-specific button behavior:
On Windows desktop platforms:
- The toolTipText will display as expected.
- If no imageFilename is specified the button will display the label text only, with
the button size specified by the componentSize attribute.
- If only an imageFilename is specified (and no label) then the button will
operate as it does in version 2, and when disabled the image will automatically be "grayed".
- If an imageFilename along with a label or any of the other valid image file names are
specified then the button will be in "owner draw" mode. At this point the text will display
on the bottom of the image (other positions could be added later). Disabled images are not
automatically generated, so one will need to be specified if desired.
- Valid GIF89 images with a transparent color specified will rendered transparent as desired.
On Windows CE and PocketPC platforms:
- The toolTipText attribute is not supported.
- If no imageFilename is specified the button will display the label text only, with
the button size specified by the componentSize attribute.
- No automatic disabled image will be created, unlike the desktop versions.
- All buttons with an image or images are done in "owner draw" mode.
- Valid GIF89 images with a transparent color will always render with a white background,
even though the button has a gray background.
On PalmOS platforms:
- The toolTipText attribute is not supported.
- The borderType attribute is not supported.
- No button images are supported.
Checkbox
- label (Text) The text that will be displayed with the checkbox
image when it is visible.
- defaultValue (Boolean) If true, display the initial state of the
checkbox as selected (checked).
Combobox
- columns (Text) An integer value used to determine the width of the
combobox in "average character" units. The character used to calculate
an average character's pixel width is an uppercase "P".
Hyperlink
- columns (Text) An integer value specifying the width of this hyperlink
in "average character" units. The character used to calculate an average
character's pixel width is an uppercase "P".
- text (Text) The text that will be displayed when the hyperlink is visible (similar
to a label, but underlined to indicate that it is a hyperlink component).
- data (Text) The (optional) initial value of the user data attribute of
the hyperlink, which is not visible.
HyperlinkCellEditor
- columns (Text) An integer value specifying the width of this hyperlink
table column in "average character" units. The character used to calculate
an average character's pixel width is an uppercase "P".
- colTitle (Text) The column title which is displayed above this column
in the table, when it is visible.
- isVisible (Boolean) Determines whether this table column is displayed
on the screen (true) or is hidden and only exists in memory (false).
Image
- width (Text) The width of the image display area in pixels.
- height (Text) The height of the image display area in pixels.
Label
- text (Text) The text that will be displayed when the label is visible.
List Item
- text (Text) The text string displayed for this combobox or
listbox choice.
Menubar
(no special properties; see Common Object Properties)
Menu
-
text (Text) The text which will be displayed as the menu choice
on a menubar or submenu when it is visible.
Menu Item
-
text (Text) The text which will be displayed for this menu choice
on a menu when the menu is visible (drops down).
Passwordfield
- columns (Text) An integer value specifying the width of this special
password textfield in "average character" units. The character used to
calculate an average character's pixel width is an uppercase "P".
- defaultValue (Text) An optional value which will be placed in the
password field when it is created and also whenever a method which resets
components to their default values is invoked on it or (recursively) on
its container. Note that a password field will display asterisks when a
value is displayed or keyed into the textfield, to conceal the actual value
for security purposes.
Passwordfield
- columns (Text) An integer value specifying the width of this passwordfield
in "average character" units. The character used to calculate an average
character's pixel width is an uppercase "P".
- defaultValue (Text) The initial value that will be placed in the
passwordfield when it is created and also whenever a method which resets components
to their default values is invoked on it or (recursively) on its container.
Progressbar
(no special properties; see Common Object
Properties)
Table
initialRowCount (Text) An integer value specifying the initial total
number of rows in the table, of which the "visible row count" is a subset.
If another row is added when the table already has this many rows, this
total will be automatically increased.
visibleRowCount (Text) The number of rows displayed when the table
is visible. If the initialRowCount is greater than the visibleRowCount,
a vertical scroll bar (VSB) will be added automatically.
visibleColumnCount (Text) The number of columns displayed when the
table is visible. If the number of columns is greater than the visibleColumnCount,
a horizontal scroll bar (HSB) will be added automatically.
Textarea
- columns (Text) An integer value specifying the width of this textarea
in "average character" units. The character used to calculate an average
character's pixel width is an uppercase "P".
- rows (Text) An integer value specifying the number of text lines
that will be displayed. This is used for vertical sizing.
- verticalScrollBarPolicy (Combobox) This selection controls whether
a vertical scrollbar is displayed: "AS NEEDED"(20), "NEVER"(21) or "ALWAYS"(22).
Note that this attribute value is stored in the xml file as an integer.
- text (Text) An optional value that will be placed in the textarea
when it is created and also whenever a method which resets components to
their default values is invoked on it or (recursively) on its container.
TextCellEditor
- columns (Text) An integer value specifying the width of this text
table column in "average character" units. The character used to calculate
an average character's pixel width is an uppercase "P".
- colTitle (Text) The column title which is displayed above this column
in the table, when it is visible.
- isVisible (Boolean) Determines whether this table column is displayed
on the screen (true) or is hidden and only exists in memory (false).
Textfield
- columns (Text) An integer value specifying the width of this textfield
in "average character" units. The character used to calculate an average
character's pixel width is an uppercase "P".
- fieldType (Combobox) Selects the type of data allowed in this textfield:
Character (0), Integer(1), Decimal(2), Date(3) or Logical(4).
- defaultValue (Text) The initial value that will be placed in the
textfield when it is created and also whenever a method which resets components
to their default values is invoked on it or (recursively) on its container.
Textpane
columns (Text) An integer value specifying the width of this textpane
in "average character" units. The character used to calculate an average
character's pixel width is an uppercase "P".
rows (Text) An integer value specifying the number of text lines
that will be displayed. This is used for vertical sizing.
verticalScrollBarPolicy (Combobox) This selection controls whether
a vertical scrollbar is displayed: "AS NEEDED"(20), "NEVER"(21) or "ALWAYS"(22).
Note that this attribute value is stored in the xml file as an integer.
text (Text) An optional value that will be placed in the textpane
when it is created and also whenever a method which resets components to
their default values is invoked on it or (recursively) on its container.
Tree
initial Width (int) The initial width (in pixels) of the tree.
initial Height (int) The initial height (in pixels) of the tree.
text (String) The text label on the root node of the tree.
userData (String) An arbitrary character string that can be
used to store any application-specific value for this node. For example,
if a tree is used as a program menu, the userdata might contain the name
of the xml app to run when the node is selected.
imageList (String) A comma-separated list of image filenames (relative
to the image root directory specified in the MediaRootDir or MediaRootURL
parameter). The first entry is selected by setting ImageIndex=0, the second
by ImageIndex=1, etc.
TreeNode
text (String) The text label displayed for this tree node.
imageIndex (int) An integer value which selects the icon to be displayed
for the new node in the tree. Selection is from a comma-separated list
of icon filenames in the tree's root node "imageList" attribute. An index
of zero (0) will select the first (leftmost) image filename in the list,
one (1) selects the next image filename entry, etc. If the list contains
5 image filename entries, any index value of 5 or higher will not select
any image, since 0-4 select the five valid choices.
userData (String) An arbitrary character string that can be used
to store any application-specific value for this node. For example, if
a tree is used as a program menu, the userdata might contain the name of
the xml app to run when the node is selected.
|