Style Intelligence v12.0

inetsoft.graph.guide.form
Class GraphForm

java.lang.Object
  extended by inetsoft.graph.Graphable
      extended by inetsoft.graph.guide.form.GraphForm
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
GeomForm, LabelForm, ShapeForm, TargetForm

public abstract class GraphForm
extends Graphable

This is the base class for all form objects. A form object can be added to a graph to add a drawing (or text) at any position.


Constructor Summary
GraphForm()
           
 
Method Summary
abstract  Visualizable createVisual(Coordinate coord)
          Create a visual object to visualize this element.
 Visualizable[] createVisuals(Coordinate coord)
          Create visual objects to visualize this element.
 Color getColor()
          Get the foreground color.
 int getLine()
          Get the line styles for this guide.
 String getMeasure()
          Get the measure this form is associated with.
protected  Point2D getPosition(Coordinate coord, double[] tuple)
          Get the position of the tuple.
 int getXOffset()
          Get the x offset of the shape to shift in the chart.
 int getYOffset()
          Get the y offset of the shape to shift in the chart.
 int getZIndex()
          Get z-index property.
 boolean isInPlot()
          Check if the form should be kept inside the plot area.
 boolean isVisible(Coordinate coord)
          Check if this form should be drawn in the coordinate.
protected  double[] scale(Object[] tobj, Coordinate coord)
          Apply scales to values in tuple.
 void setColor(Color color)
          Set the foreground color to a static color.
 void setInPlot(boolean inside)
          Set whether this form should be kept inside the plot area.
 void setLine(int line)
          Set the line styles for this guide.
 void setMeasure(String measure)
          Set the measure this form is associated with.
 void setXOffset(int xoffset)
          Set the offset to shift the shape in the chart.
 void setYOffset(int yoffset)
          Set the offset to shift the shape in the chart.
 void setZIndex(int zIndex)
          The z-index property sets the stack order of a visual.
 
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

GraphForm

public GraphForm()
Method Detail

setLine

public void setLine(int line)
Set the line styles for this guide.


getLine

public int getLine()
Get the line styles for this guide.


getColor

public Color getColor()
Get the foreground color.


setColor

public void setColor(Color color)
Set the foreground color to a static color. this is a shortcut method for setting a static color frame.


getZIndex

public int getZIndex()
Get z-index property.


setZIndex

public void setZIndex(int zIndex)
The z-index property sets the stack order of a visual. A visual with greater stack order is always in front of another visual with lower stack order.


createVisuals

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

Parameters:
coord - the coordinate the visual object is plotted on.
Returns:
the new visual objects.

setMeasure

public void setMeasure(String measure)
Set the measure this form is associated with. If set, the form is only visualized on the graph that contains this measure.


getMeasure

public String getMeasure()
Get the measure this form is associated with.


setInPlot

public void setInPlot(boolean inside)
Set whether this form should be kept inside the plot area. If set to true and the form extends outside of the plot, the plot area is scaled to push the form object inside. It defaults to true if the position is specified as fixed position.

Specified by:
setInPlot in class Graphable

isInPlot

public boolean isInPlot()
Check if the form should be kept inside the plot area.

Specified by:
isInPlot in class Graphable

setXOffset

public void setXOffset(int xoffset)
Set the offset to shift the shape in the chart. The shape is moved right by the amount on X direction when it's painted from the original specified positions.


getXOffset

public int getXOffset()
Get the x offset of the shape to shift in the chart.


setYOffset

public void setYOffset(int yoffset)
Set the offset to shift the shape in the chart. The shape is moved up by the amount on Y direction when it's painted from the original specified positions.


getYOffset

public int getYOffset()
Get the y offset of the shape to shift in the chart.


isVisible

public boolean isVisible(Coordinate coord)
Check if this form should be drawn in the coordinate.


createVisual

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

Parameters:
coord - the coordinate the visual object is plotted on.
Returns:
the new visual object.

scale

protected double[] scale(Object[] tobj,
                         Coordinate coord)
Apply scales to values in tuple.


getPosition

protected Point2D getPosition(Coordinate coord,
                              double[] tuple)
Get the position of the tuple.

Returns:
position in the coord or null if the tuple is not in the coord.

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