public class TbtQuadBackgroundComponent extends AbstractGuiComponent implements java.lang.Cloneable, ColoredComponent
The texture is split up into a three-by-three grid in this fashion:
+---+--------------+-------+
| | <-----> | |
y2 +---+--------------+-------+
| | | |
| ^ | ^ | ^ |
| | | | | | |
| | | <-----> | | |
| | | | | | |
| v | v | v |
| | | |
y1 +---+--------------+-------+
| | <-----> | |
+---+--------------+-------+
x1 x2
Arrows indicate the direction in which each grid cell will stretch to fill
the area given by the component.Common pitfalls
| Constructor and Description |
|---|
TbtQuadBackgroundComponent(TbtQuad quad) |
TbtQuadBackgroundComponent(TbtQuad quad,
com.jme3.texture.Texture texture) |
TbtQuadBackgroundComponent(TbtQuad quad,
com.jme3.texture.Texture texture,
float xMargin,
float yMargin) |
TbtQuadBackgroundComponent(TbtQuad quad,
com.jme3.texture.Texture texture,
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) |
TbtQuadBackgroundComponent |
clone() |
static TbtQuadBackgroundComponent |
create(java.lang.String texture,
float imageScale,
int x1,
int y1,
int x2,
int y2,
float zOffset,
boolean lit) |
static TbtQuadBackgroundComponent |
create(com.jme3.texture.Texture t,
float imageScale,
int x1,
int y1,
int x2,
int y2,
float zOffset,
boolean lit) |
protected void |
createGeometry() |
protected void |
createMaterial() |
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.
|
com.jme3.math.Vector2f |
getMargin() |
GuiMaterial |
getMaterial() |
com.jme3.texture.Texture |
getTexture() |
float |
getZOffset() |
protected void |
refreshBackground(com.jme3.math.Vector3f size) |
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 |
setMargin(float x,
float y) |
void |
setMargin(com.jme3.math.Vector2f margin) |
void |
setTexture(com.jme3.texture.Texture t) |
void |
setZOffset(float z) |
java.lang.String |
toString() |
getGuiControl, getNode, invalidate, isAttachedpublic TbtQuadBackgroundComponent(TbtQuad quad)
public TbtQuadBackgroundComponent(TbtQuad quad, com.jme3.texture.Texture texture)
public TbtQuadBackgroundComponent(TbtQuad quad, com.jme3.texture.Texture texture, float xMargin, float yMargin)
public TbtQuadBackgroundComponent(TbtQuad quad, com.jme3.texture.Texture texture, float xMargin, float yMargin, float zOffset, boolean lit)
public static TbtQuadBackgroundComponent create(java.lang.String texture, float imageScale, int x1, int y1, int x2, int y2, float zOffset, boolean lit)
public static TbtQuadBackgroundComponent create(com.jme3.texture.Texture t, float imageScale, int x1, int y1, int x2, int y2, float zOffset, boolean lit)
public TbtQuadBackgroundComponent 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 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 setTexture(com.jme3.texture.Texture t)
public com.jme3.texture.Texture getTexture()
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 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 createMaterial()
protected void createGeometry()
protected void refreshBackground(com.jme3.math.Vector3f size)
public java.lang.String toString()
toString in class java.lang.Object