|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttreebolic.view.Mapper
public class Mapper
Mapper of unit circle space to view
| Field Summary | |
|---|---|
protected int |
theLeft
Left coordinate |
protected double |
theScaleX
Scale x factor |
protected double |
theScaleY
Scale y factor |
protected java.awt.Dimension |
theSize
Size of graphics context |
protected int |
theTop
Top coordinate |
protected double |
theXShift
X shift |
protected double |
theYShift
Y shift |
private double |
theZoomFactor
Zoom factor |
| Constructor Summary | |
|---|---|
Mapper()
|
|
| Method Summary | |
|---|---|
protected void |
computeScale()
Compute scale from view size |
java.awt.Dimension |
getSize()
Get size |
java.awt.Point |
getViewLocation(INode thisNode)
Get view coordinates of node |
double |
getXShift()
Get view x-shift |
double |
getYShift()
Get view y-shift |
protected int |
hUnitCircleToView(double cy)
Convert unit circle y-extent to view y-extent |
protected double |
hViewToUnitCircle(double cvy)
Convert view y-extent (height) to unit circle y-extent |
void |
setXShift(java.lang.Double thisX)
Set view x-shift |
void |
setYShift(java.lang.Double thisY)
Set view y-shift |
void |
setZoomFactor(java.lang.Double thisFactor)
Set view zoom factor |
Complex |
viewToUnitCircle(int vx,
int vy,
java.awt.Dimension thisSize)
Convert view coordinates to unit circle coordinates |
protected int |
wUnitCircleToView(double cx)
Convert unit circle x-extent to view x-extent |
protected double |
wViewToUnitCircle(double cvx)
Convert view x-extent (width) to unit circle x-extent |
protected int |
xUnitCircleToView(double x)
Convert unit circle x-coordinate to view x-coordinate |
protected double |
xViewToUnitCircle(double vx)
Convert view x-coordinate to unit circle x-coordinate |
protected int |
yUnitCircleToView(double y)
Convert unit circle y-coordinate to view y-coordinate |
protected double |
yViewToUnitCircle(double vy)
Convert view y-coordinate to unit circle y-coordinate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.awt.Dimension theSize
protected double theScaleX
protected double theScaleY
protected double theXShift
protected double theYShift
protected int theTop
protected int theLeft
private double theZoomFactor
| Constructor Detail |
|---|
public Mapper()
| Method Detail |
|---|
public java.awt.Dimension getSize()
public void setZoomFactor(java.lang.Double thisFactor)
thisFactor - zoom factorpublic void setXShift(java.lang.Double thisX)
thisX - view x-shift (0,1)public void setYShift(java.lang.Double thisY)
thisY - view y-shift (0,1)public double getXShift()
public double getYShift()
protected void computeScale()
protected int xUnitCircleToView(double x)
x - unit circle x-coordinate
protected int yUnitCircleToView(double y)
y - unit circle y-coordinate
protected int wUnitCircleToView(double cx)
cx - unit circle x-extent
protected int hUnitCircleToView(double cy)
cy - unit circle y-extent
protected double xViewToUnitCircle(double vx)
vx - view x-coordinate
protected double yViewToUnitCircle(double vy)
vy - view y-coordinate
protected double wViewToUnitCircle(double cvx)
cvx - view x-extent
protected double hViewToUnitCircle(double cvy)
cvy - view y-extent
public Complex viewToUnitCircle(int vx,
int vy,
java.awt.Dimension thisSize)
vx - x coordinate in view spacevy - y coordinate in view spacethisSize - view size
public java.awt.Point getViewLocation(INode thisNode)
thisNode - node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||