Package quadbase.ChartAPI
Class TextString
java.lang.Object
quadbase.ChartAPI.TextString
- All Implemented Interfaces:
Cloneable,IText,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:
-
Constructor Summary
ConstructorsConstructorDescriptionTextString(String text, Font font, Color color, int angle, float xratio, float yratio) Create a new TextString object -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanReturns true if the given object equals this one.final intgetAngle()Get the text anglefinal ColorgetColor()Get the text colorfinal FontgetFont()Get the text fontGet the offsetGet the text positiongetText()Deprecated.getValue()Get the text string valuefloatDeprecated.floatDeprecated.final voidsetAngle(int angle) Set the text angle in degree measured anticlockwisefinal voidSet the text colorfinal voidSet the text fontvoidSet the offsetvoidsetPosition(Position pos) Set the text positionvoidDeprecated.voidSet the text string valuevoidsetxratio(float xratio) Deprecated.voidsetyratio(float yratio) Deprecated.
-
Constructor Details
-
TextString
Create a new TextString object- Parameters:
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
-
-
Method Details
-
getText
Deprecated.Get the text string -
setText
Deprecated.Set the text string -
getxratio
Deprecated.Get the x ratio -
getyratio
Deprecated.Get the y ratio -
setxratio
Deprecated.Set the x ratio -
setyratio
Deprecated.Set the y ratio -
getValue
Get the text string value- Specified by:
getValuein interfaceITextString- Returns:
- The value of the string as a String object.
-
setValue
Set the text string value- Specified by:
setValuein interfaceITextString- Parameters:
value- The string value to set.
-
getOffset
Get the offset- Specified by:
getOffsetin interfaceITextString- Returns:
- The offset as a Dimension object.
-
setOffset
Set the offset- Specified by:
setOffsetin interfaceITextString- Parameters:
offset- The Dimension object containing the horizontal and vertical offsets.
-
getPosition
Get the text position- Specified by:
getPositionin interfaceITextString- Returns:
- The position object containing the x and y coordinates.
-
setPosition
Set the text position- Specified by:
setPositionin interfaceITextString- Parameters:
pos- The position object.Note that the x and y values in the position object should be between 0 and 1.
- See Also:
-
getColor
Get the text color -
setColor
Set the text color -
getFont
Get the text font -
setFont
Set the text font -
getAngle
public final int getAngle()Get the text angle -
setAngle
public final void setAngle(int angle) Set the text angle in degree measured anticlockwise -
equals
Description copied from interface:ITextStringReturns true if the given object equals this one.- Specified by:
equalsin interfaceITextString- Overrides:
equalsin classObject- Parameters:
textString- an object of type ITextString- Returns:
- true if the given ITextString object is identical to this object, false otherwise.
-