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.
|
float |
getAlphaDiscard() |
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 |
setAlphaDiscard(float alphaDiscard)
Sets the alphaDiscardThreshold for the image material.
|
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, isAttachedpublic 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 GuiComponentclone in class AbstractGuiComponentpublic void attach(GuiControl parent)
attach in interface GuiComponentattach in class AbstractGuiComponentpublic void detach(GuiControl parent)
detach in interface GuiComponentdetach in class AbstractGuiComponentpublic void setImageTexture(com.jme3.texture.Texture t)
public com.jme3.texture.Texture getImageTexture()
public void setColor(com.jme3.math.ColorRGBA c)
ColoredComponentsetColor in interface ColoredComponentprotected void resetColor()
public com.jme3.math.ColorRGBA getColor()
ColoredComponentgetColor in interface ColoredComponentpublic void setAlpha(float f)
ColoredComponentsetAlpha in interface ColoredComponentpublic float getAlpha()
ColoredComponentgetAlpha in interface ColoredComponentpublic 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 void setAlphaDiscard(float alphaDiscard)
Note: for 2D UIs this threshold is not necessary as 2D GUIs will always sort purely back-to-front on Z. For 3D UIs, this setting may prevent visual artifacts from certain directions for very transparent pixels (background showing through, etc.))
public float getAlphaDiscard()
public GuiMaterial getMaterial()
public void calculatePreferredSize(com.jme3.math.Vector3f size)
calculatePreferredSize in interface GuiComponentpublic void reshape(com.jme3.math.Vector3f pos,
com.jme3.math.Vector3f size)
reshape in interface GuiComponentprotected void resetAlignment()
protected void createIcon()
protected com.jme3.math.Vector2f getEffectiveIconSize()