Class Scrollbar
-
-
Field Summary
Fields Modifier and Type Field Description private Booleanrendersprivate final ScrollbarPropertiespropertiesprivate transient FloatArraycornerRadiiprivate 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 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 BooleangetRenders()UnitsetRenders(Boolean renders)weather or not this drawable should be rendered. ScrollbarPropertiesgetProperties()Unitrender()draw script for this drawable. final UnitcancelHide()final UnittryHide(Long delta)final Unitshow()UnitcalculateBounds()Calculate the position and size of this drawable. Booleanaccept(Event event)called when this drawable receives an event. -
Methods inherited from class org.polyfrost.polyui.component.impl.Block
getCornerRadii, onColorsChanged, setCornerRadii, setup -
Methods inherited from class org.polyfrost.polyui.component.Component
addKeyframes, addOperation, canBeRemoved, debugRender, draggable, every, getColor, getConsumesHover, getDisabled, getLayout, getParent, getSize, onFontsChanged, preRender, recolor, setColor, setConsumesHover, setDisabled, setLayout, setParent, setProperties, setSize, toString, trueX, trueY, wantRedraw -
Methods inherited from class org.polyfrost.polyui.component.Drawable
addEventHandler, addEventhandler, animateBy, animateTo, calculateSize, clone, debugPrint, doDynamicSize, events, fadeBy, fadeTo, getAcceptsInput, getAcx, getAcy, getAlpha, getAt, getAtType, getContainingLayout, getEventHandlers, getExists, getHeight, getInitStage, getMouseOver, getPolyUI, getRawResize, getRenderer, 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, 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
-
-
Constructor Detail
-
Scrollbar
Scrollbar(Boolean horizontal)
-
-
Method Detail
-
getRenders
Boolean getRenders()
-
setRenders
Unit setRenders(Boolean renders)
weather or not this drawable should be rendered.
This is controlled by Layout.clipDrawables to save resources by not drawing drawables which cannot be seen.
It is only respected by Layout by default. This means that if you are calling render yourself (which you really shouldn't), you should check this value.
- Since:
0.21.4
-
getProperties
ScrollbarProperties getProperties()
-
cancelHide
final Unit cancelHide()
-
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.
-
-
-
-