EspressReport 6.6

quadbase.ChartAPI.swing
Class TextString

java.lang.Object
  extended by quadbase.ChartAPI.swing.TextString
All Implemented Interfaces:
java.lang.Cloneable, IText, ITextString

public class TextString
extends java.lang.Object
implements ITextString

TextString

This class provides a simple implementation of the quadbase.util.ITextString interface. This is used to specify floating text in a chart component.

See Also:
ITextString, IFloatingTextSet

Constructor Summary
TextString(java.lang.String text, java.awt.Font font, java.awt.Color color, int angle, float xratio, float yratio)
          Create a new TextString object
 
Method Summary
 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.  
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextString

public TextString(java.lang.String text,
                  java.awt.Font font,
                  java.awt.Color color,
                  int angle,
                  float xratio,
                  float yratio)
Create a new TextString object

Parameters:
text - text string
font - font size
color - text color
angle - text angle in degrees, measured anticlockwise
xratio - x postion of text ralative to window width, from 0 to 1
yratio - y postion of text ralative to window width, from 0 to 1
Method Detail

getText

@Deprecated
public java.lang.String getText()
Deprecated. 

Get the text string


setText

@Deprecated
public void setText(java.lang.String s)
Deprecated. 

Set the text string


getxratio

@Deprecated
public float getxratio()
Deprecated. 

Get the x ratio


getyratio

@Deprecated
public float getyratio()
Deprecated. 

Get the y ratio


setxratio

@Deprecated
public void setxratio(float xratio)
Deprecated. 

Set the x ratio


setyratio

@Deprecated
public void setyratio(float yratio)
Deprecated. 

Set the y ratio


getValue

public java.lang.String getValue()
Get the text string value

Specified by:
getValue in interface ITextString
Returns:
The value of the string as a String object.

setValue

public void setValue(java.lang.String value)
Set the text string value

Specified by:
setValue in interface ITextString
Parameters:
value - The string value to set.

getOffset

public java.awt.Dimension getOffset()
Get the offset

Specified by:
getOffset in interface ITextString
Returns:
The offset as a Dimension object.

setOffset

public void setOffset(java.awt.Dimension offset)
Set the offset

Specified by:
setOffset in interface ITextString
Parameters:
offset - The Dimension object containing the horizontal and vertical offsets.

getPosition

public Position getPosition()
Get the text position

Specified by:
getPosition in interface ITextString
Returns:
The position object containing the x and y coordinates.

setPosition

public void setPosition(Position pos)
Set the text position

Specified by:
setPosition in interface ITextString
Parameters:
pos - The position object.
 Note that the x and y values in the position object should be
 between 0 and 1.
 
See Also:
Position

getColor

public final java.awt.Color getColor()
Get the text color

Specified by:
getColor in interface IText
Returns:
The Color object containing the RGB color values for the text.

setColor

public final void setColor(java.awt.Color c)
Set the text color

Specified by:
setColor in interface IText
Parameters:
c - The Color object.

getFont

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

Specified by:
getFont in interface IText
Returns:
The Font object containing the text string font information.

setFont

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

Specified by:
setFont in interface IText
Parameters:
f - The input Font object.

getAngle

public final int getAngle()
Get the text angle

Specified by:
getAngle in interface IText
Returns:
The counterclockwise angle of the text string, in degrees.

setAngle

public final void setAngle(int angle)
Set the text angle in degree measured anticlockwise

Specified by:
setAngle in interface IText
Parameters:
angle - The angle, in degrees, of the text string.

equals

public final boolean equals(java.lang.Object textString)
Description copied from interface: ITextString
Returns true if the given object equals this one.

Specified by:
equals in interface ITextString
Overrides:
equals in class java.lang.Object
Parameters:
textString - an object of type ITextString
Returns:
true if the given ITextString object is identical to this object, false otherwise.

EspressReport 6.6