Style Intelligence v12.0

inetsoft.graph.coord
Class PolarCoord

java.lang.Object
  extended by inetsoft.graph.coord.AbstractCoord
      extended by inetsoft.graph.coord.Coordinate
          extended by inetsoft.graph.coord.PolarCoord
All Implemented Interfaces:
inetsoft.graph.internal.ICoordinate, inetsoft.graph.internal.ILayout, Serializable, Cloneable

public class PolarCoord
extends Coordinate

A polar coordinate transforms the visual objects and their shapes in a circular arrangement around the center of the coordinate.

See Also:
Serialized Form

Field Summary
static int PLUS
          This causes the mapped shapes to start from the outer circumference of a circle.
static int RHO
          This causes the Y position being mapped to the radius.
static int THETA
          This causes the Y position being mapped to the theta (angle).
static int THETA_RHO
          This maps X to theta and Y to r.
 
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
PolarCoord()
          Default constructor.
PolarCoord(Coordinate coord)
          Create a polar coord that applies polar transformation to the embedded coord.
PolarCoord(Scale yscale)
          Create a polar (circular) coordinate.
PolarCoord(Scale xscale, Scale yscale)
          Create a polar (circular) coordinate.
 
Method Summary
 Object clone()
          Make a copy of this object.
 void createAxis(VGraph vgraph)
          Create axis and other guides for the graph.
 boolean equalsContent(Object obj)
          Check if the coordinate has the same structure as this.
 void fit(double x, double y, double w, double h)
          Set the screen transformation to fit the graph to the coord bounds.
 inetsoft.graph.guide.axis.Axis[] getAxes(boolean recursive)
          Get all axes in this coordinate.
 Coordinate getCoordinate()
          Get the coordinate to be transformed by this polar coord.
 int getDimCount()
          Get the number of dimensions in this coordinate.
 double getIntervalSize(double interval)
          Get the interval size in this coordinate.
 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.
 Point2D getPosition(double[] tuple)
          Map a tuple (from logic coordinate space) to the chart coordinate space.
 double getRadius()
          Get polar radius.
 Scale[] getScales()
          Get the scales used in the coordinate.
 int getType()
          Get the polar transformation type.
 void init(DataSet dset)
          Initialize this coordinate for the specified chart data set.
 void reflect(boolean vertical)
          Transform the coordinate so the plot is flipped vertically.
 void rotate(double degree)
          Rotate the plot counter-clock wise.
 void setCoordinate(Coordinate coord)
          Set the coordinate to be transformed by this polar coord.
 void setType(int type)
          Set the polar transformation type.
 Object transformShape(Object geom)
          Transform a shape or point to this coordinate space.
 
Methods inherited from class inetsoft.graph.coord.Coordinate
getCoordTransform, getDataSet, getParentCoordinate, getPlotSpec, getScaledCoordTransform, getScaledCoordTransform, getValue, getVGraph, layoutText, setCoordTransform, setDataSet, setParentCoordinate, setPlotSpec, setVGraph, transform, transpose
 
Methods inherited from class inetsoft.graph.coord.AbstractCoord
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, getUnitMinHeight, getUnitMinWidth, getUnitPreferredHeight, getUnitPreferredWidth, isAxisLabelVisible, isAxisTickVisible, setAxisLabelVisible, setAxisSize, setAxisTickVisible
 

Field Detail

THETA

public static final int THETA
This causes the Y position being mapped to the theta (angle).

See Also:
Constant Field Values

RHO

public static final int RHO
This causes the Y position being mapped to the radius.

See Also:
Constant Field Values

PLUS

public static final int PLUS
This causes the mapped shapes to start from the outer circumference of a circle.

See Also:
Constant Field Values

THETA_RHO

public static final int THETA_RHO
This maps X to theta and Y to r.

See Also:
Constant Field Values
Constructor Detail

PolarCoord

public PolarCoord()
Default constructor.


PolarCoord

public PolarCoord(Scale yscale)
Create a polar (circular) coordinate.


PolarCoord

public PolarCoord(Scale xscale,
                  Scale yscale)
Create a polar (circular) coordinate.


PolarCoord

public PolarCoord(Coordinate coord)
Create a polar coord that applies polar transformation to the embedded coord.

Method Detail

setCoordinate

public void setCoordinate(Coordinate coord)
Set the coordinate to be transformed by this polar coord.


getCoordinate

public Coordinate getCoordinate()
Get the coordinate to be transformed by this polar coord.


setType

public void setType(int type)
Set the polar transformation type.

Parameters:
type - one of the constants defined in PolarCoord: THETA, THETA_RHO, RHO, PLUS, RHO_PLUS.

getType

public int getType()
Get the polar transformation type.


rotate

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

Overrides:
rotate in class Coordinate
Parameters:
degree - angle in degrees.

reflect

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

Overrides:
reflect in class Coordinate
Parameters:
vertical - true to reflect on vertical axis.

transformShape

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

Overrides:
transformShape in class Coordinate
Parameters:
geom - a shape or a point to transform.
Returns:
the transformed shape or point.

createAxis

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

Specified by:
createAxis in class Coordinate
Parameters:
vgraph - visual graph to create axis.

fit

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

Specified by:
fit in class Coordinate

init

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

Overrides:
init in class Coordinate

getPosition

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

Specified by:
getPosition in class Coordinate
Parameters:
tuple - the tuple in logic space (scaled values).
Returns:
the position of specified tuple.

getIntervalSize

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

Specified by:
getIntervalSize in class Coordinate
Parameters:
interval - interval value.
Returns:
interval size in this coordinate space.

getMaxWidth

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

Overrides:
getMaxWidth in class Coordinate

getMaxHeight

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

Overrides:
getMaxHeight in class Coordinate

getDimCount

public int getDimCount()
Get the number of dimensions in this coordinate.


getScales

public Scale[] getScales()
Get the scales used in the coordinate.


getAxes

public inetsoft.graph.guide.axis.Axis[] getAxes(boolean recursive)
Get all axes in this coordinate.

Specified by:
getAxes in class AbstractCoord
Parameters:
recursive - true to include axes in nested coordinates.

clone

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

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

getRadius

public double getRadius()
Get polar radius.


equalsContent

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

Overrides:
equalsContent in class Coordinate

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