jhplot.shapes
Class Text
- java.lang.Object
-
- jhplot.shapes.HShape
-
- jhplot.shapes.Text
-
- All Implemented Interfaces:
- java.io.Serializable
public class Text extends HShape
Draw a TEXT onHPlot
canvas. Use the USER coordinate system. Use HLabel to draw an interactive label.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Text(java.lang.String text, double X1, double Y1)
Create a TEXT objectText(java.lang.String text, double X1, double Y1, java.awt.Font f, java.awt.Color color)
Create a TEXT object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
doc()
Show online documentation.java.awt.Font
getFont()
Get the fontjava.lang.String
getText()
Get a string with the text.void
setFont(java.awt.Font f)
Set the font for this text.void
setText(java.lang.String text)
Set a string with the textjava.lang.String
toString()
Show this object-
Methods inherited from class jhplot.shapes.HShape
contains, getColor, getFill, getPosition, getPositionCoordinate, getRotation, getScaledPosition, getSettings, getStroke, getTransparency, getWhoAm, setColor, setDashed, setDotted, setFill, setPosCoord, setPositionCoordinate, setRotation, setStroke, setTransparency, setWhoAm, updateSettings
-
-
-
-
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
- TextX1
- X positionY1
- Y positionf
- Fontcolor
- Color
-
Text
public Text(java.lang.String text, double X1, double Y1)
Create a TEXT object- Parameters:
text
- TextX1
- X positionY1
- Y position
-
-
Method Detail
-
getFont
public java.awt.Font getFont()
Get the font- Returns:
- font to draw the text
-
setFont
public void setFont(java.awt.Font f)
Set the font for this text.- 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 classjava.lang.Object
- Returns:
- a string representation of this object
-
doc
public void doc()
Show online documentation.
-
-
DMelt 3.0 © DataMelt by jWork.ORG