Package curve.control
Class Mover
java.lang.Object
curve.control.Mover
- All Implemented Interfaces:
Mode,MouseListener,MouseMotionListener,MouseWheelListener,EventListener
public class Mover
extends Object
implements MouseListener, MouseMotionListener, MouseWheelListener, Mode
deal with mouse user events
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Boardboardoptstatic DotsCanvasdc(package private) static booleandebug(package private) static booleandebug2click(package private) static booleandebugConvertToCubic(package private) static booleandebugdirty(package private) static booleandebugDist(package private) static booleandebugDnD(package private) static booleandebug Drag(package private) static booleandebug Draw(package private) static booleandebugEnv(package private) static booleandebugJoin(package private) static booleandebugLine(package private) static booleandebugMenu(package private) static booleandebugMotion(package private) static booleandebugMouse(package private) static booleandebugMove(package private) static booleandebugPan(package private) static booleandebugSelect(package private) static booleandebugSeq to check sequence of mouse events(package private) static booleandebugSplitdragMPdragpstatic EndPointend Pointstatic intfx, fystatic intfx, fy(package private) Interpreterip(package private) Keykeyprivate intlastXprivate intlastY(package private) intmouse count(package private) MoverPopupMenumpmstatic EndPointstart Point(package private) Trt(package private) Uu(package private) static Stringzz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBoardLink(Board board) add board liinkvoidadd interpreter linkvoidaddKeyLink(Key key) add key linkvoidadd mover popup menu linkvoidclear last XYvoiddoCancel()do cancelvoiddo draw dragvoiddo drawing 1 clickprivate voiddo pan clickvoiddoPanDrag(int sx, int sy) do pan drag(package private) voiddo select clickvoiddo select dragvoiddo start draw modevoiddo start pan modevoiddo start select mode(package private) Stringfix pointintgetLastX()get Last XintgetLastY()get Last Y(package private) voidhandleDoubleClick(int button, MouseEvent e) handle double clickvoidcome here when mouse released from empty space(package private) static voidlink to Log.mes(package private) static voidlogPointArray(String z, DPoint[] pa) log point arrayvoiddummy mouse clickedvoidpoint/curve draggingvoiddummy mouse enteredvoiddummy mouse exitedvoidcurve interaction based on mouse movement alonevoidmouse pressedvoidend-of-interaction triggervoidmouse wheel movedprivate voidset area point dirty areaprivate voidset dirty areasprivate voidcheck each line connected to the pointvoidshowXY(int fx, int fy) show X and Y
-
Field Details
-
zz
zz -
debug
static boolean debugdebug -
debugJoin
static boolean debugJoindebugJoin -
debugConvertToCubic
static boolean debugConvertToCubicdebugConvertToCubic -
debugDnD
static boolean debugDnDdebugDnD -
debugDrag
static boolean debugDragdebug Drag -
debugLine
static boolean debugLinedebugLine -
debugMouse
static boolean debugMousedebugMouse -
debug2click
static boolean debug2clickdebug2click -
debugdirty
static boolean debugdirtydebugdirty -
debugMenu
static boolean debugMenudebugMenu -
debugMotion
static boolean debugMotiondebugMotion -
debugMove
static boolean debugMovedebugMove -
debugDist
static boolean debugDistdebugDist -
debugDraw
static boolean debugDrawdebug Draw -
debugSelect
static boolean debugSelectdebugSelect -
debugSplit
static boolean debugSplitdebugSplit -
debugPan
static boolean debugPandebugPan -
debugEnv
static boolean debugEnvdebugEnv -
debugSeq
static boolean debugSeqdebugSeq to check sequence of mouse events -
fx
public static int fxfx, fy -
fy
public static int fyfx, fy -
dc
dc -
t
Tr tt -
u
U uu -
mpm
MoverPopupMenu mpmmpm -
key
Key keykey -
ip
Interpreter ipip -
board
Board boardboard -
cpt
opt -
dragP
dragp -
dragMP
-
lastX
private int lastXlastX -
lastY
private int lastYlastY -
startPoint
start Point -
endPoint
end Point -
mouseCount
int mouseCountmouse count
-
-
Constructor Details
-
Mover
-
-
Method Details
-
getLastX
public int getLastX()get Last X- Returns:
- last X
-
getLastY
public int getLastY()get Last Y- Returns:
- last Y
-
clearLastXY
public void clearLastXY()clear last XY -
addInterpreterLink
-
addMoverPopuMenuLink
-
addKeyLink
-
addBoardLink
-
log
-
logPointArray
-
showXY
public void showXY(int fx, int fy) show X and Y- Parameters:
fx- -fy- -
-
mouseMoved
curve interaction based on mouse movement alone
mouse moved
- Specified by:
mouseMovedin interfaceMouseMotionListener- Parameters:
e- -
-
mouseDragged
point/curve dragging- Specified by:
mouseDraggedin interfaceMouseMotionListener- Parameters:
me- -
-
mouseClicked
dummy mouse clicked- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
e- -
-
mouseEntered
dummy mouse entered- Specified by:
mouseEnteredin interfaceMouseListener- Parameters:
e- -
-
mouseExited
dummy mouse exited- Specified by:
mouseExitedin interfaceMouseListener- Parameters:
e- -
-
mousePressed
mouse pressed- Specified by:
mousePressedin interfaceMouseListener- Parameters:
me- -
-
doDrawing1Click
public void doDrawing1Click()do drawing 1 click -
doPan1Click
private void doPan1Click()do pan click -
doSelect1Click
void doSelect1Click()do select click -
mouseReleased
end-of-interaction trigger
new line, new point will run handleNewDraggedLine()
- Specified by:
mouseReleasedin interfaceMouseListener- Parameters:
e- -
-
handleDoubleClick
handle double clickuse double click or escape to terminate laying down a line
also to select a line
- Parameters:
button- -e- -
-
mouseWheelMoved
mouse wheel moved- Specified by:
mouseWheelMovedin interfaceMouseWheelListener- Parameters:
e- -
-
doPanDrag
public void doPanDrag(int sx, int sy) do pan drag- Parameters:
sx- -sy- -
-
setDirtyAreas
-
setEndPointDirtyAreas
check each line connected to the pointthen follow to lines
then follow to areas
- Parameters:
ep- - end point
-
setAreaPointDirtyArea
-
doSelectDrag
public void doSelectDrag()do select drag -
doDrawDrag
public void doDrawDrag()do draw drag -
doCancel
public void doCancel()do cancel -
doStartSelectMode
public void doStartSelectMode()do start select mode -
doStartPanMode
public void doStartPanMode()do start pan mode -
doStartDrawMode
public void doStartDrawMode()do start draw mode -
handleNewDraggedLine
public void handleNewDraggedLine()come here when mouse released from empty space
line is defined to run from startPoint to endPoint.
-
fixPoint
-