Pop Up Button Styles

There are two types of pop up buttons in macOS: a pop up menu button and a pull down menu button. A pop up menu button is used to allow the user to make a selection from a fixed set of items. The current selection is displayed in the button. A pull down menu button is used to allow the user to perform actions from a fixed set of actions. The button displays a fixed label or icon.

Using VAqua, a pop up button is represented by a non-editable JComboBox. A non-editable combo box is displayed as a pop up menu button by default. A non-editable combo box is configured to display as a pull down menu button by setting the JComboBox.isPopDown client property to (boolean) true. The label or icon to display on the button is specified as the value of the JComboBox.title client property.

VAqua supports several styles for pop up buttons. Custom styles are selected using the JComboBox.style client property on the JComboBox. Most styles support several size options, specified using the JComponent.sizeVariant client property with values regular (the default), small, or mini.

The default style is the standard native pop up button style, unless the JComboBox is being used as a cell editor, in which case a borderless style is used, or the JComboBox is in a JToolBar, in which case a textured style is used. In addition, VAqua supports these styles of pop up buttons:

Borderless

This style is used by default for a cell editor. This style is selected by setting the JComboBox.style client property to borderless.

Textured

This style is similar to a textured button. It is recommended for use in the window frame. This style is selected by setting the JComboBox.style client property to textured.

Gradient

This style is similar to gradient buttons. This style is selected by setting the JComboBox.style client property to gradient.

Rounded Rectangle

This style is similar to rounded rectangle buttons. It is recommended for allowing the user to select search criteria in a scope bar. This style is selected by setting the JComboBox.style client property to roundRect.

Square

This style is similar to square buttons. Use of this style is discouraged. This style is selected by setting the JComboBox.style client property to square.

Bevel

This style is similar to bevel buttons. Use of this style is discouraged. This style is selected by setting the JComboBox.style client property to bevel.

Recessed

This style is selected by setting the JComboBox.style client property to recessed.