Package org.polyfrost.polyui.layout.impl
Class SiblingLayout
-
- All Implemented Interfaces:
-
kotlin.Cloneable
public final class SiblingLayout extends PixelLayout
-
-
Field Summary
Fields Modifier and Type Field Description private final Gappaddingprivate transient PropertyManagerpropertyManagerprivate final transient Colorscolorsprivate final transient FontFamilyfontsprivate final ArrayList<Component>componentsprivate final ArrayList<Layout>childrenprivate BooleanconsumesHoverprivate transient BooleanneedsRedrawprivate BooleanrefuseFramebufferprivate transient Layoutlayoutprivate final transient ArrayList<Function1<Layout, Unit>>initCompleteHooksprivate final transient Booleandraggableprivate Vec2<Unit>visibleSizeprivate Vec2<Unit>sizeprivate final BooleanresizesChildrenprivate final transient HashMap<Event, Function2<Drawable, Event, Boolean>>eventHandlersprivate transient StringsimpleNameprivate transient Rendererrendererprivate transient PolyUIpolyUIprivate BooleanacceptsInputprivate final transient ByteinitStageprivate final transient BooleanmouseOverprivate transient Booleanrendersprivate Floatxprivate Floatyprivate Floatwidthprivate Floatheightprivate Booleanexistsprivate transient FloattrueXprivate transient FloattrueYprivate final Unit.TypeatTypeprivate final Unit.TypesizeTypeprivate final BooleanisDynamicprivate Doublerotationprivate DoubleskewXprivate DoubleskewYprivate FloatscaleXprivate FloatscaleYprivate Floatalphaprivate transient Floatacxprivate transient Floatacyprivate final Vec2<Unit>atprivate final BooleanrawResize
-
Constructor Summary
Constructors Constructor Description SiblingLayout(Vec2<Unit> at, Vec2<Unit> size, Gap padding, Function2<Drawable, Added, Unit> onAdded, Function2<Drawable, Removed, Unit> onRemoved, PropertyManager propertyManager, Boolean rawResize, Boolean resizesChildren, Boolean acceptInput, Drawable drawables)
-
Method Summary
Modifier and Type Method Description final GapgetPadding()UnitcalculateBounds()Calculate the position and size of this drawable. -
Methods inherited from class org.polyfrost.polyui.layout.Layout
add, add, add, background, changeColors, changeFonts, clipDrawables, countDrawables, debugPrint, debugRender, draggable, every, get, getChildren, getColors, getComponent, getComponents, getConsumesHover, getDraggable, getFonts, getInitCompleteHooks, getLayout, getLayout, getNeedsRedraw, getOrNull, getPropertyManager, getRefuseFramebuffer, getResizesChildren, getSize, getVisibleSize, intersects, isInside, isInside, onAll, onAllLayouts, onColorsChanged, onFontsChanged, reRenderIfNecessary, remove, remove, removeNow, removeNow, render, rescale, reset, scrolling, setConsumesHover, setLayout, setNeedsRedraw, setPropertyManager, setRefuseFramebuffer, setSize, setVisibleSize, setup, toString, trueX, trueY -
Methods inherited from class org.polyfrost.polyui.component.Drawable
accept, addEventHandler, addEventhandler, addOperation, animateBy, animateTo, canBeRemoved, clone, doDynamicSize, events, fadeBy, fadeTo, getAcceptsInput, getAcx, getAcy, getAlpha, getAt, getAtType, getContainingLayout, getEventHandlers, getExists, getHeight, getInitStage, getMouseOver, getPolyUI, getRawResize, getRenderer, getRenders, getRotation, getScaleX, getScaleY, getSimpleName, getSizeType, getSkewX, getSkewY, getTrueX, getTrueY, getWidth, getX, getY, isDynamic, moveBy, moveTo, onParentInitComplete, postRender, preRender, removeOperation, resize, rotateBy, rotateTo, scaleBy, scaleTo, setAcceptsInput, setAcx, setAcy, setAlpha, setExists, setHeight, setPolyUI, setRenderer, setRenders, setRotation, setScaleX, setScaleY, setSimpleName, setSkewX, setSkewY, setTrueX, setTrueY, setWidth, setX, setY, skewBy, skewTo -
Methods inherited from class org.polyfrost.polyui.layout.impl.PixelLayout
calculateSize, onInitComplete -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getPadding
final Gap getPadding()
-
calculateBounds
Unit calculateBounds()
Calculate the position and size of this drawable. Make sure to call doDynamicSize in this method to avoid issues with sizing.
This method is called once the layout is populated for children and component, and when a recalculation is requested.
The value of layout's bounds will be updated after this method is called, so do not use layout's bounds as an updated value in this method.
-
-
-
-