public class TextDescription extends ObjectDescription
| Modifier and Type | Field and Description |
|---|---|
static String |
_end |
static String |
_middle |
static String |
_start |
static String |
OBJECT_TYPE_TEXT |
id, parentRegion, sensitive, takesTo, takesToType, zindex| Constructor and Description |
|---|
TextDescription(String id,
double x,
double y,
int z,
float s,
String tx,
Color c,
float alpha,
short ta,
Region pr)
Constructs the description of an image (VTextST).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
coordInside(double pvx,
double pvy)
Are the supplied coordinates inside the object described.
|
void |
createObject(SceneManager sm,
VirtualSpace vs,
boolean fadeIn)
Called automatically by scene manager.
|
void |
destroyObject(SceneManager sm,
VirtualSpace vs,
boolean fadeOut)
Called automatically by scene manager.
|
static short |
getAnchor(String anchor)
Get ZVTM constant value representing anchors "start", "midlle", "end".
|
Font |
getFont()
Get the AWT Font object used to draw this text.
|
Glyph |
getGlyph()
Get Glyph described by this description.
|
float |
getScale()
Get this text object's scale multiplication factor.
|
String |
getText()
Get this text object's text string.
|
float |
getTranslucencyValue() |
String |
getType()
Type of object.
|
double |
getX()
Get x-coordinate of object in virtual space.
|
double |
getY()
Get y-coordinate of object in virtual space.
|
void |
moveTo(double x,
double y) |
void |
setFont(Font f)
Get the AWT Font used to draw this text.
|
getID, getParentRegion, getZindex, isSensitive, setParentRegion, setSensitive, setTakesTo, setZindex, takesTo, takesToTypepublic static final String OBJECT_TYPE_TEXT
public static final String _start
public static final String _middle
public static final String _end
public TextDescription(String id, double x, double y, int z, float s, String tx, Color c, float alpha, short ta, Region pr)
id - ID of object in scenex - x-coordinate in sceney - y-coordinate in scenez - z-index (layer). Feed 0 if you don't know.s - scale factortx - text labelc - text coloralpha - in [0;1.0]. 0 is fully transparent, 1 is opaqueta - text alignment, one of VText.TEXT_ANCHOR_*pr - parent Region in scenepublic String getType()
getType in class ObjectDescriptionpublic void createObject(SceneManager sm, VirtualSpace vs, boolean fadeIn)
ObjectDescriptioncreateObject in class ObjectDescriptionpublic void destroyObject(SceneManager sm, VirtualSpace vs, boolean fadeOut)
ObjectDescriptiondestroyObject in class ObjectDescriptionpublic void setFont(Font f)
public Font getFont()
public Glyph getGlyph()
ObjectDescriptiongetGlyph in class ObjectDescriptionpublic String getText()
public float getScale()
public static short getAnchor(String anchor)
public double getX()
ObjectDescriptiongetX in class ObjectDescriptionpublic double getY()
ObjectDescriptiongetY in class ObjectDescriptionpublic void moveTo(double x,
double y)
moveTo in class ObjectDescriptionpublic float getTranslucencyValue()
public boolean coordInside(double pvx,
double pvy)
coordInside in class ObjectDescriptionCopyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2015 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.