public class IconComponent extends AbstractGuiComponent implements java.lang.Cloneable, ColoredComponent
Constructor and Description |
---|
IconComponent(java.lang.String imagePath) |
IconComponent(java.lang.String imagePath,
float iconScale,
float xMargin,
float yMargin,
float zOffset,
boolean lit) |
IconComponent(java.lang.String imagePath,
com.jme3.math.Vector2f iconScale,
float xMargin,
float yMargin,
float zOffset,
boolean lit) |
IconComponent(com.jme3.texture.Texture image,
com.jme3.math.Vector2f iconScale,
float xMargin,
float yMargin,
float zOffset,
boolean lit) |
Modifier and Type | Method and Description |
---|---|
void |
attach(GuiControl parent) |
void |
calculatePreferredSize(com.jme3.math.Vector3f size) |
IconComponent |
clone() |
protected void |
createIcon() |
void |
detach(GuiControl parent) |
float |
getAlpha()
Returns the current alpha multiplier that is applied
to the color when set to the actual visuals.
|
com.jme3.math.ColorRGBA |
getColor()
Returns the current color of this component.
|
protected com.jme3.math.Vector2f |
getEffectiveIconSize() |
HAlignment |
getHAlignment() |
com.jme3.math.Vector2f |
getIconScale() |
com.jme3.math.Vector2f |
getIconSize() |
com.jme3.texture.Texture |
getImageTexture() |
com.jme3.math.Vector2f |
getMargin() |
GuiMaterial |
getMaterial() |
com.jme3.math.Vector3f |
getOffset() |
VAlignment |
getVAlignment() |
float |
getZOffset() |
boolean |
isOverlay() |
protected void |
resetAlignment() |
protected void |
resetColor() |
void |
reshape(com.jme3.math.Vector3f pos,
com.jme3.math.Vector3f size) |
void |
setAlpha(float f)
Sets an alpha multiplier that will be applied to the
color when set to the actual visuals.
|
void |
setColor(com.jme3.math.ColorRGBA c)
Sets the color for this component.
|
void |
setHAlignment(HAlignment a) |
void |
setIconScale(float scale) |
void |
setIconScale(com.jme3.math.Vector2f scale) |
void |
setIconSize(com.jme3.math.Vector2f iconSize)
Forces the size of the icon to be the size specified regardless
of it's actual pixel size.
|
void |
setImageTexture(com.jme3.texture.Texture t) |
void |
setMargin(float x,
float y) |
void |
setMargin(com.jme3.math.Vector2f margin) |
void |
setOffset(com.jme3.math.Vector3f v) |
void |
setOverlay(boolean f) |
void |
setVAlignment(VAlignment a) |
void |
setZOffset(float z) |
getGuiControl, getNode, invalidate, isAttached
public IconComponent(java.lang.String imagePath)
public IconComponent(java.lang.String imagePath, float iconScale, float xMargin, float yMargin, float zOffset, boolean lit)
public IconComponent(java.lang.String imagePath, com.jme3.math.Vector2f iconScale, float xMargin, float yMargin, float zOffset, boolean lit)
public IconComponent(com.jme3.texture.Texture image, com.jme3.math.Vector2f iconScale, float xMargin, float yMargin, float zOffset, boolean lit)
public IconComponent clone()
clone
in interface GuiComponent
clone
in class AbstractGuiComponent
public void attach(GuiControl parent)
attach
in interface GuiComponent
attach
in class AbstractGuiComponent
public void detach(GuiControl parent)
detach
in interface GuiComponent
detach
in class AbstractGuiComponent
public void setImageTexture(com.jme3.texture.Texture t)
public com.jme3.texture.Texture getImageTexture()
public void setColor(com.jme3.math.ColorRGBA c)
ColoredComponent
setColor
in interface ColoredComponent
protected void resetColor()
public com.jme3.math.ColorRGBA getColor()
ColoredComponent
getColor
in interface ColoredComponent
public void setAlpha(float f)
ColoredComponent
setAlpha
in interface ColoredComponent
public float getAlpha()
ColoredComponent
getAlpha
in interface ColoredComponent
public void setIconScale(float scale)
public void setIconScale(com.jme3.math.Vector2f scale)
public com.jme3.math.Vector2f getIconScale()
public void setIconSize(com.jme3.math.Vector2f iconSize)
public com.jme3.math.Vector2f getIconSize()
public void setHAlignment(HAlignment a)
public HAlignment getHAlignment()
public void setVAlignment(VAlignment a)
public VAlignment getVAlignment()
public void setMargin(float x, float y)
public void setMargin(com.jme3.math.Vector2f margin)
public com.jme3.math.Vector2f getMargin()
public void setZOffset(float z)
public float getZOffset()
public void setOffset(com.jme3.math.Vector3f v)
public com.jme3.math.Vector3f getOffset()
public void setOverlay(boolean f)
public boolean isOverlay()
public GuiMaterial getMaterial()
public void calculatePreferredSize(com.jme3.math.Vector3f size)
calculatePreferredSize
in interface GuiComponent
public void reshape(com.jme3.math.Vector3f pos, com.jme3.math.Vector3f size)
reshape
in interface GuiComponent
protected void resetAlignment()
protected void createIcon()
protected com.jme3.math.Vector2f getEffectiveIconSize()