Package limn.scene.layout
Class Stack
Overlays children on top of each other (later children on top; the base
for overlays and modal dialogs). Sizes to the biggest child; each child is
placed by this stack's
Stack.Alignment.
A layer stacked over another does not block it. The layers are siblings, and covering
one with an opaque panel changes nothing about it: it keeps taking the keyboard, and an assistive
technology is still offered every control underneath the glass, because nothing here says which
rectangle hides which. A panel meant to be modal goes through Scene.pushOverlay(limn.scene.Widget<?>)
or is mounted in the scene by Dialog, both of which confine input and publish the fact to
a screen reader.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhere a child sits in the stack's box, on two vocabularies that coexist on purpose. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalignment(Stack.Alignment alignment) Where children sit within the stack's box; they all get the full box to measure against.protected voidonLayout()Containers position children here (measure +Widget.layoutBox(float, float, float, float)per child).protected SizeonMeasure(Constraints constraints) Reports the size this widget wants withinconstraints.Methods inherited from class limn.scene.layout.Container
add, add, paintOutset, paintOverflow, paintOverflowFromTheme, removeMethods inherited from class limn.scene.Widget
acceptsTextInput, accessibleLabelAccessKey, accessibleLabelTarget, accessibleLabelText, announceChange, backdropReach, baselineOffset, baselineOffsetOf, caretRect, children, clipboard, clipHeight, clipsChildren, clipWidth, clipX, clipY, controlSize, cursor, declaredControlSize, declaredLayoutDirection, declaredLocale, focusArrivedBackward, focusArrivedByTraversal, handleUserChange, height, hitTest, hitTestChild, id, imageCursor, inheritanceHost, invalidate, invalidate, invalidateAccessible, isEnabled, isFocusable, isFocused, isRightToLeft, isSelfEnabled, isShowing, isVisible, isVisibleByItsOwnFlag, layoutBox, layoutDirection, locale, localToScene, localToSceneBounds, markNeedsContainedLayout, markNeedsLayout, markNeedsLayoutInPlace, maxHeight, maxWidth, measure, minHeight, minWidth, moveChild, moveChild, moveChild, neutralBase, notifyChange, notifyTextEdit, observeChanges, onAccessibility, onAccessibilityAction, onAccessibilityChild, onAccessibilityChildAction, onAccessibilityChildIdentity, onAttached, onCanEdit, onCharTyped, onDetached, onDragExit, onDragOver, onDragStart, onDrop, onEdit, onFocusGained, onFocusLost, onHitTest, onKeyEvent, onMouseEvent, onPaint, onPaintOverlay, onPreedit, onSyntheticAction, overlayPassesPointer, paintChildren, paintsDecoration, paintsFromBackdrop, paintWidget, parent, remove, requestFocus, requestFocus, revealInView, revealInView, runHandler, scene, sceneNanos, sceneToLocal, self, setAccessibleDescribedBy, setAccessibleDescription, setAccessibleDescription, setAccessibleIgnored, setAccessibleLabelledBy, setAccessibleName, setAccessibleName, setAccessibleRole, setControlSize, setCursor, setEnabled, setFocusable, setId, setImageCursor, setInheritanceHost, setLayoutDirection, setLocale, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setPresentedElsewhere, setTooltip, setTooltip, setVisible, shapeText, textRuler, tooltip, tooltipSource, width, x, y
-
Constructor Details
-
Stack
public Stack()
-
-
Method Details
-
alignment
Where children sit within the stack's box; they all get the full box to measure against. The default isStack.Alignment.TOP_LEFT. UI thread only.- Parameters:
alignment- where each child sits- Returns:
- this stack
-
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. -
onLayout
protected void onLayout()Description copied from class:WidgetContainers position children here (measure +Widget.layoutBox(float, float, float, float)per child).
-