|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdevisor2.grid.backend.BaseSelector
devisor2.grid.backend.GridHotspotter
devisor2.grid.backend.GridSelector
This class finally adds the GUI feedback for scaling, translating and rotating to the BaseSelector. Only use this class for full support, the other ones are not instanciable.
Field Summary | |
protected double |
angle
|
protected int |
baseline_x
|
protected int |
baseline_y
|
protected java.awt.Point |
bottomleft
|
protected java.awt.Point |
bottomright
|
protected java.awt.geom.Point2D |
newbottomleft
|
protected java.awt.geom.Point2D |
newbottomright
|
protected java.awt.geom.Point2D |
newtopleft
|
protected java.awt.geom.Point2D |
newtopright
|
protected java.awt.Rectangle |
rotateBackup
|
protected java.awt.geom.AffineTransform |
rotmatrix
|
protected java.awt.Point |
topleft
|
protected java.awt.Point |
topright
|
protected int |
vector_x
|
protected int |
vector_y
|
Fields inherited from class devisor2.grid.backend.GridHotspotter |
HOTSPOT_BOTTOMCENTER, HOTSPOT_BOTTOMLEFT, HOTSPOT_BOTTOMRIGHT, HOTSPOT_CENTERCENTER, HOTSPOT_CENTERLEFT, HOTSPOT_CENTERRIGHT, HOTSPOT_NONE, HOTSPOT_TOPCENTER, HOTSPOT_TOPLEFT, HOTSPOT_TOPRIGHT, hotspotMask, MASK_ALL, MASK_CIRCLES, MASK_NODES, MASK_ROTATE |
Fields inherited from class devisor2.grid.backend.BaseSelector |
boundaryNodesOnly, cc, containsCircles, currentRect, da, g, nodesonly, perimeter, previousRectDrawn, rectToDraw, root |
Constructor Summary | |
GridSelector(MainFrame mf,
DrawingArea da)
The constructor just sets references correctly and initializes some variables |
Method Summary | |
void |
endScaleSelectBox()
fixes negative orientation of the perimeter variable |
double |
getRotateAngle()
|
void |
rotateSelectBox(int x,
int y,
int hotspot,
boolean first)
rotates the select box around the angle defined by the baseline and and the line from the perimeter's center to the current mouse position |
void |
scaleSelectBox(int x,
int y,
int hotspot,
boolean first)
performs the update of the select box for the scale operation |
void |
startRotateSelectBox(int hotspot)
starts the rotate GUI feedback by defining the baseline against which to rotate |
void |
startScaleSelectBox(int hotspot)
starts the scaling GUI feedback by setting the neccessary parameters |
void |
translateSelectBox(int x,
int y,
boolean first)
performs the update of the select box for the move operation |
Methods inherited from class devisor2.grid.backend.GridHotspotter |
getCenterHotspot, getClickedHotspot, getClickedHotspotCoords, getHotspotMask, getOppositeHotspotCoords, getTopLeftHotspot, setHotspotMask, setPerimeter, updateHotspots |
Methods inherited from class devisor2.grid.backend.BaseSelector |
clearSelectBox, containsCircles, getClickedItem, getSelectBox, getSelectedItems, isBoundaryNodesOnly, isNodesOnly, paintSelectBox, setGraphics, startSelectBox, updateSelectBox |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int baseline_x
protected int baseline_y
protected int vector_x
protected int vector_y
protected double angle
protected java.awt.Rectangle rotateBackup
protected java.awt.Point topleft
protected java.awt.Point topright
protected java.awt.Point bottomleft
protected java.awt.Point bottomright
protected java.awt.geom.Point2D newtopleft
protected java.awt.geom.Point2D newtopright
protected java.awt.geom.Point2D newbottomleft
protected java.awt.geom.Point2D newbottomright
protected java.awt.geom.AffineTransform rotmatrix
Constructor Detail |
public GridSelector(MainFrame mf, DrawingArea da)
mf
- - the MainFrame referenceda
- - the drawing area where the select box will be painted onMethod Detail |
public void translateSelectBox(int x, int y, boolean first)
first
- - hack to indicate that a third drawing is neccessarypublic void startScaleSelectBox(int hotspot)
hotspot
- - the hotspot with which to scalepublic void scaleSelectBox(int x, int y, int hotspot, boolean first)
hotspot
- - the hotspot through which scaling is appliedfirst
- - hack to indicate that a third drawing is neccessarypublic void endScaleSelectBox()
public void startRotateSelectBox(int hotspot)
hotspot
- - the hotspot clicked onpublic void rotateSelectBox(int x, int y, int hotspot, boolean first)
hotspot
- - the hotspot originally defining the baselinefirst
- - flag to hack, same as abovepublic double getRotateAngle()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |