Style Intelligence v12.0

inetsoft.graph
Class EGraph

java.lang.Object
  extended by inetsoft.graph.EGraph
All Implemented Interfaces:
Cloneable

public class EGraph
extends Object
implements Cloneable

An EGraph is a graph definition. A graph is contructed by specifying the scales, coordinates, and aesthetics. If scale or coordinate are not specified, a default will be created from the graph element definition.


Constructor Summary
EGraph()
          Create an instance of EGraph.
 
Method Summary
 void addElement(GraphElement elem)
          Add a graph element to this graph.
 void addForm(GraphForm form)
          Add a form guide to this graph.
 void clear()
          Clear all settings and restore to the initial mode.
 void clearElements()
          Remove all graph elements.
 void clearForms()
          Remove all form guides.
 Object clone()
          Make a copy of this object.
 GGraph createGGraph(Coordinate coord, DataSet data)
          Create a geometry graph from coordinate and data set.
 Coordinate getCoordinate()
          Get the coordinate to be used for this graph.
 GraphElement getElement(int idx)
          Get the specified graph element.
 int getElementCount()
          Get the number of graph elements defined in this graph.
 GraphForm getForm(int idx)
          Get the specified form guide.
 int getFormCount()
          Get the number of forms defined in this graph.
 int getLegendLayout()
          Get the layout position option of the legends.
 double getLegendPreferredSize()
          Get the preferred width or height of the legends.
 Scale getScale(String col)
          Get the scale used for mapping values for a column.
 VisualFrame[] getVisualFrames()
          Get all aesthetic frames in the graph.
 TitleSpec getX2TitleSpec()
          Get the secondary x title specification.
 TitleSpec getXTitleSpec()
          Get the x title specification.
 TitleSpec getY2TitleSpec()
          Get the secondary y title specification.
 TitleSpec getYTitleSpec()
          Get the y title specification.
 void removeElement(int idx)
          Remove the graph element at the specified position.
 void removeForm(int idx)
          Remove the form at the specified position.
 void setCoordinate(Coordinate coord)
          Set the coordinate to be used for this graph.
 void setLegendLayout(int option)
          Set the layout position option for the legends.
 void setLegendPreferredSize(double preferredSize)
          Set the preferred size for the legends.
 void setScale(String col, Scale scale)
          Set the scale used for mapping values for a column.
 void setX2TitleSpec(TitleSpec tspec)
          Set the secondary x title specification.
 void setXTitleSpec(TitleSpec tspec)
          Set the x title specification.
 void setY2TitleSpec(TitleSpec tspec)
          Set the secondary y title specification.
 void setYTitleSpec(TitleSpec tspec)
          Set the y title specification.
 String toString()
          Get the string presentation.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EGraph

public EGraph()
Create an instance of EGraph.

Method Detail

addElement

public void addElement(GraphElement elem)
Add a graph element to this graph. Element classes are defined in inetsoft.graph.element package. At least one graph element must be added to a graph.


getElement

public GraphElement getElement(int idx)
Get the specified graph element.


getElementCount

public int getElementCount()
Get the number of graph elements defined in this graph.


removeElement

public void removeElement(int idx)
Remove the graph element at the specified position.


clearElements

public void clearElements()
Remove all graph elements.


setCoordinate

public void setCoordinate(Coordinate coord)
Set the coordinate to be used for this graph.


getCoordinate

public Coordinate getCoordinate()
Get the coordinate to be used for this graph. If the coordinate is not explicitly set, a default coordinate will be created.


setScale

public void setScale(String col,
                     Scale scale)
Set the scale used for mapping values for a column.

Parameters:
col - the column identifier of a dataset.
scale - the scale applied to the column.

getScale

public Scale getScale(String col)
Get the scale used for mapping values for a column.

Parameters:
col - the column identifier of a dataset.
Returns:
scale the scale applied to the column.

addForm

public void addForm(GraphForm form)
Add a form guide to this graph. Form classes are defined in inetsoft.graph.guide.form package.


getForm

public GraphForm getForm(int idx)
Get the specified form guide.


getFormCount

public int getFormCount()
Get the number of forms defined in this graph.


removeForm

public void removeForm(int idx)
Remove the form at the specified position.


clearForms

public void clearForms()
Remove all form guides.


getLegendLayout

public int getLegendLayout()
Get the layout position option of the legends.


setLegendLayout

public void setLegendLayout(int option)
Set the layout position option for the legends.

Parameters:
option - one of GraphConstants.TOP, LEFT, BOTTOM, RIGHT, IN_PLACE.

getLegendPreferredSize

public double getLegendPreferredSize()
Get the preferred width or height of the legends.


setLegendPreferredSize

public void setLegendPreferredSize(double preferredSize)
Set the preferred size for the legends.


setXTitleSpec

public void setXTitleSpec(TitleSpec tspec)
Set the x title specification.


getXTitleSpec

public TitleSpec getXTitleSpec()
Get the x title specification.


setX2TitleSpec

public void setX2TitleSpec(TitleSpec tspec)
Set the secondary x title specification.


getX2TitleSpec

public TitleSpec getX2TitleSpec()
Get the secondary x title specification.


setYTitleSpec

public void setYTitleSpec(TitleSpec tspec)
Set the y title specification.


getYTitleSpec

public TitleSpec getYTitleSpec()
Get the y title specification.


setY2TitleSpec

public void setY2TitleSpec(TitleSpec tspec)
Set the secondary y title specification.


getY2TitleSpec

public TitleSpec getY2TitleSpec()
Get the secondary y title specification.


getVisualFrames

public VisualFrame[] getVisualFrames()
Get all aesthetic frames in the graph.


clear

public void clear()
Clear all settings and restore to the initial mode.


toString

public String toString()
Get the string presentation.

Overrides:
toString in class Object

clone

public Object clone()
Make a copy of this object.

Overrides:
clone in class Object

createGGraph

public GGraph createGGraph(Coordinate coord,
                           DataSet data)
Create a geometry graph from coordinate and data set.


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