|
UIML
v2.0
Draft Spec
DTD
Examples
Vocabularies
UIML
v1.0
Tags
Components
Attributes
|
UIML Interface Components
(UIML 1.0)
JPanel
Toolkit:
com.sun.java.swing
Description:
A container for other
components, similar to Panel, but providing additional support for other
com.sun.java.swing capabilities, such as the ability to support different
look-and-feel settings. JPanels are used to group other components so
their position can be more precisely controlled, or to provide visual
commonality to related components (such as a common background color or
a border).
ALIGNMENT
| Allowed Values
|
Meaning
|
| Center, East, North,
South, West |
With LAYOUT:BorderLayout:
Where to place an interface component in its container. Only one component
may go in each region. In this usage, ALIGNMENT is specified as an
attribute of the component. |
| LEFT, CENTER, RIGHT
|
With LAYOUT:FlowLayout:
How to justify interface components in their container. In this usage,
ALIGNMENT is specified as an attribute of the component (Frame, Panel,
ScrollPane only). |
| CENTER, EAST, NORTH,
NORTHEAST, NORTHWEST, SOUTH, SOUTHEAST, SOUTHWEST, WEST |
With LAYOUT:GridBagLayout:
Placement of interface component in its grid cell. In this usage,
ALIGNMENT is specified as an attribute of the component. |
AUTOSCROLLS
| Allowed Values
|
Meaning
|
| true, false
|
If true, this component
will automatically scroll its contents when dragged, if contained
in a component that supports scrolling. |
BACKGROUND
| Allowed Values
|
Meaning
|
| black, blue, cyan,
darkGray, gray, green, lightGray, magenta, orange, pink, red, white,
yellow |
Set background
color to color name as defined in class java.awt.Color. |
| One of the color
names from java.awt.Color (see above) followed by a - or a + (e.g.,
red- or blue+). |
A suffix of - means
darken the color; a suffix of + means brighten the color. (These correspond
to java.awt.Color.darken() and .brighten().) |
| 0x<six hex digits>
(e.g., 0xFF0000 for pure red). |
Set background
color to RGB (red, green, blue) color specified as 0xRRBBGG, where
RR denotes one of 256 intensities of red (00 to FF), BB denotes the
intensity of blue, and and GG denotes the intensity of green.
|
| A non-negative
integer |
Set background
to RGB color represented by a single integer. Bits 0-7 specify one
of 256 intensities of blue; bits 8-15 green; and bits 16-23 red.
|
| <float>,<float>,<float>
where <float> is between 0 and 1 inclusive (e.g., .667,1,1 for
pure blue). |
Set background
to HSB (hue, saturation, brightness) color specified as a triple of
numbers, where the first is hue, the second is saturation, and the
third is brightness.
· Hue represents the rainbow (0 is white, near 0 are red, near 1 is
magenta, and 1 is black).
· A saturation of 0 is either white or black, depending on brightness;
a saturation of 1 is pure hue color.
· A brightness of 0 is black; a brightness of 1 is maximum color saturation.
|
| activeCaption,
activeCaptionBorder, activeCaptionText, control, controlDkShadow,
controlHighlight, controlLtHighlight, controlShadow, controlText,
desktop, inactiveCaption, inactiveCaptionBorder, inactiveCaptionText,
info, infoText, menu, menuText, scrollbar, textHighlight, textHighlightText,
textInactiveText, textText, window, windowBorder, windowText
|
Set background
to same color as corresponding system item. The allowed values are
defined in class java.awt.SystemColor. (Note: these values work only
on MS Windows platforms.) |
BORDER
| Allowed Values
|
Meaning
|
| LineBorder
|
Creates a single-lined
border around the component. You can control the line's color and
thickness with the LineBorder_Color and LineBorder_Thickness attributes.
|
| RaisedBevelBorder
|
Creates a border
around the component that has the effect of raising the component.
|
| LoweredBevelBorder
|
Creates a border
around the component that has the effect of lowering the component.
|
| CompoundBorder
|
Combination of
the LineBorders. |
| TitledBorder
|
Creates a border
with a title. To control its appearance, use TitledBorder_Title, TitledBorder_Color,
TitledBorder_Font, TitledBorder_Justification, TitledBorder_Position,
and TitledBorder_Border. |
| EmptyBorder
|
Creates an empty
border. |
COLUMNS
| Allowed Values
|
Meaning
|
| A positive integer
|
In GridLayout:
exact number of columns to use. In this usage, COLUMNS is specified
as an attribute of the container. |
| A positive integer
|
In GridBagLayout:
ignored. |
FILL
| Allowed Values
|
Meaning
|
| NONE, BOTH, HORIZONTAL,
VERTICAL |
Which direction
the user interface component should grow in, when its container is
resized and the grid cell size exceeds the user interface component
size. FILL is specified as an attribute of the component.
|
FONT_NAME
| Allowed Values
|
Meaning
|
| Dialog, DialogInput,
Monospaced, SansSerif, Serif |
Generic name of
font, which is mapped to a specific font on the platform on which
Render runs (e.g., sansserif might be mapped to Helvetica).
|
FONT_SIZE
| Allowed Values
|
Meaning
|
| A positive integer
|
Font size, in points.
|
FONT_STYLE
| Allowed Values
|
Meaning
|
| PLAIN, BOLD, ITALIC,
BOLDITALIC |
Font style (bold,
italic, etc.) |
FOREGROUND
| Allowed Values
|
Meaning
|
| black, blue, cyan,
darkGray, gray, green, lightGray, magenta, orange, pink, red, white,
yellow |
Set foreground
color to color name as defined in class java.awt.Color. |
| One of the color
names from java.awt.Color (see above) followed by a - or a + (e.g.,
red- or blue+). |
A suffix of - means
darken the color; a suffix of + means brighten the color. (These correspond
to java.awt.Color.darken() and .brighten().) |
| 0x<six hex digits>
(e.g., 0xFF0000 for pure red). |
Set foreground
color to RGB (red, green, blue) color specified as 0xRRBBGG, where
RR denotes one of 256 intensities of red (00 to FF), BB denotes the
intensity of blue, and and GG denotes the intensity of green.
|
| A non-negative
integer |
Set foreground
to RGB color represented by a single integer. Bits 0-7 specify one
of 256 intensities of blue; bits 8-15 green; and bits 16-23 red.
|
| <float>,<float>,<float>
where <float> is between 0 and 1 inclusive (e.g., .667,1,1 for
pure blue). |
Set foreground
to HSB (hue, saturation, brightness) color specified as a triple of
numbers, where the first is hue, the second is saturation, and the
third is brightness.
· Hue represents the rainbow (0 is white, near 0 are red, near 1 is
magenta, and 1 is black).
· A saturation of 0 is either white or black, depending on brightness;
a saturation of 1 is pure hue color.
· A brightness of 0 is black; a brightness of 1 is maximum color saturation.
|
| activeCaption,
activeCaptionBorder, activeCaptionText, control, controlDkShadow,
controlHighlight, controlLtHighlight, controlShadow, controlText,
desktop, inactiveCaption, inactiveCaptionBorder, inactiveCaptionText,
info, infoText, menu, menuText, scrollbar, textHighlight, textHighlightText,
textInactiveText, textText, window, windowBorder, windowText
|
Set foreground
to same color as corresponding system item. Meaning of the allowed
values is defined in class java.awt.SystemColor. (Note: these values
work only on MS Windows platforms.) |
GRID_HEIGHT
| Allowed Values
|
Meaning
|
| A positive integer
|
Interface component
height, in rows. |
| REMAINDER
|
Set component height
to the number of rows remaining in the grid. |
GRID_WIDTH
| Allowed Values
|
Meaning
|
| A positive integer
|
Interface component
width, in columns. |
| REMAINDER
|
Set component width
to the number of columns remaining in the grid. |
HEIGHT
| Allowed Values
|
Meaning
|
| A positive integer
|
Sets the component's
height, in pixels. HEIGHT settings are guaranteed to be used only
for components whose container is using AbsoluteLayout. Otherwise,
HEIGHT is a preference that the layout manager may or may not elect
to use. |
HGAP
| Allowed Values
|
Meaning
|
| A non-negative
integer |
The amount of space
between each component in the container and the component immediately
to its left or right. (Note: This is not the amount of space around
an interface component.) HGAP is specified as an attribute of the
container. |
LAYOUT
| Allowed Values
|
Meaning
|
| AbsoluteLayout,
BorderLayout, FlowLayout, GridLayout, GridBagLayout |
See AWT documentation.
FlowLayout is default for Panel. BorderLayout is default for Frame.
AbsoluteLayout is the equivalent of a "null" LayoutManager in AWT.
Note with AbsoluteLayout, component positions and size must be specified.
Use LOCATION or LEFT and TOP to specify position; use SIZE to specify
component size. |
LEFT
| Allowed Values
|
Meaning
|
| A non-negative
integer. |
Distance, in pixels,
from the left edge of the container to the left edge of the component.
Overrides LOCATION.
Note this attribute measures from the outside edge of the container.
So it's possible to position components so they're partially or completely
hidden by the window's title bar.
Note also that when using AbsoluteLayout, all components' position
must be specified with either LOCATION or the LEFT and TOP attributes.
|
LINEBORDER_COLOR
| Allowed Values
|
Meaning
|
| black, blue, cyan,
darkGray, gray, green, lightGray, magenta, orange, pink, red, white,
yellow |
Sets the color
of the LineBorder's line to color name as defined in class java.awt.Color.
|
| One of the color
names from java.awt.Color (see above) followed by a - or a + (e.g.,
red- or blue+). |
A suffix of - means
darken the color; a suffix of + means brighten the color. (These correspond
to java.awt.Color.darken() and .brighten().) |
| 0x<six hex digits>
(e.g., 0xFF0000 for pure red). |
Set the color of
the border's line to RGB (red, green, blue) color specified as 0xRRBBGG,
where RR denotes one of 256 intensities of red (00 to FF), BB denotes
the intensity of blue, and and GG denotes the intensity of green.
|
| A positive integer
|
Set the color of
the border's line to RGB color represented by a single integer. Bits
0-7 specify one of 256 intensities of blue; bits 8-15 green; and bits
16-23 red. |
| <float>,<float>,<float>
where <float> is between 0 and 1 inclusive (e.g., .667,1,1 for
pure blue). |
Set the color of
the border's line to HSB (hue, saturation, brightness) color specified
as a triple of numbers, where the first is hue, the second is saturation,
and the third is brightness.
· Hue represents the rainbow (0 is white, near 0 are red, near 1 is
magenta, and 1 is black).
· A saturation of 0 is either white or black, depending on brightness;
a saturation of 1 is pure hue color.
· A brightness of 0 is black; a brightness of 1 is maximum color saturation.
|
| activeCaption,
activeCaptionBorder, activeCaptionText, control, controlDkShadow,
controlHighlight, controlLtHighlight, controlShadow, controlText,
desktop, inactiveCaption, inactiveCaptionBorder, inactiveCaptionText,
info, infoText, menu, menuText, scrollbar, textHighlight, textHighlightText,
textInactiveText, textText, window, windowBorder, windowText
|
Set the color of
the border's line to the same color as corresponding system item.
The allowed values are defined in class java.awt.SystemColor. (Note:
these values work only on MS Windows platforms.) |
LINEBORDER_THICKNESS
| Allowed Values
|
Meaning
|
| An integer
|
Sets the thickness
of the LineBorder's line. |
LOCATION
| Allowed Values
|
Meaning
|
| Two positive integers,
separated by a comma (e.g., 125,73) |
Location of the
top left corner of the component, in pixels, where 0,0 is the top
left corner of the container. LEFT and TOP override LOCATION.
Note this attribute measures from the outside edge of the container.
So it's possible to position components so they're partially or completely
hidden by the window's title bar.
Note also that when using AbsoluteLayout, all components' position
must be specified with either LOCATION or the LEFT and TOP attributes.
|
OPAQUE
| Allowed Values
|
Meaning
|
| true, false
|
If true, the component's
background will be filled with the background color. |
RENDERING
| Allowed Values
|
Meaning
|
| JButton, JCheckBox,
JLabel, JPanel, JRadioButton, JTable, JToggleButton |
Inserts a Java
Swing component into a parent component. The parent component must
be rendered as a frame, panel, scrollpane, JFrame, or JPanel.
|
ROWS
| Allowed Values
|
Meaning
|
| A positive integer
|
In GridLayout:
exact number of rows to use. In this usage, ROWS is specified as an
attribute of the container. |
| A positive integer
|
In GridBagLayout:
ignored. |
SIZE
| Allowed Values
|
Meaning
|
| Two positive integers,
separated by a comma (e.g., 125,73) |
Sets the interface
component's size, in pixels. This attribute is implemented:
- for components whose container's LAYOUT is AbsoluteLayout, and
- for Frames, regardless of layout.
Otherwise SIZE is a preference that the layout manager may or may
not elect to use.
Note also that when using AbsoluteLayout, all components' size must
be specified with the SIZE attribute. |
SIZE-MAXIMUM
| Allowed Values
|
Meaning
|
| Two positive integers,
separated by a comma (e.g., 125,73) |
Sets the interface
component's maximum size, in pixels. |
SIZE-MINIMUM
| Allowed Values
|
Meaning
|
| Two positive integers,
separated by a comma (e.g., 125,73) |
Sets the interface
component's minimum size, in pixels. |
TITLEDBORDER_BORDER
| Allowed Values
|
Meaning
|
| LineBorder, RaisedBevelBorder,
LoweredBevelBorder, CompoundBorder |
Specifies what
line style to use for a titled border. |
TITLEDBORDER_COLOR
| Allowed Values
|
Meaning
|
| black, blue, cyan,
darkGray, gray, green, lightGray, magenta, orange, pink, red, white,
yellow |
Set titled border
color to color name as defined in class java.awt.Color. |
| One of the color
names from java.awt.Color (see above) followed by a - or a + (e.g.,
red- or blue+). |
A suffix of - means
darken the color; a suffix of + means brighten the color. (These correspond
to java.awt.Color.darken() and .brighten().) |
| 0x<six hex digits>
(e.g., 0xFF0000 for pure red). |
Set titled border
color to RGB (red, green, blue) color specified as 0xRRBBGG, where
RR denotes one of 256 intensities of red (00 to FF), BB denotes the
intensity of blue, and and GG denotes the intensity of green.
|
| An integer
|
Set titled border
color to RGB color represented by a single integer. Bits 0-7 specify
one of 256 intensities of blue; bits 8-15 green; and bits 16-23 red.
|
| <float>,<float>,<float>
where <float> is between 0 and 1 inclusive (e.g., .667,1,1 for
pure blue). |
Set titled border
color to HSB (hue, saturation, brightness) color specified as a triple
of numbers, where the first is hue, the second is saturation, and
the third is brightness.
· Hue represents the rainbow (0 is white, near 0 are red, near 1 is
magenta, and 1 is black).
· A saturation of 0 is either white or black, depending on brightness;
a saturation of 1 is pure hue color.
· A brightness of 0 is black; a brightness of 1 is maximum color saturation.
|
| activeCaption,
activeCaptionBorder, activeCaptionText, control, controlDkShadow,
controlHighlight, controlLtHighlight, controlShadow, controlText,
desktop, inactiveCaption, inactiveCaptionBorder, inactiveCaptionText,
info, infoText, menu, menuText, scrollbar, textHighlight, textHighlightText,
textInactiveText, textText, window, windowBorder, windowText
|
Set titled border
color to the same color as corresponding system item. The allowed
values are defined in class java.awt.SystemColor. (Note: these values
work only on MS Windows platforms.) |
TITLEDBORDER_FONT_NAME
| Allowed Values
|
Meaning
|
| Dialog, DialogInput,
Monospaced, SansSerif, Serif |
Generic name of
font, which is mapped to a specific font on the platform on which
Render runs (e.g., sansserif might be mapped to Helvetica).
|
TITLEDBORDER_FONT_SIZE
| Allowed Values
|
Meaning
|
| A positive integer
|
Font size, in points.
|
TITLEDBORDER_FONT_STYLE
| Allowed Values
|
Meaning
|
| plain, bold, italic,
bold italic |
Font style (bold,
italic, etc.) |
TITLEDBORDER_JUSTIFICATION
| Allowed Values
|
Meaning
|
| Left, Center, Right
|
Sets whether the
title should appear on the left, center, or right. Default is Left.
|
TITLEDBORDER_POSITION
| Allowed Values
|
Meaning
|
| Above-Top, Top,
Below-Top, Above-Bottom, Bottom, Below-Bottom |
Sets whether the
title should appear above, on, or below the top or bottom line of
the border. Default is Top. |
TITLEDBORDER_TITLE
| Allowed Values
|
Meaning
|
| A string
|
Sets the title
to place on the titled border. |
TOOLTIP
| Allowed Values
|
Meaning
|
| A string
|
Sets text to display
when the mouse is over a component. |
TOP
| Allowed Values
|
Meaning
|
| A non-negative
integer |
Distance, in pixels,
from the top edge of the container to the top edge of the component.
Overrides LOCATION.
Note this attribute measures from the outside edge of the container.
So it's possible to position components so they're partially or completely
hidden by the window's title bar.
Note also that when using AbsoluteLayout, all components' position
must be specified with either LOCATION or the LEFT and TOP attributes.
|
VGAP
| Allowed Values
|
Meaning
|
| A non-negative
integer |
The amount of space
between each component in the container and the component immediately
above or below. (Note: This is not the amount of space around an interface
component.) VGAP is specified as an attribute of the container.
|
VISIBLE
| Allowed Values
|
Meaning
|
| true, false
|
Specifies whether
to show the user interface component (true shows; false hides). The
default is true. |
WIDTH
| Allowed Values
|
Meaning
|
| A positive integer
|
Sets the component's
width, in pixels. WIDTH settings are guaranteed to be used only for
components whose container is using AbsoluteLayout. Otherwise, WIDTH
is a preference that the layout manager may or may not elect to use.
|
XPAD
| Allowed Values
|
Meaning
|
| A positive integer
|
Amount of blank
space, in pixels, added to left and right side of the interface component.
XPAD is specified as an attribute of the component. |
XPLACE
| Allowed Values
|
Meaning
|
| A positive integer
|
The column number
in which to locate the interface component. In this usage, XPLACE
is specified as an attribute of the component. |
| RELATIVE
|
Positions the component
in sequence following its peers. In this usage, XPLACE is specified
as an attribute of the component. |
XWEIGHT
| Allowed Values
|
Meaning
|
| A float between
0 and 1 |
If 0: Do not give
the interface component extra space if window is resized.
If >0: Give the interface component extra vertical space as window
is resized vertically; magnitude determines amount of space allocated
relative to other interface component with positive XWEIGHTs.
XWEIGHT is specified as an attribute of the component. |
YPAD
| Allowed Values
|
Meaning
|
| A positive integer
|
Amount of blank
space, in pixels, added to above and below the interface component.
YPAD is specified as an attribute of the component. |
YPLACE
| Allowed Values
|
Meaning
|
| A positive integer
|
The row number
in which to locate the interface component. In this usage, YPLACE
is specified as an attribute of the component. |
| RELATIVE
|
Positions the component
in sequence following its peers. In this usage, YPLACE is specified
as an attribute of the component. |
YWEIGHT
| Allowed Values
|
Meaning
|
| A float between
0 and 1 |
If 0: Do not give
the interface component extra space if window is resized.
If >0: Give the interface component extra horizontal space as window
is resized horizontally; magnitude determines amount of space allocated
relative to other interface components with positive YWEIGHTs.
YWEIGHT is specified as an attribute of the component. |
©
1999-2000 UIML.org (all rights reserved)
|