jhplot.shapes
Class Text

java.lang.Object
  extended by jhplot.shapes.HShape
      extended by jhplot.shapes.Text

public class Text
extends HShape

Draw a TEXT in the USER coordinate system. Use HLabel to draw an interactive label.


Field Summary
 
Fields inherited from class jhplot.shapes.HShape
ARROW, CIRCLE, ELLIPSE, IMAGE, LINE, POLYGON, RECTAN, TEXT
 
Constructor Summary
Text(java.lang.String text, double X1, double Y1)
          Create a TEXT object
Text(java.lang.String text, double X1, double Y1, java.awt.Font f, java.awt.Color color)
          Create a TEXT object
 
Method Summary
 java.awt.Font getFont()
          Get the font
 double getRotation()
          Get the rotation angle
 java.lang.String getText()
          Get a string with the text
 void setFont(java.awt.Font f)
          Set the font
 void setRotation(double rotate)
          Set the rotation angle
 void setText(java.lang.String text)
          Set a string with the text
 java.lang.String toString()
          Show this object
 
Methods inherited from class jhplot.shapes.HShape
contains, getColor, getFill, getPosition, getPositionCoordinate, getScaledPosition, getSettings, getStroke, getTransparency, getWhoAm, setColor, setDashed, setDotted, setFill, setPosCoord, setStroke, setTransparency, setWhoAm, updateSettings
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Text

public Text(java.lang.String text,
            double X1,
            double Y1,
            java.awt.Font f,
            java.awt.Color color)
Create a TEXT object

Parameters:
text - Text
X1 - X position
Y1 - Y position
f - Font
color - Color

Text

public Text(java.lang.String text,
            double X1,
            double Y1)
Create a TEXT object

Parameters:
text - Text
X1 - X position
Y1 - Y position
Method Detail

getFont

public java.awt.Font getFont()
Get the font

Returns:
font to draw the text

setRotation

public void setRotation(double rotate)
Set the rotation angle

Parameters:
rotate - Rotation angle

getRotation

public double getRotation()
Get the rotation angle

Returns:
Rotation angle

setFont

public void setFont(java.awt.Font f)
Set the font

Parameters:
f - Font to be set

getText

public java.lang.String getText()
Get a string with the text

Returns:
Text

setText

public void setText(java.lang.String text)
Set a string with the text

Parameters:
text - Test to be inserted

toString

public java.lang.String toString()
Show this object

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this object


jHepWork 1.1 (C) Chekanov