|
Chart FX 7 for Java Server | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwarefx.chartfx.server.CustomLegendItem
public class CustomLegendItem
Provides access to the customization features for a particular CustomLegendItem.
A CustomLegendItem is an additional item added to the legend of a chart that contains relevant information to explain what is being depicted in a chart.
The CustomLegendItem fills the void when the series legend and values cannot convey the desired information. The supported members of the CustomLegendItem allow you to configure and add extra legend items to the standard legend box.
The CustomLegendItem needs to be created and added to the chart, as shown in the following example:
CustomLegendItem c = new CustomLegendItem();
c.setText("Custom Legend Item");
c.setMarkerShape(MarkerShape.MARBLE);
c.setColor(java.awt.Color.ORANGE);
chart1.getLegendBox().getCustomItems().add(c);
Constructor Summary | |
---|---|
CustomLegendItem()
|
Method Summary | |
---|---|
Color |
getAlternateColor()
Gets the AlternateColor. |
PointAttributes |
getAttributes()
Gets the Attributes. |
BorderAttributes |
getBorder()
Gets a BorderAttributes object allowing you to modify the border properties for this CustomLegendItem. |
Color |
getColor()
Gets the Color. |
Link |
getLink()
Gets the Link object allowing you to associate a url to a CustomLegendItem. |
MarkerShape |
getMarkerShape()
Gets the MarkerShape. |
HatchStyle |
getPattern()
Gets the Pattern. |
Image |
getPicture()
Gets the Picture. |
String |
getText()
Gets the Text. |
boolean |
isShowLine()
Gets the ShowLine. |
void |
setAlternateColor(Color value)
Sets the background color of a custom legend item marker when a pattern is configured using the Pattern property. |
void |
setAttributes(PointAttributes value)
Sets the PointAttributes object for the custom legend item. |
void |
setColor(Color value)
Sets the Color for the marker of the Custom Legend Item. |
void |
setMarkerShape(MarkerShape value)
Represents the shape of the marker. |
void |
setPattern(HatchStyle value)
Sets a HatchStyle pattern for the marker of a CustomLegendItem. |
void |
setPicture(Image value)
Sets an image to be used as a marker for a CustomLegendItem. |
void |
setShowLine(boolean value)
Sets a value used to display a line marker for a CustomLegendItem. |
void |
setText(String value)
Sets the text string of the custom legend item. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CustomLegendItem()
Method Detail |
---|
public Color getAlternateColor()
Gets the AlternateColor. For more detail see setAlternateColor(java.awt.Color)
.
public PointAttributes getAttributes()
Gets the Attributes. For more detail see setAttributes(com.softwarefx.chartfx.server.PointAttributes)
.
public BorderAttributes getBorder()
Gets a BorderAttributes object allowing you to modify the border properties for this CustomLegendItem.
Below, the border color for the custom legend item is set to Black:
setColor(java.awt.Color)
,
getLink()
,
setPicture(java.awt.Image)
,
setText(java.lang.String)
,
BorderAttributes
public Color getColor()
Gets the Color. For more detail see setColor(java.awt.Color)
.
public Link getLink()
Gets the Link
object allowing you to associate a url to a CustomLegendItem.
Developers may obtain the Link object for a PointAttributes item using this property. Using the supported Link
Class
members, developers may configure a Link.setUrl(java.lang.String)
and Link.setTarget(java.lang.String)
for the object.
Link
public MarkerShape getMarkerShape()
Gets the MarkerShape. For more detail see setMarkerShape(com.softwarefx.chartfx.server.MarkerShape)
.
public HatchStyle getPattern()
Gets the Pattern. For more detail see setPattern(com.softwarefx.HatchStyle)
.
public Image getPicture()
Gets the Picture. For more detail see setPicture(java.awt.Image)
.
public String getText()
Gets the Text. For more detail see setText(java.lang.String)
.
public boolean isShowLine()
Gets the ShowLine. For more detail see setShowLine(boolean)
.
public void setAlternateColor(Color value)
Sets the background color of a custom legend item marker when a pattern is configured using the Pattern property.
The forecolor of the pattern is configured using the setColor(java.awt.Color)
property.
Named colors are supported (e.g. Red), to use Hex notation you have to use quotes (e.g. "#FF00FF").
For more information regarding the Color type, please refer to the Java API Documentation.
setColor(java.awt.Color)
,
setMarkerShape(com.softwarefx.chartfx.server.MarkerShape)
public void setAttributes(PointAttributes value)
Sets the PointAttributes object for the custom legend item.
The Attributes property is used to obtain the PointAttributes
object for a CustomLegendItem. This allows the developer to apply unique visual attributes for the legend item.
Please see the the PointAttributes
Class
for additional information regarding the supported members.
SeriesAttributes
,
PointAttributes
public void setColor(Color value)
Sets the Color for the marker of the Custom Legend Item.
Named colors are supported (e.g. Red), to use Hex notation you have to use quotes (e.g. "#FF00FF").
For more information regarding the Color type, please refer to the Java API Documentation.
public void setMarkerShape(MarkerShape value)
Represents the shape of the marker.
If you hide the markers using the MarkerShape.NONE property, labels will be numbered.
The MarkerShape BorderAttributes may be configured by accessing the getBorder()
property.
setPicture(java.awt.Image)
,
setPattern(com.softwarefx.HatchStyle)
public void setPattern(HatchStyle value)
Sets a HatchStyle pattern for the marker of a CustomLegendItem.
The forecolor of the pattern is configured using the setColor(java.awt.Color)
property. The background color of the pattern is configured using the setAlternateColor(java.awt.Color)
property.
These are the supported styles:
Horizontal
Min
Vertical
ForwardDiagonal
BackwardDiagonal
Cross
LargeGrid
Max
DiagonalCross
Percent05
Percent10
Percent20
Percent25
Percent30
Percent40
Percent50
Percent60
Percent70
Percent75
Percent80
Percent90
LightDownwardDiagonal
LightUpwardDiagonal
DarkDownwardDiagonal
DarkUpwardDiagonal
WideDownwardDiagonal
WideUpwardDiagonal
LightVertical
LightHorizontal
NarrowVertical
NarrowHorizontal
DarkVertical
DarkHorizontal
DashedDownwardDiagonal
DashedUpwardDiagonal
DashedHorizontal
DashedVertical
SmallConfetti
LargeConfetti
ZigZag
Wave
DiagonalBrick
HorizontalBrick
Weave
Plaid
Divot
DottedGrid
DottedDiamond
Shingle
Trellis
Sphere
SmallGrid
SmallCheckerBoard
LargeCheckerBoard
OutlinedDiamond
SolidDiamond
See HatchStyle in the Java API .
setPicture(java.awt.Image)
,
setMarkerShape(com.softwarefx.chartfx.server.MarkerShape)
public void setPicture(Image value)
Sets an image to be used as a marker for a CustomLegendItem.
Setting this property will override any settings configured using the setMarkerShape(com.softwarefx.chartfx.server.MarkerShape)
property.
setPattern(com.softwarefx.HatchStyle)
,
setMarkerShape(com.softwarefx.chartfx.server.MarkerShape)
,
PointAttributes.setPicture(java.awt.Image)
public void setShowLine(boolean value)
Sets a value used to display a line marker for a CustomLegendItem.
The setMarkerShape(com.softwarefx.chartfx.server.MarkerShape)
property may be used in combination with this property to display a different marker shape.
Below, the ShowLine property from the custom legend item is set to true:
setMarkerShape(com.softwarefx.chartfx.server.MarkerShape)
public void setText(String value)
Sets the text string of the custom legend item.
The Text property of the LegendBox
object is used to access the CustomLegendItemCollection object of a chart. By accessing a CustomLegendItem from the collection, you can modify the text of the item using this property.
The LegendItemAttributes.setTextColor(java.awt.Color)
property is used to control the color for a legend's text.
LegendItemAttributes.setTextColor(java.awt.Color)
,
LegendBox
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |