algoanim.primitives
Class Text

java.lang.Object
  extended by algoanim.primitives.Primitive
      extended by algoanim.primitives.AdvancedTextSupport
          extended by algoanim.primitives.Text

public class Text
extends AdvancedTextSupport

Represents a text specified by an upper left position and a content.

Author:
Stephan Mehlhase

Field Summary
 
Fields inherited from class algoanim.primitives.Primitive
gen
 
Constructor Summary
Text(TextGenerator tg, Node upperLeftCorner, java.lang.String theText, java.lang.String name, DisplayOptions display, TextProperties tp)
          Instantiates the Text and calls the create() method of the associated TextGenerator.
 
Method Summary
 TextProperties getProperties()
          Returns the properties of this Text element.
 java.lang.String getText()
          Returns the content of this Text element.
 Node getUpperLeft()
          Returns the upper left corner of this Text element.
 void setName(java.lang.String newName)
          Sets the name of this Primitive.
 
Methods inherited from class algoanim.primitives.AdvancedTextSupport
setFont, setText
 
Methods inherited from class algoanim.primitives.Primitive
changeColor, exchange, getDisplayOptions, getName, hide, hide, moveBy, moveTo, moveVia, rotate, rotate, show, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Text

public Text(TextGenerator tg,
            Node upperLeftCorner,
            java.lang.String theText,
            java.lang.String name,
            DisplayOptions display,
            TextProperties tp)
Instantiates the Text and calls the create() method of the associated TextGenerator.

Parameters:
tg - the appropriate code Generator.
upperLeftCorner - the upper left corner of this Text element.
theText - the content of this Text element.
name - the name of this Text element.
display - [optional] the DisplayOptions of this Text element.
tp - [optional] the properties of this Text element.
Method Detail

getProperties

public TextProperties getProperties()
Returns the properties of this Text element.

Returns:
the properties of this Text element.

getText

public java.lang.String getText()
Returns the content of this Text element.

Returns:
the content of this Text element.

getUpperLeft

public Node getUpperLeft()
Returns the upper left corner of this Text element.

Returns:
the upper left corner of this Text element.

setName

public void setName(java.lang.String newName)
Description copied from class: Primitive
Sets the name of this Primitive.

Overrides:
setName in class Primitive
Parameters:
newName - the new name for this Primitive.
See Also:
Primitive.setName(java.lang.String)