Chart FX for Java 6.5

SoftwareFX.ChartFX
Class Line

java.lang.Object
  extended by SoftwareFX.ChartFX.Line
Direct Known Subclasses:
ConstantLine

public final class Line
extends java.lang.Object

Provides access to the Line object.

Using these properties you can set the color, width and style of many line objects including Axis, ConstantLines and GridLines.

Members also allow for shapes to be applied to all the supported line objects. This allows for interesting design ideas such as an Axis representing a thermometer.


Constructor Summary
Line()
           
 
Method Summary
 java.awt.Color getColor()
          Gets the Color.
 int getEndCap()
          Gets the EndCap.
 int getStartCap()
          Gets the StartCap.
 int getStyle()
          Gets the Style.
 int getWidth()
          Gets the Width.
 void setColor(java.awt.Color value)
          Allows you to set the line color for a selected line.
 void setEndCap(int value)
          Allows you to configure a marker shape at the ending of a selected line.
 void setStartCap(int value)
          Allows you to configure a marker shape at the beginning of a selected line.
 void setStyle(int value)
          Allows you to set the line style for a selected line.
 void setWidth(int value)
          Gets or sets the line width for a selected line.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Line

public Line()
Method Detail

getColor

public java.awt.Color getColor()

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


getEndCap

public int getEndCap()

Gets the EndCap. For more detail see setEndCap(int).


getStartCap

public int getStartCap()

Gets the StartCap. For more detail see setStartCap(int).


getStyle

public int getStyle()

Gets the Style. For more detail see setStyle(int).


getWidth

public int getWidth()

Gets the Width. For more detail see setWidth(int).


setColor

public void setColor(java.awt.Color value)

Allows you to set the line color for a selected line.

Remarks:
  • When this property is applied to an axis line, both the primary and secondary axes are affected. For instance, when you change the X axis line color using this property both axes lines above and below the chart area are colored.

  • You may also control the setWidth(int) and setStyle(int) of the selected line using the supported members of the Line Class .

  • The setEndCap(int) and setStartCap(int) properties allow you to configured various shapes at the beginning and ending of a selected line.

  • For more information regarding the Color type, please refer to the Java API Documentation.

  • See Also:
    setEndCap(int), setStartCap(int), setStyle(int), setWidth(int), ChartCore.getAxisY(), ChartCore.getAxisX(), ChartCore.getConstantLines(), Chart, ConstantLine

    setEndCap

    public void setEndCap(int value)

    Allows you to configure a marker shape at the ending of a selected line.

    Values:
    LineCap : Specifies the available cap styles with which a line can end.
    ValueDescription
    LineCap.ANCHOR_MASKSpecifies a mask used to check whether a line cap is an anchor cap.
    LineCap.ARROW_ANCHORSpecifies an arrow-shaped anchor cap.
    LineCap.CUSTOMSpecifies a custom line cap.
    LineCap.DIAMOND_ANCHORSpecifies a diamond anchor cap.
    LineCap.FLATSpecifies a flat line cap.
    LineCap.NO_ANCHORSpecifies no anchor.
    LineCap.ROUNDSpecifies a round line cap.
    LineCap.ROUND_ANCHORSpecifies a round anchor cap.
    LineCap.SQUARESpecifies a square line cap.
    LineCap.SQUARE_ANCHORSpecifies a square anchor line cap.
    LineCap.TRIANGLESpecifies a triangular line cap.

    Remarks:
  • When this property is applied to an axis line, both the primary and secondary axes are affected. For instance, when you change the X axis EndCap using this property both axes lines above and below the chart area are modified.

  • An starting marker shape may be applied to lines using the setStartCap(int) property.

  • You can also control setColor(java.awt.Color), setStyle(int) and setWidth(int) for a selected line object using the supported members of the Line Class .

  • See Also:
    setStartCap(int), setColor(java.awt.Color), setStyle(int), setWidth(int), ChartCore.getAxisX(), ChartCore.getAxisY(), Chart

    setStartCap

    public void setStartCap(int value)

    Allows you to configure a marker shape at the beginning of a selected line.

    Values:
    LineCap : Specifies the available cap styles with which a line can end.
    ValueDescription
    LineCap.ANCHOR_MASKSpecifies a mask used to check whether a line cap is an anchor cap.
    LineCap.ARROW_ANCHORSpecifies an arrow-shaped anchor cap.
    LineCap.CUSTOMSpecifies a custom line cap.
    LineCap.DIAMOND_ANCHORSpecifies a diamond anchor cap.
    LineCap.FLATSpecifies a flat line cap.
    LineCap.NO_ANCHORSpecifies no anchor.
    LineCap.ROUNDSpecifies a round line cap.
    LineCap.ROUND_ANCHORSpecifies a round anchor cap.
    LineCap.SQUARESpecifies a square line cap.
    LineCap.SQUARE_ANCHORSpecifies a square anchor line cap.
    LineCap.TRIANGLESpecifies a triangular line cap.

    Remarks:
  • When this property is applied to an axis line, both the primary and secondary axes are affected. For instance, when you change the X axis StartCap using this property both axes lines above and below the chart area are modified.

  • An ending marker shape may be applied to lines using the setEndCap(int) property.

  • You can also control setColor(java.awt.Color), setStyle(int) and setWidth(int) for a selected line object using the supported members of the Line Class .

  • See Also:
    setEndCap(int), setColor(java.awt.Color), setStyle(int), setWidth(int), ChartCore.getAxisX(), ChartCore.getAxisY(), Chart

    setStyle

    public void setStyle(int value)

    Allows you to set the line style for a selected line.

    Values:
    DashStyle : Specifies the style with which dashed lines are drawn.
    ValueDescription
    DashStyle.CUSTOMSpecifies a user-defined custom dash style.
    DashStyle.DASHSpecifies a line consisting of dashes.
    DashStyle.DASH_DOTSpecifies a line consisting of a repeating pattern of dash-dot.
    DashStyle.DASH_DOT_DOTSpecifies a line consisting of a repeating pattern of dash-dot-dot.
    DashStyle.DOTSpecifies a line consisting of dots.
    DashStyle.SOLIDSpecifies a solid line.

    Remarks:
  • When this property is applied to an axis line, both the primary and secondary axes are affected. For instance, when you change the X axis line style using this property both axes lines above and below the chart area are effected.

  • You may also control the setWidth(int) and setColor(java.awt.Color) of the selected line using the supported members of the Line Class .

  • The setEndCap(int) and setStartCap(int) properties allow you to configured various shapes at the beginning and ending of a selected line.

  • The image below depicts a 'DashDotDot' Line style assigned to the Y axis:

  • See Also:
    setEndCap(int), setStartCap(int), setColor(java.awt.Color), setWidth(int), ChartCore.getAxisY(), ChartCore.getAxisX(), ChartCore.getConstantLines(), Chart, ConstantLine

    setWidth

    public void setWidth(int value)

    Gets or sets the line width for a selected line.

    Remarks:
  • When this property is applied to an axis line, both the primary and secondary axes are affected. For instance, when you change the X axis line width using this property both axes lines above and below the chart area are effected.

  • You may also control the setStyle(int) and setColor(java.awt.Color) of the selected line using the supported members of the Line Class .

  • The setEndCap(int) and setStartCap(int) properties allow you to configured various shapes at the beginning and ending of a selected line.

  • See Also:
    setEndCap(int), setStartCap(int), setStyle(int), setColor(java.awt.Color), ChartCore.getAxisY(), ChartCore.getAxisX(), ChartCore.getConstantLines(), Chart, ConstantLine

    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.