Chart FX 7 for Java Desktop

com.softwarefx.chartfx.desktop
Class Line

java.lang.Object
  extended by com.softwarefx.chartfx.desktop.Line
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CustomGridLine, GridLine

public class Line
extends Object
implements Serializable

Provides access to the Line object.

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

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.

See Also:
Serialized Form

Constructor Summary
Line()
           
 
Method Summary
 Color getColor()
          Gets the Color.
 com.softwarefx.LineCap getEndCap()
          Gets the EndCap.
 com.softwarefx.LineCap getStartCap()
          Gets the StartCap.
 com.softwarefx.DashStyle getStyle()
          Gets the Style.
 int getWidth()
          Gets the Width.
 void setColor(Color value)
          Sets or Gets the line color for a selected line.
 void setEndCap(com.softwarefx.LineCap value)
          Sets a marker shape at the end of a selected line.
 void setStartCap(com.softwarefx.LineCap value)
          Sets a marker shape at the beginning of a selected line.
 void setStyle(com.softwarefx.DashStyle value)
          Sets the line style for a selected line.
 void setWidth(int value)
          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 Color getColor()

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


getEndCap

public com.softwarefx.LineCap getEndCap()

Gets the EndCap. For more detail see setEndCap(com.softwarefx.LineCap).


getStartCap

public com.softwarefx.LineCap getStartCap()

Gets the StartCap. For more detail see setStartCap(com.softwarefx.LineCap).


getStyle

public com.softwarefx.DashStyle getStyle()

Gets the Style. For more detail see setStyle(com.softwarefx.DashStyle).


getWidth

public int getWidth()

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


setColor

public void setColor(Color value)

Sets or Gets 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 will be colored.

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

  • The setEndCap(com.softwarefx.LineCap) and setStartCap(com.softwarefx.LineCap) 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.

  • Named color are supported (e.g. Red), to use Hex notation you have to use quotes (e.g. "#FF00FF").

  • Below, the X axis line color is set to red:

  • See Also:
    setEndCap(com.softwarefx.LineCap), setStartCap(com.softwarefx.LineCap), setStyle(com.softwarefx.DashStyle), setWidth(int), Chart.getAxisY(), Chart.getAxisX(), Chart, Axis, GridLine

    setEndCap

    public void setEndCap(com.softwarefx.LineCap value)

    Sets a marker shape at the end of 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 EndCap using this property, both axes lines above and below the chart area will be modified.

  • A starting marker shape may be applied to lines using the setStartCap(com.softwarefx.LineCap) property.

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

  • These are the supported styles:
    AnchorMask
    ArrowAnchor
    Custom
    DiamondAnchor
    Flat
    NoAnchor
    Round
    RoundAnchor
    Square
    SquareAnchor
    Triangle

  • Below, the X axis line EndCap is set to RoundAnchor:

  • See Also:
    setStartCap(com.softwarefx.LineCap), setColor(java.awt.Color), setStyle(com.softwarefx.DashStyle), setWidth(int), Chart.getAxisX(), Chart.getAxisY(), Chart, Axis, GridLine

    setStartCap

    public void setStartCap(com.softwarefx.LineCap value)

    Sets a marker shape at the beginning of 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 StartCap using this property, both axes lines above and below the chart area will be modified.

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

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

  • These are the supported styles:
    AnchorMask
    ArrowAnchor
    Custom
    DiamondAnchor
    Flat
    NoAnchor
    Round
    RoundAnchor
    Square
    SquareAnchor
    Triangle

  • Below, the X axis line StartCap is set to RoundAnchor:

  • See Also:
    setEndCap(com.softwarefx.LineCap), setColor(java.awt.Color), setStyle(com.softwarefx.DashStyle), setWidth(int), Chart.getAxisX(), Chart.getAxisY(), Chart, Axis, GridLine

    setStyle

    public void setStyle(com.softwarefx.DashStyle value)

    Sets the line style 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 style using this property, both axes lines above and below the chart area will be affected.

  • 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(com.softwarefx.LineCap) and setStartCap(com.softwarefx.LineCap) properties allow you to configured various shapes at the beginning and ending of a selected line.

  • These are the supported DashStyles:
    Custom
    Dash
    DashDot
    DashDotDot
    Dot
    Solid

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

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

  • See Also:
    setEndCap(com.softwarefx.LineCap), setStartCap(com.softwarefx.LineCap), setColor(java.awt.Color), setWidth(int), Chart.getAxisY(), Chart.getAxisX(), Chart, Axis, GridLine

    setWidth

    public void setWidth(int value)

    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 will be affected.

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

  • The setEndCap(com.softwarefx.LineCap) and setStartCap(com.softwarefx.LineCap) properties allow you to configured various shapes at the beginning and end of a selected line.

  • Below, the X axis line width is set to 3:

  • See Also:
    setEndCap(com.softwarefx.LineCap), setStartCap(com.softwarefx.LineCap), setStyle(com.softwarefx.DashStyle), setColor(java.awt.Color), Chart.getAxisY(), Chart.getAxisX(), Chart, Axis, GridLine

    http://www.softwarefx.com

    2008 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.