org.opensourcephysics.display3d.core
Interface ElementText

All Superinterfaces:
Element, InteractionSource
All Known Implementing Classes:
ElementText

public interface ElementText
extends Element

Title: ElementSegment

Description: A 3D Segment.

Version:
March 2005
Author:
Francisco Esquembre

Nested Class Summary
static class ElementText.Loader
           
 
Field Summary
static int JUSTIFICATION_CENTER
          Center the Text over the point
static int JUSTIFICATION_LEFT
          Position the Text to the Left of the point
static int JUSTIFICATION_RIGHT
          Position the Text to the Right of the point
 
Fields inherited from interface org.opensourcephysics.display3d.core.Element
TARGET_POSITION, TARGET_SIZE
 
Method Summary
 java.awt.Font getFont()
          Gets the font of the text
 int getJustification()
          Gets the justification of the text
 double getRotationAngle()
          Gets the rotation angle for the text
 java.lang.String getText()
          Gets the text displayed
 void setFont(java.awt.Font font)
          Sets the font for the text
 void setJustification(int justification)
          Sets the justification for the text
 void setRotationAngle(double angle)
          Sets the rotation angle for the text.
 void setText(java.lang.String text)
          Sets the text to be displayed
 
Methods inherited from interface org.opensourcephysics.display3d.core.Element
getDrawingPanel3D, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isVisible, loadUnmutableObjects, setName, setSizeX, setSizeXYZ, setSizeXYZ, setSizeY, setSizeZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrame
 
Methods inherited from interface org.opensourcephysics.display3d.core.interaction.InteractionSource
addInteractionListener, getInteractionTarget, removeInteractionListener
 

Field Detail

JUSTIFICATION_CENTER

static final int JUSTIFICATION_CENTER
Center the Text over the point

See Also:
Constant Field Values

JUSTIFICATION_LEFT

static final int JUSTIFICATION_LEFT
Position the Text to the Left of the point

See Also:
Constant Field Values

JUSTIFICATION_RIGHT

static final int JUSTIFICATION_RIGHT
Position the Text to the Right of the point

See Also:
Constant Field Values
Method Detail

setText

void setText(java.lang.String text)
Sets the text to be displayed

Parameters:
text - the String

getText

java.lang.String getText()
Gets the text displayed


setFont

void setFont(java.awt.Font font)
Sets the font for the text

Parameters:
font - Font

getFont

java.awt.Font getFont()
Gets the font of the text

Returns:
Font

setJustification

void setJustification(int justification)
Sets the justification for the text

Parameters:
font - Font

getJustification

int getJustification()
Gets the justification of the text

Returns:
Font

setRotationAngle

void setRotationAngle(double angle)
Sets the rotation angle for the text. Default is 0.

Parameters:
angle - the rotation angle

getRotationAngle

double getRotationAngle()
Gets the rotation angle for the text