Style Intelligence v12.0

inetsoft.graph.guide.form
Class LineForm

java.lang.Object
  extended by inetsoft.graph.Graphable
      extended by inetsoft.graph.guide.form.GraphForm
          extended by inetsoft.graph.guide.form.GeomForm
              extended by inetsoft.graph.guide.form.LineForm
All Implemented Interfaces:
Cloneable

public class LineForm
extends GeomForm

This is a line form guide. It can be used to add one or more lines on a graph.


Constructor Summary
LineForm()
          Default constructor.
LineForm(double[] tuple1, double[] tuple2)
          Create a line between the two points.
LineForm(Object[] v1, Object[] v2)
          Create a line between the two points.
LineForm(Point2D pos1, Point2D pos2)
          Create a line between two fixed points.
 
Method Summary
 void addPoint(Point2D point)
          Add a fixed position point.
 void addTuple(double[] tuple)
          Add a tuple in scaled tuple values.
 void addValues(Object[] tobj)
          Add a tuple in unscaled tuple values.
 Visualizable createVisual(Coordinate coord)
          Create a visual object to visualize this element.
 Visualizable[] createVisuals(Coordinate coord)
          Create visual objects to visualize this element.
 Point2D getPoint(int idx)
          Get the specified fixed position point.
 int getPointCount()
          Get the number of fixed position points.
 double[] getTuple(int idx)
          Get the tuple (scaled values) for the specified point.
 int getTupleCount()
          Get the number of tuples.
 Object[] getValues(int idx)
          Get the unscaled value tuple.
 int getValuesCount()
          Get the number of value tuples.
 boolean isEndArrow()
          Check if an arrow should be drawn at the end point.
 boolean isStartArrow()
          Check if an arrow should be drawn at the starting point.
 void setEndArrow(boolean arrow)
          Set if an arrow should be drawn at the end point.
 void setStartArrow(boolean arrow)
          Set if an arrow should be drawn at the starting point.
 
Methods inherited from class inetsoft.graph.guide.form.GeomForm
isFill, setFill
 
Methods inherited from class inetsoft.graph.guide.form.GraphForm
getColor, getLine, getMeasure, getPosition, getXOffset, getYOffset, getZIndex, isInPlot, isVisible, scale, setColor, setInPlot, setLine, setMeasure, setXOffset, setYOffset, setZIndex
 
Methods inherited from class inetsoft.graph.Graphable
getHint, getHints, setHint, setHints, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineForm

public LineForm()
Default constructor. The tuples must be added before it's used.


LineForm

public LineForm(Point2D pos1,
                Point2D pos2)
Create a line between two fixed points. The points are in points in the math coordinate.


LineForm

public LineForm(Object[] v1,
                Object[] v2)
Create a line between the two points. The point is specified as a tuple of values. The values are pre-scale and the scales are applied to obtain the tuples before drawing.


LineForm

public LineForm(double[] tuple1,
                double[] tuple2)
Create a line between the two points. A point is specified as a tuple of values. The values are post-scale so it can be specified more precisely in the coordinate space. The number of values in the tuple could be the same as the scales in all nested coordinates, or less than the scales. If the tuple contains less number of values, it is added to all inner graphs.

Method Detail

createVisual

public Visualizable createVisual(Coordinate coord)
Create a visual object to visualize this element.

Specified by:
createVisual in class GraphForm
Parameters:
coord - the coordinate the visual object is plotted on.
Returns:
the new visual object.

createVisuals

public Visualizable[] createVisuals(Coordinate coord)
Create visual objects to visualize this element.

Overrides:
createVisuals in class GraphForm
Parameters:
coord - the coordinate the visual object is plotted on.
Returns:
the new visual objects.

getTuple

public double[] getTuple(int idx)
Get the tuple (scaled values) for the specified point.


getTupleCount

public int getTupleCount()
Get the number of tuples.


addTuple

public void addTuple(double[] tuple)
Add a tuple in scaled tuple values.


getValues

public Object[] getValues(int idx)
Get the unscaled value tuple.


getValuesCount

public int getValuesCount()
Get the number of value tuples.


addValues

public void addValues(Object[] tobj)
Add a tuple in unscaled tuple values.


getPoint

public Point2D getPoint(int idx)
Get the specified fixed position point.


getPointCount

public int getPointCount()
Get the number of fixed position points.


addPoint

public void addPoint(Point2D point)
Add a fixed position point.

Parameters:
point - the point location in graph. If the value is between 0 and 1 (non-inclusive), it's treated as a proportion of the width/height. If the value is negative, it's the distance from the right/top of the graph.

isStartArrow

public boolean isStartArrow()
Check if an arrow should be drawn at the starting point.


setStartArrow

public void setStartArrow(boolean arrow)
Set if an arrow should be drawn at the starting point.


isEndArrow

public boolean isEndArrow()
Check if an arrow should be drawn at the end point.


setEndArrow

public void setEndArrow(boolean arrow)
Set if an arrow should be drawn at the end point.


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