Class Divider
-
-
Field Summary
Fields Modifier and Type Field Description private final Unitlengthprivate final Directiondirectionprivate final Propertiespropertiesprivate transient Color.Animatedcolorprivate transient Drawableparentprivate transient Layoutlayoutprivate transient BooleanconsumesHoverprivate Booleandisabledprivate Vec2<Unit>sizeprivate final transient HashMap<Event, Function2<Drawable, Event, Boolean>>eventHandlersprivate transient StringsimpleNameprivate transient Rendererrendererprivate transient PolyUIpolyUIprivate BooleanacceptsInputprivate final transient ByteinitStageprivate final transient BooleanmouseOverprivate 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
-
Method Summary
Modifier and Type Method Description final UnitgetLength()final DirectiongetDirection()Unitrender()draw script for this drawable. UnitcalculateBounds()Calculate the position and size of this drawable. Vec2<Unit>calculateSize()Implement this function to return the size of this drawable, if no size is specified during construction. -
Methods inherited from class org.polyfrost.polyui.component.Component
accept, addKeyframes, addOperation, canBeRemoved, debugRender, draggable, every, getColor, getConsumesHover, getDisabled, getLayout, getParent, getProperties, getSize, onColorsChanged, onFontsChanged, preRender, recolor, setColor, setConsumesHover, setDisabled, setLayout, setParent, setProperties, setSize, setup, toString, trueX, trueY, wantRedraw -
Methods inherited from class org.polyfrost.polyui.component.Drawable
addEventHandler, addEventhandler, animateBy, animateTo, clone, debugPrint, 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, intersects, isDynamic, isInside, isInside, moveBy, moveTo, onInitComplete, onParentInitComplete, postRender, removeOperation, rescale, reset, 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getDirection
final Direction getDirection()
-
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.
-
calculateSize
Vec2<Unit> calculateSize()
Implement this function to return the size of this drawable, if no size is specified during construction.
This should be so that if the drawable can determine its own size (for example, it is an image), then the size parameter in the constructor can be omitted using:
size: Vec2<org.polyfrost.polyui.unit.Unit>? = null;and this method needs to be implemented!Otherwise, the size parameter in the constructor must be specified.
-
-
-
-