Class AbstractIconElement
- java.lang.Object
-
- be.yildizgames.common.util.BaseRegisterable
-
- be.yildizgames.module.graphic.gui.internal.BaseElement
-
- be.yildizgames.module.graphic.gui.element.AbstractIconElement
-
- All Implemented Interfaces:
be.yildizgames.common.util.Registerable,Element
public abstract class AbstractIconElement extends BaseElement
An Icon element is a simple texture on a plane. The element can be moved, rotated.- Author:
- Grégory Van den Borre
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface be.yildizgames.module.graphic.gui.internal.Element
Element.Alignment
-
-
Field Summary
-
Fields inherited from class be.yildizgames.module.graphic.gui.internal.BaseElement
MAX_OPACITY, virtualHeight
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractIconElement(String name, be.yildizgames.module.coordinate.BaseCoordinate coordinates, Material iconMaterial)Full constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static AbstractIconElementgetByName(String name)MaterialgetMaterial()abstract StringgetParentName()Retrieve the parent container name in implementation.protected abstract intgetZ()Retrieve the object Z value in implementation.protected voidremoveFromRegisterer()Remove this object from its registerer.abstract voidrotateRadian(float value)Rotate the texture.voidsetMaterial(Material newMaterial)Set a new Material.protected abstract voidsetMaterialImpl(Material newMaterial)Set the material in implementation.-
Methods inherited from class be.yildizgames.module.graphic.gui.internal.BaseElement
addToLeft, addToPosition, addToTop, delete, getBottom, getCoordinates, getHeight, getLeft, getOpacity, getRight, getTop, getWidth, hide, hideImpl, isVisible, multiplySize, resetVirtualHeight, setCoordinates, setHeight, setLeft, setLeft, setLeft, setLeft, setPosition, setPosition, setPositionImpl, setSize, setSize, setSizeImpl, setTop, setTop, setTop, setTop, setVirtualHeight, setVisible, setWidth, show, showImpl, updateAddPositionValue
-
Methods inherited from class be.yildizgames.common.util.BaseRegisterable
equals, getName, hashCode, toString
-
-
-
-
Method Detail
-
getByName
public static AbstractIconElement getByName(String name)
-
rotateRadian
public abstract void rotateRadian(float value)
Rotate the texture.- Parameters:
value- angle to rotate, in radians.
-
getZ
protected abstract int getZ()
Retrieve the object Z value in implementation.- Returns:
- this icon Z value.
-
removeFromRegisterer
protected final void removeFromRegisterer()
Remove this object from its registerer.
-
getMaterial
public final Material getMaterial()
- Returns:
- The material applied on this icon.
-
setMaterial
public final void setMaterial(Material newMaterial)
Set a new Material.- Parameters:
newMaterial- New material to set.
-
setMaterialImpl
protected abstract void setMaterialImpl(Material newMaterial)
Set the material in implementation.- Parameters:
newMaterial- Material to set.
-
getParentName
public abstract String getParentName()
Retrieve the parent container name in implementation.- Returns:
- The parent container name.
-
-