| Modifier and Type | Field and Description |
|---|---|
protected ImageRenderNode |
renderNode |
deferredLayout, deferredRender, deferredUpdate, effects, height, styleId, visibility, width, x, y, zIndex| Constructor and Description |
|---|
Image()
Constructor.
|
Image(float x,
float y,
float width,
float height)
Constructor
|
Image(java.lang.String id)
Constructor
|
Image(java.lang.String id,
float x,
float y,
float width,
float height)
Constructor
|
Image(java.lang.String id,
java.lang.String texturePath)
Constructor
|
Image(java.lang.String id,
Texture texture)
Constructor
|
Image(java.lang.String id,
TextureRegion textureRegion)
Constructor
|
Image(Texture texture)
Constructor.
|
Image(TextureRegion textureRegion)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attach(ParentRenderNode<?,?> parentRenderNode)
Attaches a
RenderNode for this element to a parent
RenderNode |
void |
detach(ParentRenderNode<?,?> parentRenderNode)
Detaches this element's
RenderNode from a parent
RenderNode |
protected void |
estimateSize() |
java.lang.String |
getAtlas()
Returns the atlas (if any) to look up the texture in
|
int |
getRenderHeight()
Returns the height this element is currently rendering at
|
int |
getRenderWidth()
Returns the width this element is currently rendering at
|
int |
getRenderX()
Returns X coordinate of where this element is currently rendering
|
int |
getRenderY()
Returns Y coordinate of where this element is currently rendering
|
StyleRule |
getStyleRule() |
java.lang.String |
getTexturePath()
Returns the current texture path
|
TextureRegion |
getTextureRegion(AssetManager assetManager)
Returns the current
TextureRegion for this Image |
void |
invokeBeginHover()
Triggers the begin hover event
|
void |
invokeEndHover()
Triggers the end hover event
|
boolean |
isFlipX()
Returns if the texture should be flipped horizontally during rendering
|
boolean |
isFlipY()
Returns if the texture should be flipped vertically during rendering
|
boolean |
isInitialLayoutOccurred() |
boolean |
isInitialUpdateOccurred() |
boolean |
isRenderNodeDirty() |
boolean |
isResponsive()
Returns if this
Image should scale to the size of its parent |
void |
postDeserialize() |
void |
setAtlas(java.lang.String atlas)
Sets the atlas to look up the texture in
|
void |
setFlipX(boolean flipX)
Sets if the texture should be flipped horizontally during rendering
|
void |
setFlipY(boolean flipY)
Sets if the texture should be flipped vertically during rendering
|
void |
setRenderNodeDirty() |
void |
setResponsive(boolean responsive)
Sets if this
Image should scale to the size of its parent |
void |
setStyleId(java.lang.String styleId)
Sets the style if for this
UiElement |
void |
setTexture(Texture texture)
|
void |
setTexturePath(java.lang.String texturePath)
Sets the current texture path.
|
void |
setTextureRegion(TextureRegion textureRegion)
Sets the current
TextureRegion used by this Image |
void |
setVisibility(Visibility visibility)
Sets the current
Visibility of this UiElement |
void |
setZIndex(int zIndex)
Sets the Z index of this
UiElement. |
void |
shrinkToImageSize(AssetManager assetManager) |
void |
syncWithUpdate(UiContainerRenderTree rootNode)
Syncs data between the
UiElement and RenderNode during update |
addEffectListener, addHoverListener, addNodeStateListener, alignAbove, alignBelow, alignEdgeToEdge, alignLeftOf, alignRightOf, applyEffect, deferUntilLayout, deferUntilLayout, deferUntilRender, deferUntilRender, deferUntilUpdate, deferUntilUpdate, deferUntilUpdate, deferUntilUpdate, equals, getContentHeight, getContentWidth, getElementById, getHeight, getId, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getStyleId, getVisibility, getWidth, getX, getY, getZIndex, hashCode, isDebugEnabled, isFlexLayout, isInitialised, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, notifyNodeStateListeners, removeEffectListener, removeHoverListener, removeNodeStateListener, set, setContentHeight, setContentWidth, setDebugEnabled, setHeight, setHeightToContentHeightOf, setHeightToHeightOf, setWidth, setWidthToContentWidthOf, setWidthToWidthOf, setX, setXY, setY, snapTo, snapTo, syncWithLayout, syncWithRenderprotected ImageRenderNode renderNode
public Image()
Imagepublic Image(java.lang.String id)
id - The unique ID for this Imagepublic Image(float x,
float y,
float width,
float height)
x - The x coordinate of this element relative to its parenty - The y coordinate of this element relative to its parentwidth - The width of this elementheight - The height of this elementpublic Image(java.lang.String id,
float x,
float y,
float width,
float height)
id - The unique ID for this element (if null an ID will be generated)x - The x coordinate of this element relative to its parenty - The y coordinate of this element relative to its parentwidth - The width of this elementheight - The height of this elementpublic Image(java.lang.String id,
java.lang.String texturePath)
id - The unique ID for this ImagetexturePath - The path for the Texture to be loaded by the
AssetManagerpublic Image(Texture texture)
Imagetexture - The Texture to usepublic Image(TextureRegion textureRegion)
ImagetextureRegion - The TextureRegion to usepublic Image(java.lang.String id,
Texture texture)
public Image(java.lang.String id,
TextureRegion textureRegion)
id - The unique ID for this ImagetextureRegion - The TextureRegion to usepublic void postDeserialize()
protected void estimateSize()
public void shrinkToImageSize(AssetManager assetManager)
public void attach(ParentRenderNode<?,?> parentRenderNode)
UiElementRenderNode for this element to a parent
RenderNodeattach in class UiElementparentRenderNode - The parent RenderNode to attach topublic void detach(ParentRenderNode<?,?> parentRenderNode)
UiElementRenderNode from a parent
RenderNodedetach in class UiElementparentRenderNode - The parent RenderNode to detach frompublic void invokeBeginHover()
Hoverablepublic void invokeEndHover()
Hoverablepublic TextureRegion getTextureRegion(AssetManager assetManager)
TextureRegion for this ImageassetManager - The game's AssetManagerTextureRegion has been setpublic void setTextureRegion(TextureRegion textureRegion)
TextureRegion used by this ImagetextureRegion - The TextureRegion to usepublic java.lang.String getTexturePath()
public void setTexturePath(java.lang.String texturePath)
TextureRegion by loading it via the AssetManagertexturePath - The path to the texturepublic java.lang.String getAtlas()
public void setAtlas(java.lang.String atlas)
atlas - Null if the texture should not be looked up via an atlaspublic boolean isResponsive()
Image should scale to the size of its parentpublic void setResponsive(boolean responsive)
Image should scale to the size of its parentresponsive - public void setVisibility(Visibility visibility)
UiElementVisibility of this UiElementsetVisibility in class UiElementvisibility - The Visibility to setpublic void syncWithUpdate(UiContainerRenderTree rootNode)
UiElementUiElement and RenderNode during updatesyncWithUpdate in class UiElementpublic void setStyleId(java.lang.String styleId)
UiElementUiElementsetStyleId in class UiElementstyleId - The style id to setpublic void setZIndex(int zIndex)
UiElementUiElement. Elements will be rendered on
different Z layers in ascending Z order (negatives values first, positive values last)public StyleRule getStyleRule()
getStyleRule in class UiElementpublic boolean isFlipX()
public void setFlipX(boolean flipX)
flipX - True if the texture should be flippedpublic boolean isFlipY()
public void setFlipY(boolean flipY)
flipY - True if the texture should be flippedpublic boolean isRenderNodeDirty()
isRenderNodeDirty in class UiElementpublic void setRenderNodeDirty()
setRenderNodeDirty in class UiElementpublic boolean isInitialLayoutOccurred()
isInitialLayoutOccurred in class UiElementpublic boolean isInitialUpdateOccurred()
isInitialUpdateOccurred in class UiElementpublic int getRenderX()
UiElementgetRenderX in class UiElementInteger.MIN_VALUE if not renderingpublic int getRenderY()
UiElementgetRenderY in class UiElementInteger.MIN_VALUE if not renderingpublic int getRenderWidth()
UiElementgetRenderWidth in class UiElementpublic int getRenderHeight()
UiElementgetRenderHeight in class UiElement