Class Image
-
-
Field Summary
-
Method Summary
Modifier and Type Method Description final PolyImagegetImage()final UnitsetImage(PolyImage image)final PolyColorgetBackgroundColor()final UnitsetBackgroundColor(PolyColor backgroundColor)Booleansetup(PolyUI polyUI)give this a PolyUI reference. Vec2.ImmutablecalculateSize()Use this function to calculate the size of this drawable. StringdebugString()Override this function to add things to the debug display of this drawable. -
Methods inherited from class org.polyfrost.polyui.component.impl.Block
getBoarderColor, getBoarderWidth, getRadii, rescale, setBoarderColor, setBoarderWidth, setRadii -
Methods inherited from class org.polyfrost.polyui.component.Drawable
accept, acceptsInput, addChild, addChild, addEventhandler, addOperation, addOperation, at, at, canBeRemoved, clipChildren, clone, createdWithSetPosition, createdWithSetSize, debugDraw, draw, get, get, get, getAlignment, getAlpha, getChildren, getColor, getColorOrNull, getFramebuffer, getHeight, getInputState, getOperations, getPadding, getPalette, getParent, getParentOrNull, getPolyUI, getRenderer, getRenders, getRotation, getScaleX, getScaleY, getShouldScroll, getSimpleName, getSize, getSkewX, getSkewY, getVisibleSize, getWidth, getX, getXInternal, getY, getYInternal, hasListenersFor, hasListenersFor, hasVisibleSize, intersects, isAtValid, isEnabled, isFocusable, isFocused, isInitialized, isInside, isLayoutIgnored, isOperating, isRawResize, isScrolling, isSizeValid, needsRedraw, on, recalculate, removeChild, removeChild, removeOperation, repositionChildren, resetScroll, set, set, setAcceptsInput, setAlpha, setColor, setColorInternal, setEnabled, setHeight, setInputState, setLayoutIgnored, setNeedsRedraw, setPadding, setPalette, setRawResize, setRenders, setRotation, setScaleX, setScaleY, setShouldScroll, setSimpleName, setSkewX, setSkewY, setVisibleSize, setWidth, setX, setXInternal, setY, setYInternal, toString, tryMakeScrolling -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getBackgroundColor
final PolyColor getBackgroundColor()
-
setBackgroundColor
final Unit setBackgroundColor(PolyColor backgroundColor)
-
setup
Boolean setup(PolyUI polyUI)
give this a PolyUI reference.
You can also use this method to do some calculations (such as text widths) that are not dependent on other sizes, or operations that require access to PolyUI things, like PolyUI.settings or PolyUI.translator
this method is called once, and only once.
-
calculateSize
Vec2.Immutable calculateSize()
Use this function to calculate the size of this drawable. DO NOT include children in this calculation!
This function is only called if no size is supplied to this drawable at initialization. A return value of
nullindicates this drawable is not able to infer its own size, as it is for example, a Block with no reference. A drawable such as Text on the other hand, is able to infer its own size.
-
debugString
String debugString()
Override this function to add things to the debug display of this drawable.
- Since:
1.1.1
-
-
-
-