|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.inet.report.chart.Legend
public class Legend
The class responsible for the settings of the chart's legend.
| Field Summary | |
|---|---|
static java.awt.Font |
DEFAULT_FONT
Default legend font. |
static int |
DEFAULT_LABEL_COLOR
Default legend color. |
static int |
DEFAULT_LEGEND_OUTLINE_COLOR
Default legend outline color. |
static java.lang.String |
TOKEN_LEGEND
XML token for legend element. |
| Constructor Summary | |
|---|---|
Legend()
Creates a legend with default properties. |
|
| Method Summary | |
|---|---|
int |
getBackColor()
Returns the ABGR value representing the background color. |
int |
getLegendColor()
Returns the ABGR value representing the legend color. |
java.awt.Font |
getLegendFont()
Returns the font for all labels in this legend. |
LegendPlacement |
getLegendPlacement()
Returns the placement of the legend in the chart. |
int |
getOutlineColor()
Returns the ABGR value representing the legend's outline's color. |
int |
getOutlineStyle()
Returns the legend's outline's style. |
int |
getOutlineWidth()
Returns the width of the legend's outline in twips. |
boolean |
isDrawOutline()
Returns whether or not to draw the outline of legend. |
void |
readProperties(org.w3c.dom.Element element)
Loads the properties of a chart legend from an XML element. |
void |
saveProperties(java.io.PrintWriter out,
int depth)
Writes the properties of this legend to PrintWriter as XML. |
void |
setBackColor(int backgroundColor)
Sets the ABGR value representing the legend's background color. |
void |
setDrawOutline(boolean drawOutline)
Sets whether or not to draw the outline of legend. |
void |
setLegendColor(int legendColor)
Sets the ABGR value representing the legend color. |
void |
setLegendFont(java.awt.Font legendFont)
Sets the font for all labels in this legend. |
void |
setLegendPlacement(LegendPlacement legendPlacement)
Sets a placement of the legend in the chart. |
void |
setOutlineColor(int outlineColor)
Sets the ABGR components of the legend's outline's color. |
void |
setOutlineStyle(int outlineStyle)
Sets the style of the legend's outline. |
void |
setOutlineWidth(int outlineWidth)
Sets the width of the legend's outline in twips. |
| Field Detail |
|---|
public static final java.awt.Font DEFAULT_FONT
public static final int DEFAULT_LABEL_COLOR
public static final int DEFAULT_LEGEND_OUTLINE_COLOR
public static final java.lang.String TOKEN_LEGEND
| Constructor Detail |
|---|
public Legend()
| Method Detail |
|---|
public boolean isDrawOutline()
true the outline is to be drawn.public void setDrawOutline(boolean drawOutline)
drawOutline - true if outline is to be drawn.public LegendPlacement getLegendPlacement()
setLegendPlacement(LegendPlacement),
LegendPlacementpublic void setLegendPlacement(LegendPlacement legendPlacement)
LegendPlacement.NONE.
legendPlacement - the placement object (null not permitted)
java.lang.IllegalArgumentException - if the legend placement is null.public java.awt.Font getLegendFont()
setLegendFont(Font)public void setLegendFont(java.awt.Font legendFont)
legendFont - the legend font (null not permitted)getLegendFont()public int getLegendColor()
RDC.toJavaColor(int),
setLegendColor(int)public void setLegendColor(int legendColor)
legendColor - ABGR components of the legend color - may not be RDC.COLOR_NO_COLOR
java.lang.IllegalArgumentException - if the color is RDC.COLOR_NO_COLOR.RDC.toCcColor(Color),
getLegendColor()public int getBackColor()
setBackColor(int),
RDC.toJavaColor(int)public void setBackColor(int backgroundColor)
backgroundColor - a background colorgetBackColor(),
RDC.toCcColor(Color)public int getOutlineColor()
setOutlineColor(int),
RDC.toJavaColor(int)public void setOutlineColor(int outlineColor)
outlineColor - the color of the legend's outline, may not be RDC.COLOR_NO_COLOR
java.lang.IllegalArgumentException - if the color is RDC.COLOR_NO_COLOR.getOutlineColor(),
RDC.toCcColor(Color),
DEFAULT_LEGEND_OUTLINE_COLORpublic int getOutlineStyle()
setOutlineStyle(int),
BorderProperties.NO_LINE,
BorderProperties.LINE_STYLE_SINGLE,
BorderProperties.LINE_STYLE_DASHED,
BorderProperties.LINE_STYLE_DOTTEDpublic void setOutlineStyle(int outlineStyle)
outlineStyle - the legend's outline's style
java.lang.IllegalArgumentException - if an unsupported line style is passed.getOutlineStyle(),
BorderProperties.NO_LINE,
BorderProperties.LINE_STYLE_SINGLE,
BorderProperties.LINE_STYLE_DASHED,
BorderProperties.LINE_STYLE_DOTTEDpublic int getOutlineWidth()
setOutlineWidth(int)public void setOutlineWidth(int outlineWidth)
outlineWidth - the width of the legend's outline
java.lang.IllegalArgumentException - if the width is less than 1.getOutlineWidth()
public void saveProperties(java.io.PrintWriter out,
int depth)
PrintWriter as XML.
out - the output stream to write todepth - the depth of XML indent to prefix each line withpublic void readProperties(org.w3c.dom.Element element)
element - DOM element
|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||