|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.annotation.AbstractAnnotation com.jidesoft.chart.annotation.AbstractLabel
public abstract class AbstractLabel
A superclass of labels that can be added to a Chart.
The default font is taken from UIManager's Chart.font key value.
The default color is taken from UIManager's Chart.foreground key value
Constructor Summary | |
---|---|
AbstractLabel()
Construct a label with no text (i.e., the empty string), default color and default font |
|
AbstractLabel(String label)
|
|
AbstractLabel(String label,
Color color)
|
|
AbstractLabel(String label,
Color color,
Font font)
|
|
AbstractLabel(String label,
LabelStyle labelStyle)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Color |
getColor()
|
Font |
getFont()
|
String |
getLabel()
|
protected JLabel |
getLabelComponent()
|
LabelStyle |
getLabelStyle()
|
Double |
getRotation()
|
int |
hashCode()
|
void |
paint(Graphics g,
int x,
int y,
double rotation)
|
void |
paint(Graphics g,
int x,
int y,
Rotation rotation)
|
void |
setColor(Color color)
|
void |
setFont(Font font)
|
void |
setLabel(String label)
|
void |
setLabelStyle(LabelStyle labelStyle)
|
void |
setRotation(Double rotation)
Set the rotation of the label in radians, relative to the normal horizontal position; for example Math.PI/2 = 90 degrees clockwise -Math.PI/2 = 90 degrees anticlockwise Math.PI/4 = 45 degrees clockwise -Math.PI/4 = 45 degrees anticlockwise |
Dimension |
size(Graphics g,
Font f)
This method assumes that the font to be used for the label has already been set on the graphics context. |
String |
toString()
|
Methods inherited from class com.jidesoft.chart.annotation.AbstractAnnotation |
---|
getZOrder, setZOrder |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractLabel()
public AbstractLabel(String label)
public AbstractLabel(String label, Color color)
public AbstractLabel(String label, Color color, Font font)
public AbstractLabel(String label, LabelStyle labelStyle)
Method Detail |
---|
public String getLabel()
public void setLabel(String label)
protected JLabel getLabelComponent()
public Color getColor()
public void setColor(Color color)
public Font getFont()
public void setFont(Font font)
public Double getRotation()
public void setRotation(Double rotation)
rotation
- the radians to rotate; positive values rotate clockwise, negative values anticlockwisepublic LabelStyle getLabelStyle()
public void setLabelStyle(LabelStyle labelStyle)
public Dimension size(Graphics g, Font f)
g
- - the graphics context for which the size is to be calculated
public void paint(Graphics g, int x, int y, Rotation rotation)
public void paint(Graphics g, int x, int y, double rotation)
g
- the Graphics object onto which the method drawsx
- the x coordinate of the centre of the labely
- the y coordinate of the centre of the labelrotation
- in radianspublic int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |