public abstract class RenderNode<T extends UiElement,S extends StyleRule> extends java.lang.Object implements HoverableRenderNode
Modifier and Type | Field and Description |
---|---|
protected java.util.List<UiEffect> |
effects |
protected T |
element |
protected boolean |
hiddenByLayoutRule |
protected boolean |
initialLayoutOccurred |
protected CollisionBox |
innerArea |
protected CollisionBox |
outerArea |
protected ParentRenderNode<?,?> |
parent |
protected float |
preferredContentHeight |
protected float |
preferredContentWidth |
protected S |
style |
protected Rectangle |
targetOuterArea |
protected float |
xOffset |
protected float |
yOffset |
protected int |
zIndex |
Constructor and Description |
---|
RenderNode(ParentRenderNode<?,?> parent,
T element) |
Modifier and Type | Method and Description |
---|---|
void |
applyEffect(UiEffect effect) |
void |
beginHover() |
boolean |
contains(float screenX,
float screenY) |
protected abstract float |
determinePreferredContentHeight(LayoutState layoutState) |
protected abstract float |
determinePreferredContentWidth(LayoutState layoutState) |
protected abstract S |
determineStyleRule(LayoutState layoutState) |
protected abstract float |
determineXOffset(LayoutState layoutState) |
protected abstract float |
determineYOffset(LayoutState layoutState) |
void |
endHover() |
int |
getContentRenderHeight() |
int |
getContentRenderWidth() |
int |
getContentRenderX() |
int |
getContentRenderY() |
RenderNode<?,?> |
getElementById(java.lang.String id) |
java.lang.String |
getId() |
float |
getInnerHeight() |
int |
getInnerRenderHeight() |
int |
getInnerRenderWidth() |
int |
getInnerRenderX() |
int |
getInnerRenderY() |
float |
getInnerWidth() |
float |
getInnerX() |
float |
getInnerY() |
float |
getOuterHeight() |
int |
getOuterRenderHeight() |
int |
getOuterRenderWidth() |
int |
getOuterRenderX() |
int |
getOuterRenderY() |
float |
getOuterWidth() |
float |
getOuterX() |
float |
getOuterY() |
ParentRenderNode<?,?> |
getParent() |
float |
getPreferredContentHeight() |
float |
getPreferredContentWidth() |
float |
getPreferredInnerHeight() |
float |
getPreferredInnerWidth() |
float |
getPreferredOuterHeight() |
float |
getPreferredOuterWidth() |
float |
getRelativeX() |
float |
getRelativeY() |
NodeState |
getState() |
S |
getStyle() |
float |
getXOffset() |
float |
getYOffset() |
int |
getZIndex() |
void |
interpolate(float alpha) |
boolean |
isDirty() |
boolean |
isIncludedInLayout() |
boolean |
isIncludedInRender() |
void |
layout(LayoutState layoutState) |
ActionableRenderNode |
mouseDown(int screenX,
int screenY,
int pointer,
int button) |
boolean |
mouseMoved(int screenX,
int screenY) |
boolean |
mouseScrolled(int screenX,
int screenY,
float amount) |
void |
mouseUp(int screenX,
int screenY,
int pointer,
int button) |
void |
render(Graphics g) |
protected abstract void |
renderElement(Graphics g) |
void |
setDirty(boolean dirty) |
void |
setRelativeX(float relativeX) |
void |
setRelativeY(float relativeY) |
void |
setState(NodeState state) |
java.lang.String |
toString() |
void |
update(UiContainerRenderTree uiContainer,
float delta) |
protected final java.util.List<UiEffect> effects
protected final CollisionBox outerArea
protected final CollisionBox innerArea
protected final Rectangle targetOuterArea
protected final ParentRenderNode<?,?> parent
protected float preferredContentWidth
protected float preferredContentHeight
protected float xOffset
protected float yOffset
protected int zIndex
protected boolean hiddenByLayoutRule
protected boolean initialLayoutOccurred
public RenderNode(ParentRenderNode<?,?> parent, T element)
public void update(UiContainerRenderTree uiContainer, float delta)
public void interpolate(float alpha)
public void render(Graphics g)
public boolean mouseMoved(int screenX, int screenY)
public boolean mouseScrolled(int screenX, int screenY, float amount)
public ActionableRenderNode mouseDown(int screenX, int screenY, int pointer, int button)
public void mouseUp(int screenX, int screenY, int pointer, int button)
public boolean contains(float screenX, float screenY)
contains
in interface HoverableRenderNode
public void beginHover()
beginHover
in interface HoverableRenderNode
public void endHover()
endHover
in interface HoverableRenderNode
protected abstract void renderElement(Graphics g)
protected abstract S determineStyleRule(LayoutState layoutState)
protected abstract float determinePreferredContentWidth(LayoutState layoutState)
protected abstract float determinePreferredContentHeight(LayoutState layoutState)
protected abstract float determineXOffset(LayoutState layoutState)
protected abstract float determineYOffset(LayoutState layoutState)
public void layout(LayoutState layoutState)
public boolean isIncludedInLayout()
public boolean isIncludedInRender()
public boolean isDirty()
public void setDirty(boolean dirty)
public void applyEffect(UiEffect effect)
public float getRelativeX()
public void setRelativeX(float relativeX)
public float getRelativeY()
public void setRelativeY(float relativeY)
public float getPreferredContentWidth()
public float getPreferredInnerWidth()
public float getPreferredOuterWidth()
public float getPreferredContentHeight()
public float getPreferredInnerHeight()
public float getPreferredOuterHeight()
public float getXOffset()
public float getYOffset()
public float getOuterX()
public float getOuterY()
public float getOuterWidth()
public float getOuterHeight()
public int getOuterRenderX()
public int getOuterRenderY()
public int getOuterRenderWidth()
public int getOuterRenderHeight()
public float getInnerX()
public float getInnerY()
public float getInnerWidth()
public float getInnerHeight()
public int getInnerRenderX()
public int getInnerRenderY()
public int getInnerRenderWidth()
public int getInnerRenderHeight()
public int getContentRenderX()
public int getContentRenderY()
public int getContentRenderWidth()
public int getContentRenderHeight()
public NodeState getState()
public void setState(NodeState state)
public S getStyle()
public RenderNode<?,?> getElementById(java.lang.String id)
public java.lang.String getId()
getId
in interface HoverableRenderNode
public int getZIndex()
public ParentRenderNode<?,?> getParent()
public java.lang.String toString()
toString
in class java.lang.Object