|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.infoviz.geometry.PieGeometry2D
Title : PieGeometry2D Description: A nested pie bound consists of 2 arcs and 2 lines. The angle bounds are the start and end angle of the upper and lower arcs and the radial bounds are the start and endPoints in the radius. The radial bounds take a value between 0 and 1. $Id$ $Revision$ $Author$
Field Summary | |
double[] |
angleBounds
|
java.awt.geom.Line2D.Double |
firstLine
the line at one end of the node shape |
java.awt.geom.Arc2D.Double |
innerArc
the arc closer to the center |
java.awt.Rectangle |
nestedPieBounds
|
java.awt.geom.Arc2D.Double |
outerArc
the outer arc |
double[] |
radialBounds
|
java.awt.geom.Line2D.Double |
secondLine
the line at another end of the node shape |
Constructor Summary | |
PieGeometry2D(double startAngle,
double endAngle,
double startR,
double endR)
|
Method Summary | |
protected void |
calculateGeometry()
|
boolean |
contains(double screenX,
double screenY)
returns true if the node shape contains the given coordinates otherwise returns false |
boolean |
containsAngleAndRadius(double angle,
double radius)
checks if the given angle and radius fall inside the shape of this node |
void |
draw(java.awt.Graphics g)
|
void |
fill(java.awt.Graphics g)
|
protected double |
getAngleAt(double x,
double y)
|
double[] |
getAngleBounds()
returns the start and end angle of the node |
protected double[] |
getArcX(java.awt.geom.Arc2D arc,
double screenY,
double r)
|
protected java.awt.geom.Point2D.Double |
getCartesianCoordinates(double r,
double theta)
|
java.awt.geom.Point2D |
getCenter()
|
protected java.awt.Rectangle |
getEffectiveBounds()
NestedPie bounds is the rectangle representing the Panel bounds of nested Pie. |
protected double |
getEquivAngle(double theta)
|
double[] |
getIntersectingX(double screenY)
returns the intersecting x points if y takes the value provided |
double[] |
getIntersectingY(double screenX)
todo - fix this method by following the same logic used for getIntersectingX |
protected double |
getLineX(java.awt.geom.Line2D line,
double screenY,
double angle)
|
double[] |
getRadialBounds()
|
protected double |
getRadiusAtAngle(double theta)
|
protected java.awt.geom.Point2D.Double |
getScreenCoordinates(double x,
double y)
|
protected java.awt.geom.Point2D.Double |
getScreenCoordinates(java.awt.geom.Point2D p)
|
protected java.awt.geom.Point2D.Double |
getScreenCoordinatesByAngleAndRadiusFactor(double rFactor,
double theta)
|
void |
setNestedPieBounds(java.awt.Rectangle r)
pass the rectangle occupied by the nested pie to this method |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public double[] angleBounds
public double[] radialBounds
public java.awt.Rectangle nestedPieBounds
public java.awt.geom.Line2D.Double firstLine
public java.awt.geom.Line2D.Double secondLine
public java.awt.geom.Arc2D.Double innerArc
public java.awt.geom.Arc2D.Double outerArc
Constructor Detail |
public PieGeometry2D(double startAngle, double endAngle, double startR, double endR)
Method Detail |
public void setNestedPieBounds(java.awt.Rectangle r)
setNestedPieBounds
in interface PieGeometry
protected java.awt.Rectangle getEffectiveBounds()
protected void calculateGeometry()
public double[] getAngleBounds()
getAngleBounds
in interface PieGeometry
public double[] getRadialBounds()
getRadialBounds
in interface PieGeometry
public boolean contains(double screenX, double screenY)
contains
in interface PieGeometry
public boolean containsAngleAndRadius(double angle, double radius)
containsAngleAndRadius
in interface PieGeometry
angle
- is in radianspublic java.lang.String toString()
public void draw(java.awt.Graphics g)
draw
in interface PieGeometry
public void fill(java.awt.Graphics g)
fill
in interface PieGeometry
public java.awt.geom.Point2D getCenter()
getCenter
in interface PieGeometry
public double[] getIntersectingY(double screenX)
getIntersectingY
in interface PieGeometry
public double[] getIntersectingX(double screenY)
getIntersectingX
in interface PieGeometry
protected double[] getArcX(java.awt.geom.Arc2D arc, double screenY, double r)
protected double getAngleAt(double x, double y)
protected double getLineX(java.awt.geom.Line2D line, double screenY, double angle)
protected java.awt.geom.Point2D.Double getCartesianCoordinates(double r, double theta)
protected java.awt.geom.Point2D.Double getScreenCoordinates(java.awt.geom.Point2D p)
protected java.awt.geom.Point2D.Double getScreenCoordinates(double x, double y)
protected java.awt.geom.Point2D.Double getScreenCoordinatesByAngleAndRadiusFactor(double rFactor, double theta)
protected double getRadiusAtAngle(double theta)
protected double getEquivAngle(double theta)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |