|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.annotation.AbstractAnnotation
com.ijchart.xychart.annotation.AbstractTextAnnotation
public abstract class AbstractTextAnnotation
Title: IJChart
A base class for text annotations.Description: a chart library for the Java(tm) platform.
Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static java.awt.Font |
DEFAULT_FONT
The default font. |
static java.awt.Paint |
DEFAULT_PAINT
The default paint. |
static double |
DEFAULT_ROTATION_ANGLE
The default rotation angle. |
static TextDirection |
DEFAULT_TEXT_DIRECTION
The default text direction. |
static HorizontalAlignment |
DEFAULT_TEXT_HORIZONTAL_ALIGNMENT
The default text horizontal alignment. |
static TextPosition |
DEFAULT_TEXT_POSITION
The default text position. |
static VerticalAlignment |
DEFAULT_TEXT_VERTICAL_ALIGNMENT
The default text vertical alignment. |
Constructor Summary | |
---|---|
protected |
AbstractTextAnnotation(java.lang.String text)
Constructor. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
double |
getRotationAngle()
Returns the rotation angle in radians. |
java.lang.String |
getText()
Returns the text. |
TextDirection |
getTextDirection()
Returns the text direction. |
java.awt.Font |
getTextFont()
Returns the text font. |
HorizontalAlignment |
getTextHorizontalAlign()
Returns the text horizontal alignment. |
java.awt.Paint |
getTextPaint()
Get the text Paint. |
TextPosition |
getTextPosition()
Returns the text position. |
VerticalAlignment |
getTextVerticalAlign()
Returns the text vertical alignment. |
int |
hashCode()
Returns a hash code value for the object. |
protected TextAnchor |
horizontalAlignToAnchor(HorizontalAlignment align)
Convert horizontal to anchor. |
void |
setRotationAngle(double angle)
Sets the rotation angle in radians and sends a AnnotationChangeEvent to all registered listeners. |
void |
setText(java.lang.String text)
Sets the text and sends an AnnotationChangeEvent to all registered listeners. |
void |
setTextDirection(TextDirection direction)
Sets the text direction and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTextFont(java.awt.Font font)
Sets the text font and sends a AnnotationChangeEvent to all registered listeners. |
void |
setTextHorizontalAlign(HorizontalAlignment horizontalAlign)
Sets the text horizontal alignment and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTextPaint(java.awt.Paint paint)
Sets the text Paint and sends a AnnotationChangeEvent to all registered listeners. |
void |
setTextPosition(TextPosition position)
Sets the text position and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTextVerticalAlign(VerticalAlignment verticalAlign)
Sets the text vertical alignment and sends a ChartShapeChangeEvent to all registered listeners. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class com.ijchart.xychart.annotation.AbstractAnnotation |
---|
addChangeListener, annotationChanged, fireAnnotationChanged, getTooltipText, hasListener, notifyListeners, removeAllChangeListener, removeChangeListener, setTooltipText |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Font DEFAULT_FONT
public static final java.awt.Paint DEFAULT_PAINT
public static final double DEFAULT_ROTATION_ANGLE
public static final HorizontalAlignment DEFAULT_TEXT_HORIZONTAL_ALIGNMENT
public static final VerticalAlignment DEFAULT_TEXT_VERTICAL_ALIGNMENT
public static final TextPosition DEFAULT_TEXT_POSITION
public static final TextDirection DEFAULT_TEXT_DIRECTION
Constructor Detail |
---|
protected AbstractTextAnnotation(java.lang.String text)
text
-
The text (null not permitted).Method Detail |
---|
public java.lang.String getText()
public void setText(java.lang.String text)
AnnotationChangeEvent
to all registered listeners.
text
- String
The text (null not permitted).public java.awt.Font getTextFont()
public void setTextFont(java.awt.Font font)
AnnotationChangeEvent
to all registered listeners.
font
- Font
The text font (null not permitted).public java.awt.Paint getTextPaint()
public void setTextPaint(java.awt.Paint paint)
AnnotationChangeEvent
to all registered listeners.
paint
- Paint
The text Paint(null not permitted).public double getRotationAngle()
public void setRotationAngle(double angle)
AnnotationChangeEvent
to all registered listeners.
angle
-
The angle (in radians).public HorizontalAlignment getTextHorizontalAlign()
public void setTextHorizontalAlign(HorizontalAlignment horizontalAlign)
ChartShapeChangeEvent
to all registered listeners.
horizontalAlign
- HorizontalAlignment
The text horizontal alignment (null not permitted).public VerticalAlignment getTextVerticalAlign()
public void setTextVerticalAlign(VerticalAlignment verticalAlign)
ChartShapeChangeEvent
to all registered listeners.
verticalAlign
- VerticalAlignment
The text vertical alignment (null not permitted).public void setTextPosition(TextPosition position)
ChartShapeChangeEvent
to all registered listeners.
position
- TextPosition
The text position (null not permitted).public TextPosition getTextPosition()
public TextDirection getTextDirection()
public void setTextDirection(TextDirection direction)
ChartShapeChangeEvent
to all registered listeners.
direction
- TextDirection
The text direction (null not permitted).protected TextAnchor horizontalAlignToAnchor(HorizontalAlignment align)
align
- HorizontalAlignment
public int hashCode()
hashCode
in class AbstractAnnotation
public boolean equals(java.lang.Object obj)
equals
in class AbstractAnnotation
obj
-
the reference object with which to compare.
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractAnnotation
java.lang.CloneNotSupportedException
- if the object's class does not
support the Cloneable interface. Subclasses
that override the clone method can also
throw this exception to indicate that an instance cannot
be cloned.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |