You are hereAria User Guide / Appendix / Reference

Reference


By luano - Posted on 14 January 2009

This chapter includes a collection of cross reference information.

Component attributes

The basic component factories process a small number of attributes that are common to all built-in (core) components:

Common component attributes
Attribute Usage
x The X or horizontal coordinate of the component when a null, absolute or guide layout is used.
y The Y or vertical coordinate of the component when a null, absolute or guide layout is used.
w The width coordinate of the component when a null, absolute or guide layout is used.
h The height coordinate of the component when a null, absolute or guide layout is used.
style The name of the style to be applied to the component
name The name by which the component will be referenced. All components that have events, data bindings, validations or other references should be named.
type The type of the component. This parameter has been deprecated. Originally it was used when all components were specified with a component xml element.
content The usage depends on the component. For components such as labels and edit fields that display test this attribute sets the component test. For others such as images or meta components then the attribute specifies the filename containing the required data or content.
constraint This is the layout manager constraint for the component and it's value should reflect the appropriate layout manager choices.
key This is the key into the resource bundle file. The value is used to set the text in situations where the text is localized or translated. The key should be contained in the resource bundle pointed to by the page's resource attribute.
opaque* Flags an opaque component
visible Sets the visible / invisible state of the component prior to initial display
enabled Sets the enabled / disabled state of the component prior to initial display

A number of components use the AttributedComponent interface to set special attributes, these are listed below:

Component specific attributes
Component Attribute Usage
Checkbox selected Sets the selected state of the check box, values=true|false
Image content A String value specifying the image name. The file name must be one that can be processed by the project and normally this means that the file is on the project classpath or in one of the subdirectories of the project such as the resources folder.
  imagename A synonym for the above.
Label align Sets the horizontal alignment of the label text. Possible values are: "left", "right" and "center"
  alignment A synonym for the above.
  buffered A boolean value to turn double buffering on or off. Double buffering may have a slight impact on the repaint performance, the setting can also be modifed via the toolkit.
  opaque* If true the component paints every pixel within its bounds. Otherwise, the component may not paint some or all of its pixels, allowing the underlying pixels to show through
Panel border Turns on or off the painting of the panel's border. If a value of 0 os used then no frame is drawn. For a value of 1 a single line is drawn around the frame in a colour just darker than the background. If a value of 2 is passed in then a 3d effect is used to show a raised border.
RadioButton selected Sets the selected state of the radio button, values=true|false. Setting this value will automatically set up a group for the radio button if none is already available. A new group is created for the first such radio button encountered within a container or panel.
  alignment* Sets the horizontal alignment of the icon and text: SwingConstants.RIGHT (the default),
SwingConstants.LEFT,
SwingConstants.CENTER,
SwingConstants.LEADING,
SwingConstants.TRAILING
Table headingStyle Sets the header style, the style refers to the styles listed in the Aria style file.
  selectionStyle Sets the style for the selected row within the table
  borderStyle Set the style for the table's border
  interactive Flags whether or not the user can select a row within the table, values=true|false
  updateModel Tie the model selection to the table's selection
Button alignment Sets the horizontal alignment of the icon and text: SwingConstants.RIGHT (the default),
SwingConstants.LEFT,
SwingConstants.CENTER,
SwingConstants.LEADING,
SwingConstants.TRAILING
Edit alignment* Sets the horizontal alignment of the icon and text: SwingConstants.RIGHT (the default),
SwingConstants.LEFT,
SwingConstants.CENTER,
SwingConstants.LEADING,
SwingConstants.TRAILING
  border* Sets the border of this component. A value of zero turns off the border
  editable Sets the editable property of a Swing edit component
  margin* Sets margin space between the text component's border and its text. The value is the size of the margin in pixels.
  format* Sets the formatter for the edit field. The value can be

integer for an edit that only allows integer values

currency for an edit that only allows monetary values

date for an edit that only allows date values

decimal for an edit that only allows decimal values

or a mask specification for a mask format. See the JFormattedTextField documentation for more information. More precise control can be obtained by setting up a formatter in code and using the setFormatter method.

Password alignment* Sets the horizontal alignment of the icon and text: SwingConstants.RIGHT (the default),
SwingConstants.LEFT,
SwingConstants.CENTER,
SwingConstants.LEADING,
SwingConstants.TRAILING
ScrollableMetaContent horizontal scrollbar* Determines when the horizontal scrollbar appears in the scrollpane. Legal values are:"as needed", "always" and "never"
  vertical scrollbar* Determines when the vertical scrollbar appears in the scrollpane. Legal values are:"as needed", "always" and "never"
Scrollbar horizontal scrollbar* Determines when the horizontal scrollbar appears in the scrollpane. Legal values are:"as needed", "always" and "never"
  vertical scrollbar* Determines when the vertical scrollbar appears in the scrollpane. Legal values are:"as needed", "always" and "never"
SplitPane orientation Sets the orientation of the splitter. A value of "horz" creates a horizontal split, anything else gives a vertical split
  location Sets the devider size. The size may be an integer or double value.
  size Set the devider size in pixels.
Table2 headingStyle Sets the header style, the style refers to the styles listed in the Aria style file.
  selectionStyle Sets the style for the selected row within the table
  borderStyle Set the style for the table's border
  interactive Flags whether or not the user can select a row within the table, values=true|false
  updateModel Tie the model selection to the table's selection
TextArea rows* The number of rows
  columns* The number of columns
  wrap* Turn wrapping on or off with a value of true or false
  wordwrap* Turns wrapping at word breaks on or off with a value of true or false
  editable Sets the editable property of a Swing edit component
  border* Creates a line border if this attribute is found
Page class The name of the page class to be used for this page's implementation
  resource The name of the resource bundle
  layout The type of layout manger

*applies to the Swing version of the component only