Package-level declarations

Functions

Link copied to clipboard

Sets the horizontal alignment along the x axis, where 0.0 aligns to the left, 0.5 centers, and 1.0 aligns to the right. A parent that honors alignment - a vertical BoxLayout - lines its children up by this value, so siblings given the same alignment stay in one column.

Link copied to clipboard

Sets the vertical alignment along the y axis, where 0.0 aligns to the top, 0.5 centers, and 1.0 aligns to the bottom. A parent that honors alignment - a horizontal BoxLayout - lines its children up by this value, so siblings given the same alignment stay on one row.

Link copied to clipboard
fun SwingModifier.bounds(x: Int, y: Int, width: Int, height: Int): SwingModifier

Sets the component's bounds - its position and size within its parent. Effective in a parent that does not lay its children out (a null layout, or a LayeredPane), where each child positions itself.

Link copied to clipboard

Sets componentOrientation - the component's left-to-right / right-to-left orientation.

Link copied to clipboard

Sets the component's actual height to height, keeping its current width, like setSize(width, height). See size (the Int overload) for when this takes effect and how size/width/height compose.

Link copied to clipboard

Places the component in its parent container under constraint - the value Container.add(Component, Object) takes: a BorderLayout region name, a GridBagConstraints, a CardLayout card name, or whatever the enclosing container's layout manager understands.

Link copied to clipboard

Sets the component's actual location to point, like setLocation. See location (the Int overload) for how it takes effect only outside a managed layout and how location/x/y compose per axis.

Sets the component's actual location to (x, y) relative to its parent, like setLocation. A layout manager overrides this on its next layout pass, so it takes effect for components positioned by themselves - those in a null layout or a JLayeredPane.

Link copied to clipboard

Sets maximumSize and relays out; null restores the layout-computed maximum size.

Sets maximumSize to Dimension(width, height) and relays out.

Link copied to clipboard

Sets minimumSize and relays out; null restores the layout-computed minimum size.

Sets minimumSize to Dimension(width, height) and relays out.

Link copied to clipboard

Sets preferredSize and relays out; null restores the layout-computed preferred size.

Sets preferredSize to Dimension(width, height) and relays out.

Link copied to clipboard

Sets the component's actual size to size, like setSize. See size (the Int overload) for when this takes effect and how size/width/height compose.

fun SwingModifier.size(width: Int, height: Int): SwingModifier

Sets the component's actual size to width by height, like setSize. A layout manager overrides this on its next layout pass, so it takes effect for components positioned by themselves - those in a null layout or a JLayeredPane. To influence a managed layout, use preferredSize, minimumSize, or maximumSize instead.

Link copied to clipboard

Installs the component into its parent through attachment - one of the host's own dedicated setters rather than the generic Container.add (e.g. a JScrollPane region reached via setViewportView). The attachment belongs to the host: a container composable wrapping such a host is what hands each of its regions the attachment that installs a component there and takes it out again.

Link copied to clipboard

Sets isVisible - whether the component is shown in its parent's layout.

Link copied to clipboard

Sets the component's actual width to width, keeping its current height, like setSize(width, height). See size (the Int overload) for when this takes effect and how size/width/height compose.

Link copied to clipboard

Sets the component's actual x position to value, keeping its current y, like setLocation(x, y). See location (the Int overload) for how it takes effect only outside a managed layout and how location/x/y compose per axis.

Link copied to clipboard

Sets the component's actual y position to value, keeping its current x, like setLocation(x, y). See location (the Int overload) for how it takes effect only outside a managed layout and how location/x/y compose per axis.