|
![]() |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.droplets.api.GraphAnnotation
Construct and add to a GraphPanel to annotate the graph. Draws lines specified style and thickness with hints.
Field Summary | |
static int |
ORIENT_HORIZONTAL
specifies that the line is horizontal |
static int |
ORIENT_VERTICAL
specifies that the line is vertical |
static int |
STYLE_DASHED
The line should be dashed |
static int |
STYLE_SOLID
The line should be solid |
static int |
UNITS_AXIS
The thickness of the line is based on the units of the axis |
static int |
UNITS_PIXELS
The thickness of the line is given in pixels |
Constructor Summary | |
GraphAnnotation(int orientation,
IGraph g)
Makes an annotation for the graph which is represented as either a vertical or horizontal line with a specified style, thickness, hint, and position |
|
GraphAnnotation(int orientation,
Window w)
Makes an annotation for the graph which is represented as either a vertical or horizontal line with a specified style, thickness, hint, and position |
Method Summary | |
Color |
getColor()
Get the color of the annotation |
java.lang.String |
getLegendText()
Gets the legend text for this annotation |
double |
getPosition()
Gets the position of the annotation on the graph. |
int |
getStyle()
Gets the style of the line to either STYLE_SOLID or STYLE_DASHED |
double |
getThickness()
Gets the thickness of the annotation. |
int |
getThicknessUnits()
Gets the thickness units of the annotation. |
void |
setColor(Color c)
Set the color of the annotation |
void |
setColor(Color c,
java.lang.String skinName)
Set the color of the annotation |
void |
setLegendText(java.lang.String t)
Sets the legend text for this annotation |
void |
setLegendText(java.lang.String t,
java.lang.String skinName)
Sets the legend text for this annotation |
void |
setPosition(double p)
Sets the position of the annotation on the graph. |
void |
setPosition(double p,
java.lang.String skinName)
Sets the position of the annotation on the graph. |
void |
setStyle(int style)
Sets the style of the line to either STYLE_SOLID or STYLE_DASHED |
void |
setStyle(int style,
java.lang.String skinName)
Sets the style of the line to either STYLE_SOLID or STYLE_DASHED |
void |
setThickness(double t)
Sets the thickness of the annotation. |
void |
setThickness(double t,
java.lang.String skinName)
Sets the thickness of the annotation. |
void |
setThicknessUnits(int u)
Sets the thickness units of the annotation. |
void |
setThicknessUnits(int u,
java.lang.String skinName)
Sets the thickness units of the annotation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int STYLE_SOLID
public static final int STYLE_DASHED
public static final int UNITS_PIXELS
public static final int UNITS_AXIS
public static final int ORIENT_VERTICAL
public static final int ORIENT_HORIZONTAL
Constructor Detail |
public GraphAnnotation(int orientation, IGraph g)
orientation
- the orientation of the annotation. Must
be either ORIENT_VERTICAL or ORIENT_HORIZONTALw
- the Window that owns this annotationpublic GraphAnnotation(int orientation, Window w)
orientation
- the orientation of the annotation. Must
be either ORIENT_VERTICAL or ORIENT_HORIZONTALw
- the Window that owns this annotationMethod Detail |
public java.lang.String getLegendText()
public void setLegendText(java.lang.String t, java.lang.String skinName)
t
- the legend text for this annotationskinName
- the skin name for this settingpublic void setLegendText(java.lang.String t)
t
- the tooltip for this annotationpublic Color getColor()
public void setColor(Color c, java.lang.String skinName)
c
- the color of the annotationskinName
- the skin name for this settingpublic void setColor(Color c)
c
- the color of the annotationpublic double getThickness()
setThicknessUnits(int)
public void setThickness(double t, java.lang.String skinName)
t
- the thickness of the annotation in the specified units.skinName
- the skin name for this settingsetThicknessUnits(int)
public void setThickness(double t)
t
- the thickness of the annotation in the specified units.setThicknessUnits(int)
public int getThicknessUnits()
setThicknessUnits(int)
public void setThicknessUnits(int u, java.lang.String skinName)
u
- the thickness units of the annotationskinName
- the skin name for this settingsetThicknessUnits(int)
public void setThicknessUnits(int u)
u
- the thickness units of the annotationsetThickness(double)
public double getPosition()
skinName
- the skin name for this settingpublic void setPosition(double p, java.lang.String skinName)
p
- the position of the annotationskinName
- the skin name for this settingpublic void setPosition(double p)
p
- the position of the annotationpublic int getStyle()
public void setStyle(int style, java.lang.String skinName)
style
- the style of the line. Either STYLE_SOLID or STYLE_DASHEDskinName
- the skin name for this settingpublic void setStyle(int style)
style
- the style of the line. Either STYLE_SOLID or STYLE_DASHED
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |