Package limn.components
Class Separator
java.lang.Object
limn.scene.Widget
limn.components.Separator
A thin divider line drawn in the theme's
Theme.outline color. A
horizontal separator stretches across the available width (with a thin height);
a vertical one stretches down the available height (thin width). Use it to
divide groups in a Column/Row or inside a ToolBar.
Size axis
Separator participates by inheritance only and exposes no size setter: what a reader perceives is a 1 pt hairline, pixel-locked at everyControlSize step. Only the
box around the line moves. A "large separator" is either the same line with more air
(the container's job) or a thicker rule, which is a different visual element.
The box is odd at every step on purpose: a 1 pt line can only sit exactly
centred inside an odd box, and the snap relies on that parity. setInset(float) is the one
dimension a caller controls.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SeparatorA rule stretching across the available width.protected SizeonMeasure(Constraints constraints) Reports the size this widget wants withinconstraints.protected voidWidget's own background/content, in local coordinates.setInset(float margin) Trimsmarginpoints off both ends of the line.static Separatorvertical()A rule stretching down the available height.Methods inherited from class limn.scene.Widget
acceptsTextInput, add, baselineOffset, baselineOffsetOf, caretRect, children, clipboard, clipsChildren, controlSize, cursor, declaredControlSize, declaredLayoutDirection, declaredLocale, focusArrivedByTraversal, height, hitTest, imageCursor, invalidate, invalidate, isEnabled, isFocusable, isFocused, isShowing, isVisible, layoutBox, layoutDirection, locale, localToSceneX, localToSceneY, markNeedsContainedLayout, markNeedsLayout, measure, moveChild, neutralBase, onAttached, onCharTyped, onDetached, onFileDrop, onFocusGained, onFocusLost, onKeyEvent, onLayout, onMouseEvent, onPaintOverlay, onPreedit, overlayPassesPointer, paintChildren, paintOutset, paintWidget, parent, remove, requestFocus, revealInView, scene, sceneToLocalX, sceneToLocalY, setControlSize, setCursor, setEnabled, setFocusable, setImageCursor, setInheritanceHost, setLayoutDirection, setLocale, setTooltip, setTooltip, setVisible, shapeText, textRuler, tooltip, width, x, y
-
Method Details
-
horizontal
A rule stretching across the available width. -
vertical
A rule stretching down the available height. -
setInset
Trimsmarginpoints off both ends of the line. -
onMeasure
Description copied from class:WidgetReports the size this widget wants withinconstraints. Called once per layout pass, and the result is cached against the constraints and the resolved axes (size step, layout direction, locale), so it must be a pure function of them and of this widget's own state.Resolve the
ControlSizeand theLayoutDirectiononce each here and thread them down; never read either in a constructor. The locale needs no threading: it is in scope, andI18n.locale()answers it wherever text is resolved. -
onPaint
Description copied from class:WidgetWidget's own background/content, in local coordinates.
-