Push Button Styles

Push buttons are instances of JButton. They perform an action but do not display a state.

VAqua supports several styles for push buttons. Most button styles support several size options, specified using the JComponent.sizeVariant client property with values regular (the default), small, or mini.

The default style for a push button depends upon its size, content, and location. The basic styles are the textured style for buttons on a tool bar and the push button style for buttons elsewhere. These basic styles have fixed heights and are used only when the button content is compatible with the fixed height. If the button content is too large for the basic styles, then the bevel style is used for buttons without icons and the toolbar item or gradient styles are used for buttons with icons.

The following push button styles may be explicitly selected using the JButton.buttonType client property:

Gradient

A gradient button is a rectangular button. It is intended to be used with an icon, not with a text label. Its size is unrestricted. The size variant options do not apply. This style is selected by setting the JButton.buttonType client property to gradient.

Textured

A textured button has a flat white background and rounded corners. It may be used with an icon and/or a text label. It is recommended for use in the window frame. It has a fixed height based on the size variant. This style is selected by setting the JButton.buttonType client property to textured.

Toolbar Item

A toolbar item is a button that displays an icon with a label underneath. It is intended for use on the window frame. This style is selected by setting the JButton.buttonType client property to toolbarItem.

Rounded Rectangle

A rounded rectangle button is translucent and has a border with rounded corners. It is recommended for allowing the user to save search criteria in a scope bar. It has a fixed height based on the size variant. This style is selected by setting the JButton.buttonType client property to roundRect.

Help

A help button is a circular button that displays a help icon. It has a fixed size based on the size variant. This style is selected by setting the JButton.buttonType client property to help.

Inline

An inline button has a recessed appearance with rounded ends. It has a fixed height. It does not support size variants. It has no recommended use. This style is selected by setting the JButton.buttonType client property to inline.

Round

A round button is a circular button with a flat background, designed to display an icon. It has a fixed size based on the size variant. This style is selected by setting the JButton.buttonType client property to round. A round button displays as a round textured button when it is used on a tool bar.

Round Textured

A round textured button is a circular button with a flat background, designed to display an icon. It has a fixed size based on the size variant. This style is selected by setting the JButton.buttonType client property to roundTextured.

Round Inset

A round inset button is a translucent button with a circular border, designed to display an icon. It has a fixed size. It does not support size variants. This style is selected by setting the JButton.buttonType client property to roundInset.

Bevel

A bevel button has a flat white background and rounded corners. It may be used with an icon and/or a text label. Its size is unrestricted. The size variant options do not apply. Use of this style is discouraged. This style is selected by setting the JButton.buttonType client property to bevel.

Square

A square button has a light gradient and square corners. It may be used with an icon and/or a text label. Its size is unrestricted. The size variant options do not apply. Use of this style is discouraged. This style is selected by setting the JButton.buttonType client property to square.