|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.UserLegendBoxItem
public final class UserLegendBoxItem
Provides access to the UserLegendBoxItem object.
This Base
Class
is not intended to be used directly by the programmer, however, derived classes of the UserLegendBoxItem can be used for user legend box customization. For example, the UserLegendBox
Class
is derived from the UserLegendBoxItem and its members accessible through the use of the UserLegendBox.getItem(int)
property.
The UserLegendBoxItem Class members allow you to create each key that will exist in a user legend box as well as assign attributes to each one.
Constructor Summary | |
---|---|
UserLegendBoxItem()
|
Method Summary | |
---|---|
java.awt.Color |
getAlternateColor()
Gets the AlternateColor. |
PointAttributes |
getAttributes()
Gets the Attributes. |
Line |
getBorder()
Deprecated. You should use getAttributes() instead. |
java.awt.Color |
getBorderColor()
Gets the BorderColor. |
int |
getBorderEffect()
Gets the BorderEffect. |
short |
getBorderWidth()
Gets the BorderWidth. |
java.awt.Color |
getColor()
Gets the Color. |
java.lang.String |
getKeyLabel()
Gets the KeyLabel. |
java.lang.String |
getLabel()
Gets the Label. |
Link |
getLink()
Gets the Link object for a selected UserLegendBoxItem. |
int |
getMarkerShape()
Gets the MarkerShape. |
int |
getPattern()
Gets the Pattern. |
java.awt.Image |
getPicture()
Gets the Picture. |
boolean |
isShowLine()
Gets the ShowLine. |
void |
setAlternateColor(java.awt.Color value)
Used to set the background color for a user legend marker when a pattern is configured. |
void |
setAttributes(PointAttributes value)
Gets or sets a PointAttributes object for the selected item. |
void |
setBorder(Line line)
Deprecated. You should use getAttributes() instead. |
void |
setBorderColor(java.awt.Color value)
Gets or sets the border color for a UserLegendBoxItem. |
void |
setBorderEffect(int value)
Specifies the marker border effects for a selected user legend item. |
void |
setBorderWidth(short value)
Gets or sets the width for the UserLegendBoxItem border. |
void |
setColor(java.awt.Color value)
Sets a color for the selected user legend box marker. |
void |
setKeyLabel(java.lang.String value)
Allows you to set a short label to be used in the user legend box. |
void |
setLabel(java.lang.String value)
Allows you to set a text string for the selected user legend key. |
void |
setMarkerShape(int value)
Used to specify the point type used to paint markers for the user legend box items. |
void |
setPattern(int value)
Allows you to set a pattern for a selected marker in the user legend. |
void |
setPicture(java.awt.Image value)
Allows you to set an image as the key marker in the user legend. |
void |
setShowLine(boolean value)
Gets or sets a value used to indicate the line marker style for a user legend item. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserLegendBoxItem()
Method Detail |
---|
public java.awt.Color getAlternateColor()
Gets the AlternateColor. For more detail see setAlternateColor(java.awt.Color)
.
public PointAttributes getAttributes()
Gets the Attributes. For more detail see setAttributes(SoftwareFX.ChartFX.PointAttributes)
.
public Line getBorder()
getAttributes()
instead.
PointAttributes
public java.awt.Color getBorderColor()
Gets the BorderColor. For more detail see setBorderColor(java.awt.Color)
.
public int getBorderEffect()
Gets the BorderEffect. For more detail see setBorderEffect(int)
.
public short getBorderWidth()
Gets the BorderWidth. For more detail see setBorderWidth(short)
.
public java.awt.Color getColor()
Gets the Color. For more detail see setColor(java.awt.Color)
.
public java.lang.String getKeyLabel()
Gets the KeyLabel. For more detail see setKeyLabel(java.lang.String)
.
public java.lang.String getLabel()
Gets the Label. For more detail see setLabel(java.lang.String)
.
public Link getLink()
Gets the Link object for a selected UserLegendBoxItem.
Developers may obtain the Link object for a UserLegendBoxItem 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.setUrl(java.lang.String)
,
Link.setTarget(java.lang.String)
,
Link
public int getMarkerShape()
Gets the MarkerShape. For more detail see setMarkerShape(int)
.
public int getPattern()
Gets the Pattern. For more detail see setPattern(int)
.
public java.awt.Image getPicture()
Gets the Picture. For more detail see setPicture(java.awt.Image)
.
public boolean isShowLine()
Gets the ShowLine. For more detail see setShowLine(boolean)
.
public void setAlternateColor(java.awt.Color value)
Used to set the background color for a user legend marker when a pattern is configured.
The forecolor of the pattern is configured using the setColor(java.awt.Color)
property. The background color of the pattern is configured using the AlternateColor property.
The setPattern(int)
property is used to configure the HatchStyle pattern for the marker.
For more information regarding the Color type, please refer to the Java API Documentation.
setColor(java.awt.Color)
,
setPattern(int)
public void setAttributes(PointAttributes value)
Gets or sets a PointAttributes object for the selected item.
This property may be used to get or set a PointAttributes object for a selected UserLegendBoxItem. For more information regarding the supported members, please see the PointAttributes
Class
for more information.
PointAttributes
public void setBorder(Line line)
getAttributes()
instead.
PointAttributes
public void setBorderColor(java.awt.Color value)
Gets or sets the border color for a UserLegendBoxItem.
In order for this property to take effect, you must set the setBorderEffect(int)
to BorderEffect.NONE.
To control the width of the border, please refer to the setBorderWidth(short)
member.
For more information regarding the Color type, please refer to the Java API Documentation.
setBorderEffect(int)
,
setBorderWidth(short)
public void setBorderEffect(int value)
Specifies the marker border effects for a selected user legend item.
BorderEffect :
Specify different border effects that may be applied to a object.Value | Description |
---|---|
BorderEffect.NONE | No border effect is applied. The border effect must be None for the BorderColor property to take effect. |
BorderEffect.RAISED | The border has raised inner and outer edges. |
BorderEffect.LIGHT | Apply light color to the border using the series/points color. |
BorderEffect.DARK | Apply dark color to the border using the series/points color. |
BorderEffect.OPPOSITE | Chooses between dark and light border depending on the object color. If the color is dark Chart FX will choose a light border color. If the color is light Chart FX will choose a dark border color. |
BorderEffect.SHADOW | The border will have shadow. |
The BorderEffect property must be set to BorderEffect.NONE for the setColor(java.awt.Color)
property to have any effect on the selected UserLegendBoxItem border
Use the setColor(java.awt.Color)
property to define the marker color for the user legend box item selected.
The setMarkerShape(int)
property allows you to select a marker shape for a selected user legend item.
setColor(java.awt.Color)
,
setMarkerShape(int)
,
ChartCore.setUserLegendBox(boolean)
,
ChartCore.getUserLegendBoxObj()
,
Chart
,
LegendBox
public void setBorderWidth(short value)
Gets or sets the width for the UserLegendBoxItem border.
To control the color of the border, please refer to the setBorderColor(java.awt.Color)
member.
This setAttributes(SoftwareFX.ChartFX.PointAttributes)
property may be used to get or set a PointAttributes object for a selected UserLegendBoxItem. For more information regarding the supported members, please see the PointAttributes
Class
for more information.
setAttributes(SoftwareFX.ChartFX.PointAttributes)
,
setBorderColor(java.awt.Color)
public void setColor(java.awt.Color value)
Sets a color for the selected user legend box marker.
If no color is specified for a user legend box, no default marker or color will be painted in the user legend box. If you select a color, a marker will be created (default shape: Rect)
You can specify the marker shape for user legend items using the setMarkerShape(int)
property.ChartCore.setBackColor(java.awt.Color)
ChartCore.setInsideColor(java.awt.Color)
A border color may be set using the setColor(java.awt.Color)
property, however, the setBorderEffect(int)
must be set to BorderEffect.NONE.
For more information regarding the Color type, please refer to the Java API Documentation.
setBorderEffect(int)
,
setMarkerShape(int)
,
ChartCore.getUserLegendBoxObj()
,
LegendBox
,
UserLegendBox
public void setKeyLabel(java.lang.String value)
Allows you to set a short label to be used in the user legend box.
The KeyLabel property allows you to specify a small string that will be associated with a corresponding setLabel(java.lang.String)
. When the UserLegendBox.setShowMarkers(boolean)
property is False, the configured key labels are used instead of the marker shapes. This is very useful when you wish to define an abbreviation used in a chart:
SFX: SoftwareFX
Each user legend box item may have one KeyLabel configured.
The LegendBoxBase.setTextColor(java.awt.Color)
property of the UserLegendBox
may be used to set the color of the labels configured.
setLabel(java.lang.String)
,
UserLegendBox.setShowMarkers(boolean)
,
LegendBoxBase.setTextColor(java.awt.Color)
,
LegendBox
,
UserLegendBox
public void setLabel(java.lang.String value)
Allows you to set a text string for the selected user legend key.
The LegendBoxBase.setTextColor(java.awt.Color)
property of the LegendBox
class may be used to set the color of the labels configured.
The setKeyLabel(java.lang.String)
property allows you to specify a small string that will be associated a Label. When the UserLegendBox.setShowMarkers(boolean)
property is False, the configured key labels are used instead of the marker shapes. This is very useful when you wish to define an abbreviation used in a chart:
SFX: SoftwareFX
Markers may be used with the labels in the user legend box. You can use the setMarkerShape(int)
property to set a desired marker shape.ChartCore.setInsideColor(java.awt.Color)
The setColor(java.awt.Color)
property may be used to apply color assignments to the user legend box markers.ChartCore.setPointLabelColor(java.awt.Color)
setColor(java.awt.Color)
,
setKeyLabel(java.lang.String)
,
setMarkerShape(int)
,
UserLegendBox.setShowMarkers(boolean)
,
LegendBoxBase.setTextColor(java.awt.Color)
,
ChartCore.setUserLegendBox(boolean)
,
ChartCore.getUserLegendBoxObj()
,
LegendBox
,
Chart
public void setMarkerShape(int value)
Used to specify the point type used to paint markers for the user legend box items.
MarkerShape :
Defines different shapes used to paint point markers in the chart. Value | Description |
---|---|
MarkerShape.NONE | Do not display point markers. |
MarkerShape.RECT | Displays a rectangle. |
MarkerShape.CIRCLE | Displays a circle. |
MarkerShape.TRIANGLE | Displays a triangle. |
MarkerShape.DIAMOND | Displays a diamond. |
MarkerShape.MARBLE | Displays a 3D marble. |
MarkerShape.HORZ_LINE | Displays a horizontal line. |
MarkerShape.VERT_LINE | Displays a vertical line. |
MarkerShape.CROSS | Displays a cross. |
MarkerShape.INVERTED_TRIANGLE | Displays a rotated triangle. |
MarkerShape.X | Displays an X. |
MarkerShape.MANY | Selects a combination of the above. |
MarkerShape.PICTURE | Displays a configured picture. |
Use the setColor(java.awt.Color)
property to define the color for the selected key legend item marker.
The setLabel(java.lang.String)
property allows you to set text to be associated with the item marker.ChartCore.setPointFont(java.awt.Font)
Borders may be applied to markers using the setColor(java.awt.Color)
property. Be sure to set the setBorderEffect(int)
to None
when assigning a border color.
If you hide the markers using the UserLegendBox.setShowMarkers(boolean)
property, labels will be numbered or using the configured setKeyLabel(java.lang.String)
.
setColor(java.awt.Color)
,
setBorderEffect(int)
,
setColor(java.awt.Color)
,
setLabel(java.lang.String)
,
ChartCore.setUserLegendBox(boolean)
,
UserLegendBox.setShowMarkers(boolean)
,
ChartCore.getUserLegendBoxObj()
,
LegendBox
public void setPattern(int value)
Allows you to set a pattern for a selected marker in the user legend.
HatchStyle :
Specifies the different hatch patterns available.Value | Description |
---|---|
HatchStyle.BACKWARD_DIAGONAL | A pattern of lines on a diagonal from upper right to lower left. |
HatchStyle.CROSS | Specifies horizontal and vertical lines that cross. |
HatchStyle.DARK_DOWNWARD_DIAGONAL | Specifies diagonal lines that slant to the right from top points to bottom points, are spaced 50 percent closer together than, and are twice the width of ForwardDiagonal. This hatch pattern is not antialiased. |
HatchStyle.DARK_HORIZONTAL | Specifies horizontal lines that are spaced 50 percent closer together than Horizontal and are twice the width of HatchStyleHorizontal. |
HatchStyle.DARK_UPWARD_DIAGONAL | Specifies diagonal lines that slant to the left from top points to bottom points, are spaced 50 percent closer together than BackwardDiagonal, and are twice its width, but the lines are not antialiased. |
HatchStyle.DARK_VERTICAL | Specifies vertical lines that are spaced 50 percent closer together than Vertical and are twice its width. |
HatchStyle.DASHED_DOWNWARD_DIAGONAL | Specifies dashed diagonal lines, that slant to the right from top points to bottom points. |
HatchStyle.DASHED_HORIZONTAL | Specifies dashed horizontal lines. |
HatchStyle.DASHED_UPWARD_DIAGONAL | Specifies dashed diagonal lines, that slant to the left from top points to bottom points. |
HatchStyle.DASHED_VERTICAL | Specifies dashed vertical lines. |
HatchStyle.DIAGONAL_BRICK | Specifies a hatch that has the appearance of layered bricks that slant to the left from top points to bottom points. |
HatchStyle.DIAGONAL_CROSS | Specifies forward diagonal and backward diagonal lines that cross. The lines are antialiased. |
HatchStyle.DIVOT | Specifies a hatch that has the appearance of divots. |
HatchStyle.DOTTED_DIAMOND | Specifies forward diagonal and backward diagonal lines, each of which is composed of dots, that cross. |
HatchStyle.DOTTED_GRID | Specifies horizontal and vertical lines, each of which is composed of dots, that cross. |
HatchStyle.FORWARD_DIAGONAL | A pattern of lines on a diagonal from upper left to lower right. |
HatchStyle.HORIZONTAL | A pattern of horizontal lines. |
HatchStyle.HORIZONTAL_BRICK | Specifies a hatch that has the appearance of horizontally layered bricks. |
HatchStyle.LARGE_CHECKER_BOARD | Specifies a hatch that has the appearance of a checkerboard with squares that are twice the size of SmallCheckerBoard. |
HatchStyle.LARGE_CONFETTI | Specifies a hatch that has the appearance of confetti, and is composed of larger pieces than SmallConfetti. |
HatchStyle.LARGE_GRID | Specifies the hatch style Cross. |
HatchStyle.LIGHT_DOWNWARD_DIAGONAL | Specifies diagonal lines that slant to the right from top points to bottom points and are spaced 50 percent closer together than DownwardDiagonal, but they are not antialiased. |
HatchStyle.LIGHT_HORIZONTAL | Specifies horizontal lines that are spaced 50 percent closer together than Horizontal. |
HatchStyle.LIGHT_UPWARD_DIAGONAL | Specifies diagonal lines that slant to the left from top points to bottom points and are spaced 50 percent closer together than BackwardDiagonal, but they are not antialiased. |
HatchStyle.LIGHT_VERTICAL | Specifies vertical lines that are spaced 50 percent closer together than Vertical. |
HatchStyle.MAX | Specifies hatch style SolidDiamond. |
HatchStyle.MIN | Specifies hatch style Horizonal. |
HatchStyle.NARROW_HORIZONTAL | Specifies horizontal lines that are spaced 75 percent closer together than hatch style Horizontal (or 25 percent closer together than LightHorizontal). |
HatchStyle.NARROW_VERTICAL | Specifies vertical lines that are spaced 75 percent closer together than hatch style Vertical (or 25 percent closer together than LightVertical). |
HatchStyle.OUTLINED_DIAMOND | Specifies forward diagonal and backward diagonal lines that cross but are not antialiased. |
HatchStyle.PERCENT_05 | Specifies a 5-percent hatch. The ratio of foreground color to background color is 5:100. |
HatchStyle.PERCENT_10 | Specifies a 10-percent hatch. The ratio of foreground color to background color is 10:100. |
HatchStyle.PERCENT_20 | Specifies a 20-percent hatch. The ratio of foreground color to background color is 20:100. |
HatchStyle.PERCENT_25 | Specifies a 25-percent hatch. The ratio of foreground color to background color is 25:100. |
HatchStyle.PERCENT_30 | Specifies a 30-percent hatch. The ratio of foreground color to background color is 30:100. |
HatchStyle.PERCENT_40 | Specifies a 40-percent hatch. The ratio of foreground color to background color is 40:100. |
HatchStyle.PERCENT_50 | Specifies a 50-percent hatch. The ratio of foreground color to background color is 50:100. |
HatchStyle.PERCENT_60 | Specifies a 60-percent hatch. The ratio of foreground color to background color is 60:100. |
HatchStyle.PERCENT_70 | Specifies a 70-percent hatch. The ratio of foreground color to background color is 70:100. |
HatchStyle.PERCENT_75 | Specifies a 75-percent hatch. The ratio of foreground color to background color is 75:100. |
HatchStyle.PERCENT_80 | Specifies a 80-percent hatch. The ratio of foreground color to background color is 80:100. |
HatchStyle.PERCENT_90 | Specifies a 90-percent hatch. The ratio of foreground color to background color is 90:100. |
HatchStyle.PLAID | Specifies a hatch that has the appearance of a plaid material. |
HatchStyle.SHINGLE | Specifies a hatch that has the appearance of diagonally-layered shingles that slant to the right from top points to bottom points. |
HatchStyle.SMALL_CHECKER_BOARD | Specifies a hatch that has the appearance of a checkerboard. |
HatchStyle.SMALL_CONFETTI | Specifies a hatch that has the appearance of confetti. |
HatchStyle.SMALL_GRID | Specifies horizontal and vertical lines that cross and are spaced 50 percent closer together than hatch style Cross. |
HatchStyle.SOLID_DIAMOND | Specifies a hatch that has the appearance of a checkerboard placed diagonally. |
HatchStyle.SPHERE | Specifies a hatch that has the appearance of spheres laid adjacent to one another. |
HatchStyle.TRELLIS | Specifies a hatch that has the appearance of a trellis. |
HatchStyle.VERTICAL | A pattern of vertical lines. |
HatchStyle.WAVE | Specifies horizontal lines that are composed of tildes. |
HatchStyle.WEAVE | Specifies a hatch that has the appearance of a woven material. |
HatchStyle.WIDE_DOWNWARD_DIAGONAL | Specifies diagonal lines that slant to the right from top points to bottom points, have the same spacing as hatch style ForwardDiagonal, and are triple its width, but are not antialiased. |
HatchStyle.WIDE_UPWARD_DIAGONAL | Specifies diagonal lines that slant to the left from top points to bottom points, have the same spacing as hatch style BackwardDiagonal, and are triple its width, but are not antialiased. |
HatchStyle.ZIG_ZAG | Specifies horizontal lines that are composed of zigzags. |
This property exposes the supported by the HatchStyle type.
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.
setColor(java.awt.Color)
,
setAlternateColor(java.awt.Color)
public void setPicture(java.awt.Image value)
Allows you to set an image as the key marker in the user legend.
Setting this property will override any settings configured using the setMarkerShape(int)
property.
You can use any supported image type which the Java API supports. For more information regarding the image formats, please refer to the Java API Documentation.
setColor(java.awt.Color)
,
setBorderEffect(int)
,
setColor(java.awt.Color)
,
setKeyLabel(java.lang.String)
,
setMarkerShape(int)
,
UserLegendBox.getItem(int)
,
PointAttributes.setPicture(java.awt.Image)
,
PointAttributes
public void setShowLine(boolean value)
Gets or sets a value used to indicate the line marker style for a user legend item.
When set to True, this property forces the marker of a user legend item to display as a line with the marker (like series legend in Line charts).
The setMarkerShape(int)
property may be used in combination with this property to display a different markershape with the ShowLine attribute.
setMarkerShape(int)
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |