Style Intelligence v12.0

inetsoft.graph.aesthetic
Class GLine

java.lang.Object
  extended by inetsoft.graph.aesthetic.GLine
All Implemented Interfaces:
Serializable, Cloneable

public class GLine
extends Object
implements Cloneable, Serializable

This class is the base class for all line style aesthetics.

See Also:
Serialized Form

Field Summary
static GLine DASH_LINE
          Dash line.
static GLine DOT_LINE
          Dot line.
static GLine LARGE_DASH
          Large dash line.
static GLine MEDIUM_DASH
          Medium dash line.
static GLine THIN_LINE
          Thin line.
 
Constructor Summary
GLine()
          Create a simple solid line.
GLine(double dash, double linew)
          Create a line with dash size and line width.
GLine(int style)
          Create GLine from a line style.
 
Method Summary
 boolean equals(Object obj)
          Check if equals another object.
 double getDash()
          Get the dash size.
 double getLineWidth()
          Get the line width.
static Shape getShape(Point2D start, Point2D end, double startSize, double endSize, GLine startLine, GLine endLine)
          Get the line shape.
 Stroke getStroke()
          Get the stroke to draw the line style.
 Stroke getStroke(double linew)
          Get a stroke with the specified line width.
 int getStyle()
          Get the line style.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

THIN_LINE

public static final GLine THIN_LINE
Thin line.


DOT_LINE

public static final GLine DOT_LINE
Dot line.


DASH_LINE

public static final GLine DASH_LINE
Dash line.


MEDIUM_DASH

public static final GLine MEDIUM_DASH
Medium dash line.


LARGE_DASH

public static final GLine LARGE_DASH
Large dash line.

Constructor Detail

GLine

public GLine()
Create a simple solid line.


GLine

public GLine(int style)
Create GLine from a line style.


GLine

public GLine(double dash,
             double linew)
Create a line with dash size and line width.

Parameters:
dash - the dash size.
linew - the line width.
Method Detail

getDash

public double getDash()
Get the dash size.


getLineWidth

public double getLineWidth()
Get the line width.


getStyle

public int getStyle()
Get the line style.


getStroke

public Stroke getStroke()
Get the stroke to draw the line style. This doesn't support varying size and color on the line. Use getShape() for line with full visual attributes.


getStroke

public Stroke getStroke(double linew)
Get a stroke with the specified line width.


getShape

public static Shape getShape(Point2D start,
                             Point2D end,
                             double startSize,
                             double endSize,
                             GLine startLine,
                             GLine endLine)
Get the line shape.

Parameters:
start - the start point of the line.
end - the end point of the line.
startSize - the start point line space percent.
endSize - the end point line space percent.
startLine - the start line style.
endLine - the end line style.

equals

public boolean equals(Object obj)
Check if equals another object.

Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.