Miscellaneous Customization

Size Options

Many components support several size options, including buttons, labels, check boxes, radio buttons, combo boxes, sliders, spinners, text fields, text areas, scroll panes, and tabbed panes. A size is specified using the JComponent.sizeVariant client property with values regular (the default), small, or mini. The size option generally affects the default font for the component. In some cases, the size option also determines the fixed height and/or width of the component.

Group Boxes

VAqua supports containers that display in the style of an Aqua group box, where the components are arranged inside a rounded rectangle with an optional title. To use this style, create a JPanel and set the JPanel.style client property to groupBox. To display a title above the group box, set the Aqua.groupBoxTitle client property to the title text.

When the group box style is used, VAqua defines a default border for the JPanel that positions the components of the JPanel properly within the rounded rectangle and leaves room for the title (if any) above the rounded rectangle. An application may set its own border on the JPanel, but one must be careful to provide enough empty space for the edge of the rounded rectangle and any title.

Windmill Progress Indicators

VAqua supports the windmill style circular form of indeterminate progress indicators. To use this style, set the JProgressBar.style client property to circular. Circular progress bars are supported in three sizes (see above). This option is supported only on indeterminate progress indicators.

Split Pane Divider Styles

VAqua supports two styles for split pane dividers. The default style is a thin divider. The other style is a wider divider with a dimple. A split pane divider style is selected by setting the JSplitPane.style client property on the JSplitPane to thin or thick.

Option Pane Document

When an option pane has no selection values, VAqua creates a text field to display the message. The text field uses a default document. In some cases, it may be desirable to restrict the text that can be entered, by using a custom document. A custom document (an instance of javax.swing.text.Document) can be supplied by making it the value of the JOptionPane.textFieldDocument client property of the JOptionPane.

Identifying Custom Cell Editors

Certain components (combo boxes, text fields) display differently or use a different focus ring when they are used as cell editors in lists, tables, or trees. VAqua defines client properties that can be used to identify custom components as cell editors or containers of cell editors.

If the value of the component client property JComponent.isCellEditor is (Boolean) true, then the component is treated as a cell editor. If the value of this property is (Boolean) false, then the component is not treated as a cell editor. If the property is neither true nor false, then the component is treated as a cell editor if and only if its parent is recognized as a cell container. A custom component is recognized as a cell container if the value of its JComponent.isCellContainer client property is (Boolean) true.