Interface AquaUIPainter
-
public interface AquaUIPainterAn interface that supports native rendering for the Aqua look and feel. The goals of this interface are to isolate the specific set of features needed by the Aqua look and feel when using native rendering and to allow experimentation with different native rendering implementations. Although designed to support the Aqua look and feel, additional options are provided that could be supported by an extension to the Aqua look and feel.
This interface supports the creation of renderings for user interface components. In most cases, the renderings are incomplete. For example, the rendering of a button does not include the button label or icon. For lack of a better word, the different kinds of renderings are identified as widgets.
A rendering is represented by a
painter
object. To render a specific component, a painter is created for that component and then used to draw the rendering into a graphics context. The painter can be cached for future use (assuming that the rendering parameters have not changed); however, caching a painter is unlikely to provide a significant performance benefit. Implementations of this interface may support internal caching of images.This interface also makes available some layout related information associated with native renderings, such as fixed layout widths and/or heights, information about component outlines for painting focus rings, and information about active areas within rendered components, such as the label within a button or the portion of a search field that corresponds to the cancel button.
The appropriate use of this interface is to call configure() immediately before each call to obtain a painter or to obtain a shape or bounds.
All sizes and positions are specified in device independent pixels, sometimes called points.
All combinations of parameters are not necessarily supported. Some widgets support only the regular and small size variants. Some widgets support only two display states, active and disabled. Other size variants and states are mapped to the most appropriate supported value.
Some possible rendering options may not be supported by a specific implementation of this interface. In general, when a requested rendering cannot be performed, an UnsupportedOperationException is thrown.
Because of the limitations of the Swing architecture, no current implementation of this interface paints the overlay focus rings used in recent releases of OS X. The isFocused parameters should always be false. They are provided for possible use for other UIs.
-
-
Nested Classes Modifier and Type Interface and Description ButtonState States of a toggle button.ButtonWidget Widgets for a button.ColumnSortArrowDirection Direction options for a column sort indicator in a table header.ComboBoxWidget Widgets for an editable combo box.Direction Direction options.DividerWidget Widgets for a split pane divider.GradientWidget Widgets for a gradient background.HorizontalAlignment Horizontal alignment options.Orientation Orientation options.PopupButtonWidget Widgets for a non-editable combo box.Position Options for the position of a button in a segmented control.ProgressWidget Widgets for a progress indicator.ScrollBarKnobWidget Widgets for a scroll bar knob.ScrollBarWidget Widgets for a scroll bar.SegmentedButtonWidget Widgets for a button in a segmented control.Size Size options.SliderWidget Widgets for a slider.State States of a component.TextFieldWidget Widgets for a text field.TickMarkPosition Options for the position of slider tick marks.TitleBarButtonWidget Widgets for a button on a window title bar.TitleBarWidget Widgets for window title bar.UILayoutDirection User interface layout direction options.VerticalAlignment Vertical alignment options.
-