Style Intelligence v12.0

inetsoft.graph
Class VGraph

java.lang.Object
  extended by inetsoft.graph.Visualizable
      extended by inetsoft.graph.VContainer
          extended by inetsoft.graph.BoundedContainer
              extended by inetsoft.graph.VGraph
All Implemented Interfaces:
inetsoft.graph.internal.ILayout, Serializable, Cloneable, Comparable

public class VGraph
extends BoundedContainer

VGraph is the final output of a EGraph. It contains plotting information and can be used to produce the output on a graphics. It can also be used to query visual object positions and sizes for adding interactions or links.
A VGraph can be produced from a EGraph and a dataset using a Plotter.

See Also:
Serialized Form

Constructor Summary
VGraph(Coordinate coord)
          Create a VGraph.
 
Method Summary
 void addAxis(inetsoft.graph.guide.axis.Axis axis)
          Add an axis object to this graph.
 Object clone()
          Make a copy of this object.
 inetsoft.graph.guide.axis.Axis getAxis(int idx)
          Get the specified axis object.
 int getAxisCount()
          Get the number of axis objects defined in contained in this graph.
 Rectangle2D getContentBounds()
          Get the content bounds.
 Coordinate getCoordinate()
          Get the coordinate.
 EGraph getEGraph()
          Get the element graph.
 Dimension2D getLayoutSize()
          Get size for laying out legend and axis.
protected  double getMinHeight0()
          Get the minimum height.
protected  double getMinWidth0()
          Get the minimum width.
 Rectangle2D getPlotBounds()
          Get the plot bounds.
protected  double getPreferredHeight0()
          Get graph preferred height.
protected  double getPreferredWidth0()
          Get graph preferred width.
 VLabel getX2Title()
          Get the secondary x axis title.
 VLabel getXTitle()
          Get the x axis title.
 VLabel getY2Title()
          Get the secondary y axis title.
 VLabel getYTitle()
          Get the y axis title.
 void layout(int x, int y, int w, int h)
          Layout the graph to prepare for painting.
 void paint(Graphics2D g, boolean legend)
          Paint all visual objects in the container.
 void paintGraph(Graphics2D g, boolean legend)
          Paint the top-level VGraph.
protected  void paintVisualizables(Graphics2D g, List visuals)
          Paint all visual objects in the container.
 void removeAxis(int idx)
          Remove the axis object at the specified position.
 void setAxis(int idx, inetsoft.graph.guide.axis.Axis axis)
          Set the axis object at specified position.
 void setLayoutSize(Dimension2D size)
          Set size for laying out legend and axis.
 void setPlotBounds(Rectangle2D rect)
          Set plot bounds.
 
Methods inherited from class inetsoft.graph.BoundedContainer
getBounds, getPosition, getSize, setBounds, setPosition, setSize
 
Methods inherited from class inetsoft.graph.VContainer
addVisual, concat, getVisual, getVisualCount, paint, removeAllVisuals, removeVisual, removeVisual, scaleTo, setScreenTransform, setVisual
 
Methods inherited from class inetsoft.graph.Visualizable
compareTo, getGraphable, getMinHeight, getMinWidth, getPreferredHeight, getPreferredWidth, getScreenTransform, getZIndex, invalidate, setZIndex
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VGraph

public VGraph(Coordinate coord)
Create a VGraph.

Parameters:
coord - the coordinate of this graph.
Method Detail

paintGraph

public void paintGraph(Graphics2D g,
                       boolean legend)
Paint the top-level VGraph. This can be called on the top-level VGraph to paint the entire graph. The layout() method must be called before paint() is called.

Parameters:
g - the graphics in screen coordinate (0 at top);
legend - true if include legends.

addAxis

public void addAxis(inetsoft.graph.guide.axis.Axis axis)
Add an axis object to this graph.


setAxis

public void setAxis(int idx,
                    inetsoft.graph.guide.axis.Axis axis)
Set the axis object at specified position.


removeAxis

public void removeAxis(int idx)
Remove the axis object at the specified position.


getAxis

public inetsoft.graph.guide.axis.Axis getAxis(int idx)
Get the specified axis object.


getAxisCount

public int getAxisCount()
Get the number of axis objects defined in contained in this graph.


layout

public void layout(int x,
                   int y,
                   int w,
                   int h)
Layout the graph to prepare for painting. This method must be called once before the paintGraph() method is called.


paint

public void paint(Graphics2D g,
                  boolean legend)
Paint all visual objects in the container. Graphics is already transformed to be at the top-left corner of the container. The paintGraph method should normally be called to paint a graph on the graphics output.

Parameters:
g - the graphics in graph coordinate (0 at bottom);
legend - true if include legends.

paintVisualizables

protected void paintVisualizables(Graphics2D g,
                                  List visuals)
Description copied from class: VContainer
Paint all visual objects in the container. Graphics is already transformed to be at the top-left corner of the container.

Overrides:
paintVisualizables in class VContainer

getXTitle

public VLabel getXTitle()
Get the x axis title.


getX2Title

public VLabel getX2Title()
Get the secondary x axis title.


getYTitle

public VLabel getYTitle()
Get the y axis title.


getY2Title

public VLabel getY2Title()
Get the secondary y axis title.


setPlotBounds

public void setPlotBounds(Rectangle2D rect)
Set plot bounds. The plot bounds is the area between axes, excluding title, axis, and legend.


getMinWidth0

protected double getMinWidth0()
Get the minimum width.

Specified by:
getMinWidth0 in class Visualizable

getMinHeight0

protected double getMinHeight0()
Get the minimum height.

Specified by:
getMinHeight0 in class Visualizable

getPreferredWidth0

protected double getPreferredWidth0()
Get graph preferred width.

Specified by:
getPreferredWidth0 in class Visualizable

getPreferredHeight0

protected double getPreferredHeight0()
Get graph preferred height.

Specified by:
getPreferredHeight0 in class Visualizable

setLayoutSize

public void setLayoutSize(Dimension2D size)
Set size for laying out legend and axis.


getLayoutSize

public Dimension2D getLayoutSize()
Get size for laying out legend and axis.


getPlotBounds

public Rectangle2D getPlotBounds()
Get the plot bounds.


getContentBounds

public Rectangle2D getContentBounds()
Get the content bounds. Content area includes plot, axis, and title, but not the legends.


getCoordinate

public Coordinate getCoordinate()
Get the coordinate.


getEGraph

public EGraph getEGraph()
Get the element graph.


clone

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

Overrides:
clone in class VContainer

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