Package-level declarations

Functions

Link copied to clipboard

Sets background; on a non-opaque component also declare opaque(true) for it to paint.

Link copied to clipboard

Sets border; null removes the border. Requires a JComponent target.

Link copied to clipboard

Sets whether a component paints its border. Applies to everything built on a button, including menu items, and to progress bars, tool bars, menu bars and popup menus.

Link copied to clipboard

Sets the color of the caret in a text component - fields, areas, editor and text panes.

Link copied to clipboard

Sets a putClientProperty entry - the way to reach look-and-feel styling keys and accessibility hints. Each distinct key is an independent modifier slot; null removes the entry, and removing the declaration puts back the value the component carried before. Requires a JComponent target.

Link copied to clipboard

Sets whether a button fills the area behind its content. Applies to everything built on a button.

Link copied to clipboard

Sets cursor; null restores the inherited cursor.

Link copied to clipboard

Sets the icon a button displays while it is disabled; null hands the state back to the look and feel, which grays the base icon for it. Applies to every kind of button.

Link copied to clipboard

Sets the icon a button displays while it is both disabled and selected; null hands the state back to the look and feel, which grays selectedIcon for it, or falls back to the disabled icon where the button carries no selected icon. Applies to every kind of button.

Link copied to clipboard

Sets the color text is drawn in while the component is disabled.

Link copied to clipboard

Sets an invisible border occupying insets. See emptyBorder (the four-side form).

Sets an invisible border all pixels wide on every side. See emptyBorder (the four-side form).

fun SwingModifier.emptyBorder(top: Int, left: Int, bottom: Int, right: Int): SwingModifier

Sets an invisible border occupying top, left, bottom and right pixels - the space a component keeps around itself. margin is the space a button or a text component keeps inside its border. The border is rebuilt only when those pixel counts change. See border for the one border a chain declares.

Link copied to clipboard

Sets whether a button paints the indicator showing it holds keyboard focus. Applies to everything built on a button.

Link copied to clipboard

Sets font; null takes the font from the parent container.

Link copied to clipboard

Sets foreground; null takes the color from the parent container.

Link copied to clipboard

Marks up ranges of a text component with painter - the background a search draws behind its matches, the wash behind an error span, the squiggle under a misspelling.

Link copied to clipboard

Sets where a component's content sits along its width, when it is given more width than it needs.

Link copied to clipboard

Sets which side of the icon the text is drawn on. Applies to labels and to everything built on a button; a component with no icon lays out the same either way.

Link copied to clipboard

Sets the icon a component displays beside its text; null displays none.

Link copied to clipboard

Sets the space between a component's icon and its text. Applies to labels and to everything built on a button.

Link copied to clipboard
fun SwingModifier.lineBorder(color: Color, thickness: Int = 1): SwingModifier

Sets a line border thickness pixels wide in color. The border is rebuilt only when color or thickness changes, so a chain that recomposes often leaves the component's border alone. See border for the one border a chain declares.

Link copied to clipboard

Sets the space a component keeps between its border and its content. Applies to everything built on a button, and to text components.

Link copied to clipboard

Sets name - the key components are looked up by in tests and automation; null clears it.

Link copied to clipboard

Sets isOpaque - required for background to actually paint. Requires a JComponent target.

Link copied to clipboard

Sets the icon a button displays while it is held down; null falls back to the base icon. Applies to every kind of button.

Link copied to clipboard

Sets whether a button paints its rollover state - the look it takes while the pointer is over it. Applies to everything built on a button.

Link copied to clipboard

Sets the icon a button displays while the pointer is over it; null falls back to the base icon. Declaring it switches rolloverEnabled on. Applies to every kind of button.

Link copied to clipboard

Sets the icon a button displays while the pointer is over it and it is selected; null falls back to selectedIcon. Declaring it switches rolloverEnabled on. Applies to every kind of button.

Link copied to clipboard

Sets the icon a button displays while it is selected - a checked check box, an on toggle button; null falls back to the base icon. Applies to every kind of button.

Link copied to clipboard

Sets the color selected text is drawn in.

Link copied to clipboard

Sets the background painted behind selected text in a text component.

Link copied to clipboard

Tags the component with tag so it can be located in tests independently of its name.

Link copied to clipboard

The tag testTag set on this component, or null where it carries none: a component the modifier was never applied to, and one that is no JComponent and so holds no client properties at all.

Link copied to clipboard
fun SwingModifier.toolTip(text: (event: MouseEvent) -> @Nls String?): SwingModifier

Sets the tooltip per pointer location: text is asked for the tooltip belonging to the place the pointer is over, and answers null where the component has none there. Requires a JComponent target.

Sets toolTipText - the tooltip the component shows wherever the pointer rests on it; null clears it. Requires a JComponent target.

Link copied to clipboard

Sets where a component's content sits along its height, when it is given more height than it needs.

Link copied to clipboard

Sets whether the text is drawn above, across or below the icon. Applies to labels and to everything built on a button; a component with no icon lays out the same either way.