|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.swtchart.internal.series.SeriesLabel
public class SeriesLabel
A series label.
Field Summary | |
---|---|
protected Color |
color
the series label color |
protected Font |
font
the series label font |
Constructor Summary | |
---|---|
SeriesLabel()
Constructor. |
Method Summary | |
---|---|
protected void |
draw(GC gc,
int h,
int v,
double ySeriesValue,
int seriesIndex,
int alignment)
Draws series label. |
Font |
getFont()
Gets the label font. |
Color |
getForeground()
Gets the label color. |
java.lang.String |
getFormat()
Gets the format for label. |
java.lang.String[] |
getFormats()
Gets the formats for all data points. |
boolean |
isVisible()
Gets the label visibility state. |
void |
setFont(Font font)
Sets the label font. |
void |
setForeground(Color color)
Sets the label color. |
void |
setFormat(java.lang.String format)
Sets the decimal format DecimalFormat or/plus plain string. |
void |
setFormats(java.lang.String[] formats)
Sets the formats for all data points. |
void |
setVisible(boolean visible)
Sets the label visibility state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Font font
protected Color color
Constructor Detail |
---|
public SeriesLabel()
Method Detail |
---|
public java.lang.String getFormat()
ISeriesLabel
getFormat
in interface ISeriesLabel
public void setFormat(java.lang.String format)
ISeriesLabel
DecimalFormat
or/plus plain string.
If formats have been set with setFormats(String[]), the format set with this method will be ignored.
If null is given, default format "#.###########" will be set.
setFormat
in interface ISeriesLabel
format
- the formatpublic java.lang.String[] getFormats()
ISeriesLabel
getFormats
in interface ISeriesLabel
public void setFormats(java.lang.String[] formats)
ISeriesLabel
setFormats
in interface ISeriesLabel
formats
- the formatspublic Color getForeground()
ISeriesLabel
getForeground
in interface ISeriesLabel
public void setForeground(Color color)
ISeriesLabel
setForeground
in interface ISeriesLabel
color
- the label colorpublic Font getFont()
ISeriesLabel
getFont
in interface ISeriesLabel
public void setFont(Font font)
ISeriesLabel
setFont
in interface ISeriesLabel
font
- the label fontpublic boolean isVisible()
ISeriesLabel
isVisible
in interface ISeriesLabel
public void setVisible(boolean visible)
ISeriesLabel
setVisible
in interface ISeriesLabel
visible
- the label visibility stateprotected void draw(GC gc, int h, int v, double ySeriesValue, int seriesIndex, int alignment)
gc
- the GC objecth
- the horizontal coordinate to draw labelv
- the vertical coordinate to draw labelySeriesValue
- the Y series valueseriesIndex
- the series indexalignment
- the alignment of label position (SWT.CENTER or SWT.BOTTOM)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |