Style Intelligence v12.0

inetsoft.graph.coord
Class Coordinate

java.lang.Object
  extended by inetsoft.graph.coord.AbstractCoord
      extended by inetsoft.graph.coord.Coordinate
All Implemented Interfaces:
inetsoft.graph.internal.ICoordinate, inetsoft.graph.internal.ILayout, Serializable, Cloneable
Direct Known Subclasses:
FacetCoord, GeoCoord, ParallelCoord, PolarCoord, RectCoord, TriCoord

public abstract class Coordinate
extends AbstractCoord
implements Cloneable, inetsoft.graph.internal.ILayout

A coordinate defines the dimensional space for rendering graph elements. It converts a logical graph definition to physical drawing elements.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface inetsoft.graph.internal.ICoordinate
ALL_MOST, BOTTOM_AXIS, BOTTOM_MOST, LEFT_AXIS, LEFT_MOST, RIGHT_AXIS, RIGHT_MOST, TOP_AXIS, TOP_MOST
 
Constructor Summary
Coordinate()
           
 
Method Summary
 Object clone()
          Make a copy of this object.
abstract  void createAxis(VGraph vgraph)
          Create axis and other guides for the visual graph.
 boolean equalsContent(Object obj)
          Check if the coordinate has the same structure as this.
abstract  void fit(double x, double y, double w, double h)
          Set the screen transformation to fit the graph to the coord bounds.
 AffineTransform getCoordTransform()
          Get the transformation on the coordinate positions.
 DataSet getDataSet()
          Get data set.
abstract  double getIntervalSize(double interval)
          Get the interval size in this coordinate space.
 double getMaxHeight()
          Get the maximum height of an item in this coordinate without overlapping.
 double getMaxWidth()
          Get the maximum width of an item in this coordinate without overlapping.
 Coordinate getParentCoordinate()
          Get the parent coordinate if this coordinate is nested in a facet.
 PlotSpec getPlotSpec()
          Get the plot specification.
abstract  Point2D getPosition(double[] tuple)
          Map a tuple (from logic coordinate space) to the chart coordinate space.
protected  AffineTransform getScaledCoordTransform()
          Get coord transform for the coord bounds.
protected  AffineTransform getScaledCoordTransform(double x, double y, double w, double h)
          Get coord transform for the specified graph area.
 double getValue(double[] tuple, int idx)
          Get the specified dimension value for this coordinate.
 VGraph getVGraph()
          Get associated VGraph.
 void init(DataSet dset)
          Initialize this coordinate for the specified chart data set.
protected  void layoutText(VGraph vgraph, boolean resolve)
          Layout the text labels.
 void reflect(boolean vertical)
          Transform the coordinate so the plot is flipped vertically.
 void rotate(double degree)
          Rotate the plot counter-clock wise.
 void setCoordTransform(AffineTransform ctrans)
          Set the transformation on the coordinate positions.
 void setDataSet(DataSet dset)
          Set data set.
 void setParentCoordinate(Coordinate pcoord)
          Set the parent coordinate if this coordinate is nested in a facet.
 void setPlotSpec(PlotSpec spec)
          Set the plot specification.
 void setVGraph(VGraph vgraph)
          Set associated VGraph.
 void transform(VContainer vc)
          Transform the visual objects in the container to this coordinate space.
 Object transformShape(Object geom)
          Transform a shape or point to this coordinate space.
 void transpose()
          Transpose the coordinate (flip along northest-southwest diagonal line).
 
Methods inherited from class inetsoft.graph.coord.AbstractCoord
getAxes, getCoordBounds, setCoordBounds
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface inetsoft.graph.internal.ILayout
getMinHeight, getMinWidth, getPreferredHeight, getPreferredWidth
 
Methods inherited from interface inetsoft.graph.internal.ICoordinate
getAxesAt, getAxisMinSize, getAxisPreferredSize, getAxisSize, getDimCount, getScales, getUnitMinHeight, getUnitMinWidth, getUnitPreferredHeight, getUnitPreferredWidth, isAxisLabelVisible, isAxisTickVisible, setAxisLabelVisible, setAxisSize, setAxisTickVisible
 

Constructor Detail

Coordinate

public Coordinate()
Method Detail

getPosition

public abstract Point2D getPosition(double[] tuple)
Map a tuple (from logic coordinate space) to the chart coordinate space.

Parameters:
tuple - the tuple in logic space (scaled values).
Returns:
the position of specified tuple.

getIntervalSize

public abstract double getIntervalSize(double interval)
Get the interval size in this coordinate space.

Parameters:
interval - interval value.
Returns:
interval size in this coordinate space.

createAxis

public abstract void createAxis(VGraph vgraph)
Create axis and other guides for the visual graph.

Parameters:
vgraph - visual graph to create axis.

getCoordTransform

public AffineTransform getCoordTransform()
Get the transformation on the coordinate positions.

Returns:
the transformation on the coordinate positions.

setCoordTransform

public void setCoordTransform(AffineTransform ctrans)
Set the transformation on the coordinate positions.


reflect

public void reflect(boolean vertical)
Transform the coordinate so the plot is flipped vertically.

Parameters:
vertical - true to reflect on vertical axis.

rotate

public void rotate(double degree)
Rotate the plot counter-clock wise.


transpose

public void transpose()
Transpose the coordinate (flip along northest-southwest diagonal line).


transform

public void transform(VContainer vc)
Transform the visual objects in the container to this coordinate space.


transformShape

public Object transformShape(Object geom)
Transform a shape or point to this coordinate space.

Parameters:
geom - a shape or a point to transform.
Returns:
the transformed shape or point.

getValue

public double getValue(double[] tuple,
                       int idx)
Get the specified dimension value for this coordinate.

Parameters:
tuple - the tuple of the graph element.
idx - the dimension index to retrieve value.

setPlotSpec

public void setPlotSpec(PlotSpec spec)
Set the plot specification.


getPlotSpec

public PlotSpec getPlotSpec()
Get the plot specification.


getMaxWidth

public double getMaxWidth()
Get the maximum width of an item in this coordinate without overlapping.


getMaxHeight

public double getMaxHeight()
Get the maximum height of an item in this coordinate without overlapping.


init

public void init(DataSet dset)
Initialize this coordinate for the specified chart data set.


fit

public abstract void fit(double x,
                         double y,
                         double w,
                         double h)
Set the screen transformation to fit the graph to the coord bounds.


layoutText

protected void layoutText(VGraph vgraph,
                          boolean resolve)
Layout the text labels.

Parameters:
resolve - true to resolve overlapping.

getParentCoordinate

public Coordinate getParentCoordinate()
Get the parent coordinate if this coordinate is nested in a facet.


setParentCoordinate

public void setParentCoordinate(Coordinate pcoord)
Set the parent coordinate if this coordinate is nested in a facet.


setVGraph

public void setVGraph(VGraph vgraph)
Set associated VGraph.

Specified by:
setVGraph in interface inetsoft.graph.internal.ICoordinate

getVGraph

public VGraph getVGraph()
Get associated VGraph.

Specified by:
getVGraph in interface inetsoft.graph.internal.ICoordinate

getDataSet

public DataSet getDataSet()
Get data set.


setDataSet

public void setDataSet(DataSet dset)
Set data set.


getScaledCoordTransform

protected AffineTransform getScaledCoordTransform()
Get coord transform for the coord bounds.


getScaledCoordTransform

protected AffineTransform getScaledCoordTransform(double x,
                                                  double y,
                                                  double w,
                                                  double h)
Get coord transform for the specified graph area. The transformation matrix is scaled to match the output area.

Parameters:
x - the x position of the origin for scaling.
y - the y position of the origin for scaling.
w - the width of the output.
h - the height of the output.

clone

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

Specified by:
clone in interface inetsoft.graph.internal.ICoordinate
Overrides:
clone in class AbstractCoord

equalsContent

public boolean equalsContent(Object obj)
Check if the coordinate has the same structure as this.


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