Package limn.components
Class TokenPadding
java.lang.Object
limn.scene.Widget
limn.scene.layout.Padding
limn.components.TokenPadding
A
Padding whose insets follow the resolved ControlSize step,
uniform on all four edges. Page and panel padding is the widest thing the spacing ramp moves
(12 / 16 / 20 / 26 / 32 at Tokens.Role.LARGE), and a literal here is what makes a
step change read as "the controls shrank" rather than "the density changed".-
Constructor Summary
ConstructorsConstructorDescriptionTokenPadding(Tokens.Role role, Widget child) Padding that followsroleat the resolved size step.TokenPadding(Widget child) Page padding atspacingLarge. -
Method Summary
Modifier and TypeMethodDescriptionprotected SizeonMeasure(Constraints constraints) Reports the size this widget wants withinconstraints.Methods inherited from class limn.scene.layout.Padding
all, insets, onLayout, setInsets, setInsetsSilentlyMethods 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, onMouseEvent, onPaint, 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
-
Constructor Details
-
TokenPadding
Page padding atspacingLarge. -
TokenPadding
Padding that followsroleat the resolved size step.
-
-
Method Details
-
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.
-