|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--goText.GoText
Field Summary | |
static int |
CENTER_BOTTOM
|
static int |
CENTER_CENTER
|
static int |
CENTER_TOP
|
static int |
LEFT_BOTTOM
|
static int |
LEFT_CENTER
|
static int |
LEFT_TOP
|
static int |
MODE_2D
|
static int |
MODE_3D
|
static int |
RIGHT_BOTTOM
|
static int |
RIGHT_CENTER
|
static int |
RIGHT_TOP
|
Constructor Summary | |
GoText(double xPosition,
double yPosition,
double zPosition,
double xPath,
double yPath,
double zPath,
double xUp,
double yUp,
double zUp,
double xScale,
double yScale,
int alignment,
GoFont font,
java.lang.String text)
3D Text string constructor. |
|
GoText(double xPosition,
double yPosition,
double zPosition,
double xPath,
double yPath,
double xScale,
double yScale,
int alignment,
GoFont font,
java.lang.String text)
2D Text string constructor. |
Method Summary | |
void |
alignment(int alignment)
Set the text alignment. |
void |
font(GoFont font)
Set the text font type. |
void |
mode(int mode)
Set the text mode. |
void |
path(double x,
double y)
Set the horizontal text alignment. |
void |
path(double x,
double y,
double z)
Set the horizontal text alignment. |
void |
position(double x,
double y,
double z)
Set the relative text coordinate position. |
void |
render(Go go)
Render the text. |
void |
scale(double x,
double y)
Set the text's horizontal and vertical scales. |
void |
text(java.lang.String text)
Set the text string. |
void |
up(double x,
double y,
double z)
Set the vertical text alignment. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int MODE_2D
public static final int MODE_3D
public static final int LEFT_BOTTOM
public static final int CENTER_BOTTOM
public static final int RIGHT_BOTTOM
public static final int LEFT_CENTER
public static final int CENTER_CENTER
public static final int RIGHT_CENTER
public static final int LEFT_TOP
public static final int CENTER_TOP
public static final int RIGHT_TOP
Constructor Detail |
public GoText(double xPosition, double yPosition, double zPosition, double xPath, double yPath, double zPath, double xUp, double yUp, double zUp, double xScale, double yScale, int alignment, GoFont font, java.lang.String text)
This constructor will create a text string placed in a three dimentional scene. Creating text with this constructor will set the text's mode value to MODE_3D (see mode).
Creates a new text string, based on the font type, at position (xPosition, yPosition, zPosition). The text will have a horizontal alignment indicated by (xPath, yPath, zPath) and a vertical alignment indicated by (xUp, yUp, zUp). The horizontal and vertical scale of the text is controlled with xScale and yScale, respectively. The text alignment is specified as a HORIZONTAL_VERTICAL alignment relative to the text's position value; possible values include
- LEFT_BOTTOM
- CENTER_BOTTOM
- RIGHT_BOTTOM
- LEFT_CENTER
- CENTER_CENTER
- RIGHT_CENTER
- LEFT_TOP
- CENTER_TOP
- RIGHT_TOP
public GoText(double xPosition, double yPosition, double zPosition, double xPath, double yPath, double xScale, double yScale, int alignment, GoFont font, java.lang.String text)
This constructor will create a text string positioned at a specified three dimensional coordinate position, but the text will always be drawn flat (2D) relative to the screen. Creating text with this constructor will set the text's mode value to MODE_2D (see mode).
Creates a new text string, based on the font type, at position (xPosition, yPosition, zPosition). The text will have a horizontal alignment indicated by (xPath, yPath). The horizontal and vertical scale of the text is controlled with xScale and yScale, respectively. The text alignment is specified as a HORIZONTAL_VERTICAL alignment relative to the text's position value; possible values include
- LEFT_BOTTOM
- CENTER_BOTTOM
- RIGHT_BOTTOM
- LEFT_CENTER
- CENTER_CENTER
- RIGHT_CENTER
- LEFT_TOP
- CENTER_TOP
- RIGHT_TOP
Method Detail |
public void render(Go go)
Current text is rendered in context go.
public void mode(int mode)
The text mode is set to one of
MODE_2DThis text mode positions the text in a three dimensional scene, but the text will always be drawn flat (2D) relative to the screen. The text is drawn according to the specified horizontal alignment. When text is drawn in this mode, the vertical alignment of the text is automatically calculated relative to the screen. The horizontal alignment can be reset with path().MODE_3DThis text mode positions the text in a three dimensional scene and draws the text according to the specified horizontal and vertical alignments. The horizontal and vertical alignments can be reset with path() and up(), respectively.
public void position(double x, double y, double z)
Location of text is set to (x, y, z).
public void path(double x, double y, double z)
Horizontal alignment of text is set to the vector (x, y, z).
NOTE: This method is used when the text mode is set to MODE_3D (see mode).
public void up(double x, double y, double z)
Vertical alignment of text is set to the vector (x, y, z).
NOTE: This method is used when the text mode is set to MODE_3D (see mode).
public void path(double x, double y)
Horizontal alignment of text is set to the vector (x, y).
NOTE: This method is used when the text mode is set to MODE_2D (see mode).
public void scale(double x, double y)
Horizontal and vertical scales are set to a multiple of x and y, respectively.
public void alignment(int alignment)
The alignment value is sepcified as a HORIZONTAL_VERTICAL position relative to the location value. Possible values include
- LEFT_BOTTOM
- CENTER_BOTTOM
- RIGHT_BOTTOM
- LEFT_CENTER
- CENTER_CENTER
- RIGHT_CENTER
- LEFT_TOP
- CENTER_TOP
- RIGHT_TOP
public void font(GoFont font)
Font type of text is set to font.
public void text(java.lang.String text)
Text string is set to text.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |