public class TextString extends java.lang.Object implements ITextString
This class provides a simple implementation of the quadbase.util.ITextString interface. This is used to specify floating text in a chart component.
ITextString,
IFloatingTextSet| Constructor and Description |
|---|
TextString(java.lang.String text,
java.awt.Font font,
java.awt.Color color,
int angle,
float xratio,
float yratio)
Create a new TextString object
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object textString)
Returns true if the given object equals this one.
|
int |
getAngle()
Get the text angle
|
java.awt.Color |
getColor()
Get the text color
|
java.awt.Font |
getFont()
Get the text font
|
java.awt.Dimension |
getOffset()
Get the offset
|
Position |
getPosition()
Get the text position
|
java.lang.String |
getText()
Deprecated.
|
java.lang.String |
getValue()
Get the text string value
|
float |
getxratio()
Deprecated.
|
float |
getyratio()
Deprecated.
|
void |
setAngle(int angle)
Set the text angle in degree measured anticlockwise
|
void |
setColor(java.awt.Color c)
Set the text color
|
void |
setFont(java.awt.Font f)
Set the text font
|
void |
setOffset(java.awt.Dimension offset)
Set the offset
|
void |
setPosition(Position pos)
Set the text position
|
void |
setText(java.lang.String s)
Deprecated.
|
void |
setValue(java.lang.String value)
Set the text string value
|
void |
setxratio(float xratio)
Deprecated.
|
void |
setyratio(float yratio)
Deprecated.
|
public TextString(java.lang.String text,
java.awt.Font font,
java.awt.Color color,
int angle,
float xratio,
float yratio)
text - text stringfont - font sizecolor - text colorangle - text angle in degrees, measured anticlockwisexratio - x postion of text ralative to window width, from 0 to 1yratio - y postion of text ralative to window width, from 0 to 1@Deprecated public java.lang.String getText()
@Deprecated public void setText(java.lang.String s)
@Deprecated public float getxratio()
@Deprecated public float getyratio()
@Deprecated public void setxratio(float xratio)
@Deprecated public void setyratio(float yratio)
public java.lang.String getValue()
getValue in interface ITextStringpublic void setValue(java.lang.String value)
setValue in interface ITextStringvalue - The string value to set.public java.awt.Dimension getOffset()
getOffset in interface ITextStringpublic void setOffset(java.awt.Dimension offset)
setOffset in interface ITextStringoffset - The Dimension object containing the horizontal and vertical offsets.public Position getPosition()
getPosition in interface ITextStringpublic void setPosition(Position pos)
setPosition in interface ITextStringpos - The position object.
Note that the x and y values in the position object should be between 0 and 1.
Positionpublic final java.awt.Color getColor()
public final void setColor(java.awt.Color c)
public final java.awt.Font getFont()
public final void setFont(java.awt.Font f)
public final int getAngle()
public final void setAngle(int angle)
public final boolean equals(java.lang.Object textString)
ITextStringequals in interface ITextStringequals in class java.lang.ObjecttextString - an object of type ITextString