com.jme.ui
Class UIObject
java.lang.Object
com.jme.scene.Spatial
com.jme.scene.Node
com.jme.ui.UIObject
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- UIActiveObject, UIBillboard, UICharacter, UIText
- public abstract class UIObject
- extends Node
- Author:
- schustej
- See Also:
- Serialized Form
| Fields inherited from class com.jme.scene.Spatial |
currentStates, defaultStateList, forceCull, forceView, frustrumIntersects, geometricalControllers, lightCombineMode, localRotation, localScale, localTranslation, name, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
|
Constructor Summary |
UIObject(java.lang.String name,
int x,
int y,
int width,
int height,
UIColorScheme scheme,
int flags)
|
|
Method Summary |
void |
centerAt(int x,
int y)
Places the center of the control at the given screen location |
int |
getHeight()
gets the height of the control, before scaling |
int |
getWidth()
gets the width of the control, before scaling |
void |
setLocation(int x,
int y)
Moves the quad around the screen, properly setting local params at the
same time. |
protected void |
setup()
This is used in all extention constructors. |
boolean |
usingBorders()
|
boolean |
usingInverseBorder()
|
boolean |
usingStdBorder()
|
boolean |
usingTexture()
|
| Methods inherited from class com.jme.scene.Node |
applyRenderState, attachChild, detachAllChildren, detachChild, detachChildAt, detachChildNamed, draw, drawBounds, findCollisions, findPick, getChild, getChild, getChildren, getQuantity, hasChild, hasCollision, putClone, setChild, setForceView, updateCollisionTree, updateWorldBound, updateWorldData |
| Methods inherited from class com.jme.scene.Spatial |
addController, applyDefaultStates, calculateCollisions, calculatePick, clearCurrentState, clearCurrentStates, clearRenderState, getController, getControllers, getCurrentState, getLastFrustumIntersection, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getName, getParent, getRenderQueueMode, getRenderStateList, getTextureCombineMode, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, isForceCulled, isForceView, onDraw, onDrawBounds, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeFromParent, setForceCull, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setName, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setWorldBound, setZOrder, toString, updateGeometricState, updateRenderState, updateRenderState |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BORDER
public static final int BORDER
- See Also:
- Constant Field Values
INVERSE_BORDER
public static final int INVERSE_BORDER
- See Also:
- Constant Field Values
TEXTURE
public static final int TEXTURE
- See Also:
- Constant Field Values
_x
protected int _x
_y
protected int _y
_width
protected int _width
_height
protected int _height
_textureStates
protected java.util.Vector _textureStates
_quad
protected Quad _quad
_topborder
protected Line _topborder
_rightborder
protected Line _rightborder
_bottomborder
protected Line _bottomborder
_leftborder
protected Line _leftborder
UIObject
public UIObject(java.lang.String name,
int x,
int y,
int width,
int height,
UIColorScheme scheme,
int flags)
setup
protected void setup()
- This is used in all extention constructors.
Note that a Quad's vertexes are based on the center of the quad, so we have to
account for that in the translations. However, the hitarea is from the lower left corner.
getWidth
public int getWidth()
- gets the width of the control, before scaling
- Returns:
getHeight
public int getHeight()
- gets the height of the control, before scaling
- Returns:
setLocation
public void setLocation(int x,
int y)
- Moves the quad around the screen, properly setting local params at the
same time.
centerAt
public void centerAt(int x,
int y)
- Places the center of the control at the given screen location
- Returns:
usingTexture
public boolean usingTexture()
usingBorders
public boolean usingBorders()
usingStdBorder
public boolean usingStdBorder()
usingInverseBorder
public boolean usingInverseBorder()