Chart FX for Java 6.5

SoftwareFX.ChartFX
Class UserLegendBoxItem

java.lang.Object
  extended by SoftwareFX.ChartFX.UserLegendBoxItem

public final class UserLegendBoxItem
extends java.lang.Object

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

UserLegendBoxItem

public UserLegendBoxItem()
Method Detail

getAlternateColor

public java.awt.Color getAlternateColor()

Gets the AlternateColor. For more detail see setAlternateColor(java.awt.Color).


getAttributes

public PointAttributes getAttributes()

Gets the Attributes. For more detail see setAttributes(SoftwareFX.ChartFX.PointAttributes).


getBorder

public Line getBorder()
Deprecated. You should use getAttributes() instead.

See Also:
PointAttributes

getBorderColor

public java.awt.Color getBorderColor()

Gets the BorderColor. For more detail see setBorderColor(java.awt.Color).


getBorderEffect

public int getBorderEffect()

Gets the BorderEffect. For more detail see setBorderEffect(int).


getBorderWidth

public short getBorderWidth()

Gets the BorderWidth. For more detail see setBorderWidth(short).


getColor

public java.awt.Color getColor()

Gets the Color. For more detail see setColor(java.awt.Color).


getKeyLabel

public java.lang.String getKeyLabel()

Gets the KeyLabel. For more detail see setKeyLabel(java.lang.String).


getLabel

public java.lang.String getLabel()

Gets the Label. For more detail see setLabel(java.lang.String).


getLink

public Link getLink()

Gets the Link object for a selected UserLegendBoxItem.

Remarks:
  • 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.

  • See Also:
    Link.setUrl(java.lang.String), Link.setTarget(java.lang.String), Link

    getMarkerShape

    public int getMarkerShape()

    Gets the MarkerShape. For more detail see setMarkerShape(int).


    getPattern

    public int getPattern()

    Gets the Pattern. For more detail see setPattern(int).


    getPicture

    public java.awt.Image getPicture()

    Gets the Picture. For more detail see setPicture(java.awt.Image).


    isShowLine

    public boolean isShowLine()

    Gets the ShowLine. For more detail see setShowLine(boolean).


    setAlternateColor

    public void setAlternateColor(java.awt.Color value)

    Used to set the background color for a user legend marker when a pattern is configured.

    Remarks:
  • 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.

  • See Also:
    setColor(java.awt.Color), setPattern(int)

    setAttributes

    public void setAttributes(PointAttributes value)

    Gets or sets a PointAttributes object for the selected item.

    Remarks:
  • 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.

  • See Also:
    PointAttributes

    setBorder

    public void setBorder(Line line)
    Deprecated. You should use getAttributes() instead.

    See Also:
    PointAttributes

    setBorderColor

    public void setBorderColor(java.awt.Color value)

    Gets or sets the border color for a UserLegendBoxItem.

    Remarks:
  • 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.

  • See Also:
    setBorderEffect(int), setBorderWidth(short)

    setBorderEffect

    public void setBorderEffect(int value)

    Specifies the marker border effects for a selected user legend item.

    Values:
    BorderEffect : Specify different border effects that may be applied to a object.
    ValueDescription
    BorderEffect.NONENo border effect is applied. The border effect must be None for the BorderColor property to take effect.
    BorderEffect.RAISEDThe border has raised inner and outer edges.
    BorderEffect.LIGHTApply light color to the border using the series/points color.
    BorderEffect.DARKApply dark color to the border using the series/points color.
    BorderEffect.OPPOSITEChooses 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.SHADOWThe border will have shadow.

    Remarks:
  • 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.

  • See Also:
    setColor(java.awt.Color), setMarkerShape(int), ChartCore.setUserLegendBox(boolean), ChartCore.getUserLegendBoxObj(), Chart, LegendBox

    setBorderWidth

    public void setBorderWidth(short value)

    Gets or sets the width for the UserLegendBoxItem border.

    Remarks:
  • 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.

  • See Also:
    setAttributes(SoftwareFX.ChartFX.PointAttributes), setBorderColor(java.awt.Color)

    setColor

    public void setColor(java.awt.Color value)

    Sets a color for the selected user legend box marker.

    Remarks:
  • 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.

  • See Also:
    setBorderEffect(int), setMarkerShape(int), ChartCore.getUserLegendBoxObj(), LegendBox, UserLegendBox

    setKeyLabel

    public void setKeyLabel(java.lang.String value)

    Allows you to set a short label to be used in the user legend box.

    Remarks:
  • 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.

  • See Also:
    setLabel(java.lang.String), UserLegendBox.setShowMarkers(boolean), LegendBoxBase.setTextColor(java.awt.Color), LegendBox, UserLegendBox

    setLabel

    public void setLabel(java.lang.String value)

    Allows you to set a text string for the selected user legend key.

    Remarks:
  • 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)

  • See Also:
    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

    setMarkerShape

    public void setMarkerShape(int value)

    Used to specify the point type used to paint markers for the user legend box items.

    Values:
    MarkerShape : Defines different shapes used to paint point markers in the chart.
    ValueDescription
    MarkerShape.NONEDo not display point markers.
    MarkerShape.RECTDisplays a rectangle.
    MarkerShape.CIRCLEDisplays a circle.
    MarkerShape.TRIANGLEDisplays a triangle.
    MarkerShape.DIAMONDDisplays a diamond.
    MarkerShape.MARBLEDisplays a 3D marble.
    MarkerShape.HORZ_LINEDisplays a horizontal line.
    MarkerShape.VERT_LINEDisplays a vertical line.
    MarkerShape.CROSSDisplays a cross.
    MarkerShape.INVERTED_TRIANGLEDisplays a rotated triangle.
    MarkerShape.XDisplays an X.
    MarkerShape.MANYSelects a combination of the above.
    MarkerShape.PICTUREDisplays a configured picture.

    Remarks:
  • 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).

  • See Also:
    setColor(java.awt.Color), setBorderEffect(int), setColor(java.awt.Color), setLabel(java.lang.String), ChartCore.setUserLegendBox(boolean), UserLegendBox.setShowMarkers(boolean), ChartCore.getUserLegendBoxObj(), LegendBox

    setPattern

    public void setPattern(int value)

    Allows you to set a pattern for a selected marker in the user legend.

    Values:
    HatchStyle : Specifies the different hatch patterns available.
    ValueDescription
    HatchStyle.BACKWARD_DIAGONALA pattern of lines on a diagonal from upper right to lower left.
    HatchStyle.CROSSSpecifies horizontal and vertical lines that cross.
    HatchStyle.DARK_DOWNWARD_DIAGONALSpecifies 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_HORIZONTALSpecifies horizontal lines that are spaced 50 percent closer together than Horizontal and are twice the width of HatchStyleHorizontal.
    HatchStyle.DARK_UPWARD_DIAGONALSpecifies 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_VERTICALSpecifies vertical lines that are spaced 50 percent closer together than Vertical and are twice its width.
    HatchStyle.DASHED_DOWNWARD_DIAGONALSpecifies dashed diagonal lines, that slant to the right from top points to bottom points.
    HatchStyle.DASHED_HORIZONTALSpecifies dashed horizontal lines.
    HatchStyle.DASHED_UPWARD_DIAGONALSpecifies dashed diagonal lines, that slant to the left from top points to bottom points.
    HatchStyle.DASHED_VERTICALSpecifies dashed vertical lines.
    HatchStyle.DIAGONAL_BRICKSpecifies a hatch that has the appearance of layered bricks that slant to the left from top points to bottom points.
    HatchStyle.DIAGONAL_CROSSSpecifies forward diagonal and backward diagonal lines that cross. The lines are antialiased.
    HatchStyle.DIVOTSpecifies a hatch that has the appearance of divots.
    HatchStyle.DOTTED_DIAMONDSpecifies forward diagonal and backward diagonal lines, each of which is composed of dots, that cross.
    HatchStyle.DOTTED_GRIDSpecifies horizontal and vertical lines, each of which is composed of dots, that cross.
    HatchStyle.FORWARD_DIAGONALA pattern of lines on a diagonal from upper left to lower right.
    HatchStyle.HORIZONTALA pattern of horizontal lines.
    HatchStyle.HORIZONTAL_BRICKSpecifies a hatch that has the appearance of horizontally layered bricks.
    HatchStyle.LARGE_CHECKER_BOARDSpecifies a hatch that has the appearance of a checkerboard with squares that are twice the size of SmallCheckerBoard.
    HatchStyle.LARGE_CONFETTISpecifies a hatch that has the appearance of confetti, and is composed of larger pieces than SmallConfetti.
    HatchStyle.LARGE_GRIDSpecifies the hatch style Cross.
    HatchStyle.LIGHT_DOWNWARD_DIAGONALSpecifies 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_HORIZONTALSpecifies horizontal lines that are spaced 50 percent closer together than Horizontal.
    HatchStyle.LIGHT_UPWARD_DIAGONALSpecifies 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_VERTICALSpecifies vertical lines that are spaced 50 percent closer together than Vertical.
    HatchStyle.MAXSpecifies hatch style SolidDiamond.
    HatchStyle.MINSpecifies hatch style Horizonal.
    HatchStyle.NARROW_HORIZONTALSpecifies horizontal lines that are spaced 75 percent closer together than hatch style Horizontal (or 25 percent closer together than LightHorizontal).
    HatchStyle.NARROW_VERTICALSpecifies vertical lines that are spaced 75 percent closer together than hatch style Vertical (or 25 percent closer together than LightVertical).
    HatchStyle.OUTLINED_DIAMONDSpecifies forward diagonal and backward diagonal lines that cross but are not antialiased.
    HatchStyle.PERCENT_05Specifies a 5-percent hatch. The ratio of foreground color to background color is 5:100.
    HatchStyle.PERCENT_10Specifies a 10-percent hatch. The ratio of foreground color to background color is 10:100.
    HatchStyle.PERCENT_20Specifies a 20-percent hatch. The ratio of foreground color to background color is 20:100.
    HatchStyle.PERCENT_25Specifies a 25-percent hatch. The ratio of foreground color to background color is 25:100.
    HatchStyle.PERCENT_30Specifies a 30-percent hatch. The ratio of foreground color to background color is 30:100.
    HatchStyle.PERCENT_40Specifies a 40-percent hatch. The ratio of foreground color to background color is 40:100.
    HatchStyle.PERCENT_50Specifies a 50-percent hatch. The ratio of foreground color to background color is 50:100.
    HatchStyle.PERCENT_60Specifies a 60-percent hatch. The ratio of foreground color to background color is 60:100.
    HatchStyle.PERCENT_70Specifies a 70-percent hatch. The ratio of foreground color to background color is 70:100.
    HatchStyle.PERCENT_75Specifies a 75-percent hatch. The ratio of foreground color to background color is 75:100.
    HatchStyle.PERCENT_80Specifies a 80-percent hatch. The ratio of foreground color to background color is 80:100.
    HatchStyle.PERCENT_90Specifies a 90-percent hatch. The ratio of foreground color to background color is 90:100.
    HatchStyle.PLAIDSpecifies a hatch that has the appearance of a plaid material.
    HatchStyle.SHINGLESpecifies a hatch that has the appearance of diagonally-layered shingles that slant to the right from top points to bottom points.
    HatchStyle.SMALL_CHECKER_BOARDSpecifies a hatch that has the appearance of a checkerboard.
    HatchStyle.SMALL_CONFETTISpecifies a hatch that has the appearance of confetti.
    HatchStyle.SMALL_GRIDSpecifies horizontal and vertical lines that cross and are spaced 50 percent closer together than hatch style Cross.
    HatchStyle.SOLID_DIAMONDSpecifies a hatch that has the appearance of a checkerboard placed diagonally.
    HatchStyle.SPHERESpecifies a hatch that has the appearance of spheres laid adjacent to one another.
    HatchStyle.TRELLISSpecifies a hatch that has the appearance of a trellis.
    HatchStyle.VERTICALA pattern of vertical lines.
    HatchStyle.WAVESpecifies horizontal lines that are composed of tildes.
    HatchStyle.WEAVESpecifies a hatch that has the appearance of a woven material.
    HatchStyle.WIDE_DOWNWARD_DIAGONALSpecifies 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_DIAGONALSpecifies 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_ZAGSpecifies horizontal lines that are composed of zigzags.

    Remarks:
  • 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.

  • See Also:
    setColor(java.awt.Color), setAlternateColor(java.awt.Color)

    setPicture

    public void setPicture(java.awt.Image value)

    Allows you to set an image as the key marker in the user legend.

    Remarks:
  • 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.

  • See Also:
    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

    setShowLine

    public void setShowLine(boolean value)

    Gets or sets a value used to indicate the line marker style for a user legend item.

    Remarks:
  • 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.

  • See Also:
    setMarkerShape(int)

    http://www.softwarefx.com

    2007 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.