com.googlecode.charts4j
Class LineStyle

java.lang.Object
  extended by com.googlecode.charts4j.LineStyle

public final class LineStyle
extends Object

Class for specifying line styles on LineCharts, XYLines, and RadarPlots. You can specify if a line is solid or dotted, and the thickness of the line with this class. Also, for your convenience, there are a few predefined lines.

Author:
Julien Chastang (julien.c.chastang at gmail dot com)

Field Summary
static LineStyle MEDIUM_DOTTED_LINE
          Medium dotted line.
static LineStyle MEDIUM_LINE
          Medium line.
static LineStyle THICK_DOTTED_LINE
          Thick dotted line.
static LineStyle THICK_LINE
          Thick line.
static LineStyle THIN_DOTTED_LINE
          Thin dotted line.
static LineStyle THIN_LINE
          Thin line.
 
Method Summary
 int getLengthOfBlankSegment()
          Get the length of the blank segment.
 int getLengthOfLineSegment()
          Get the length of the line segment.
 int getLineThickness()
          Get the thickness of the line.
static LineStyle newLineStyle(int lineThickness, int lengthOfLineSegment, int lengthOfBlankSegment)
          Create a line style.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THICK_LINE

public static final LineStyle THICK_LINE
Thick line.


MEDIUM_LINE

public static final LineStyle MEDIUM_LINE
Medium line.


THIN_LINE

public static final LineStyle THIN_LINE
Thin line.


THICK_DOTTED_LINE

public static final LineStyle THICK_DOTTED_LINE
Thick dotted line.


MEDIUM_DOTTED_LINE

public static final LineStyle MEDIUM_DOTTED_LINE
Medium dotted line.


THIN_DOTTED_LINE

public static final LineStyle THIN_DOTTED_LINE
Thin dotted line.

Method Detail

getLineThickness

public int getLineThickness()
Get the thickness of the line.

Returns:
The thickness of the line.

getLengthOfLineSegment

public int getLengthOfLineSegment()
Get the length of the line segment.

Returns:
Length of line segment.

getLengthOfBlankSegment

public int getLengthOfBlankSegment()
Get the length of the blank segment.

Returns:
Length of blank segment.

newLineStyle

public static LineStyle newLineStyle(int lineThickness,
                                     int lengthOfLineSegment,
                                     int lengthOfBlankSegment)
Create a line style.

Parameters:
lineThickness - Thickness of line. Must be > 0.
lengthOfLineSegment - Length of line segment. Must be >= 0.
lengthOfBlankSegment - Length of blank segment. Must be >= 0.
Returns:
a LineStyle