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
Modifier and TypeFieldDescription(package private) Board
boardoptstatic DotsCanvas
dc(package private) static boolean
debug(package private) static boolean
debug2click(package private) static boolean
debugConvertToCubic(package private) static boolean
debugdirty(package private) static boolean
debugDist(package private) static boolean
debugDnD(package private) static boolean
debug Drag(package private) static boolean
debug Draw(package private) static boolean
debugEnv(package private) static boolean
debugJoin(package private) static boolean
debugLine(package private) static boolean
debugMenu(package private) static boolean
debugMotion(package private) static boolean
debugMouse(package private) static boolean
debugMove(package private) static boolean
debugPan(package private) static boolean
debugSelect(package private) static boolean
debugSeq to check sequence of mouse events(package private) static boolean
debugSplitdragMPdragpstatic EndPoint
end Pointstatic int
fx, fystatic int
fx, fy(package private) Interpreter
ip(package private) Key
keyprivate int
lastXprivate int
lastY(package private) int
mouse count(package private) MoverPopupMenu
mpmstatic EndPoint
start Point(package private) Tr
t(package private) U
u(package private) static String
zz -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBoardLink
(Board board) add board liinkvoid
add interpreter linkvoid
addKeyLink
(Key key) add key linkvoid
add mover popup menu linkvoid
clear last XYvoid
doCancel()
do cancelvoid
do draw dragvoid
do drawing 1 clickprivate void
do pan clickvoid
doPanDrag
(int sx, int sy) do pan drag(package private) void
do select clickvoid
do select dragvoid
do start draw modevoid
do start pan modevoid
do start select mode(package private) String
fix pointint
getLastX()
get Last Xint
getLastY()
get Last Y(package private) void
handleDoubleClick
(int button, MouseEvent e) handle double clickvoid
come here when mouse released from empty space(package private) static void
link to Log.mes(package private) static void
logPointArray
(String z, DPoint[] pa) log point arrayvoid
dummy mouse clickedvoid
point/curve draggingvoid
dummy mouse enteredvoid
dummy mouse exitedvoid
curve interaction based on mouse movement alonevoid
mouse pressedvoid
end-of-interaction triggervoid
mouse wheel movedprivate void
set area point dirty areaprivate void
set dirty areasprivate void
check each line connected to the pointvoid
showXY
(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:
mouseMoved
in interfaceMouseMotionListener
- Parameters:
e
- -
-
mouseDragged
point/curve dragging- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Parameters:
me
- -
-
mouseClicked
dummy mouse clicked- Specified by:
mouseClicked
in interfaceMouseListener
- Parameters:
e
- -
-
mouseEntered
dummy mouse entered- Specified by:
mouseEntered
in interfaceMouseListener
- Parameters:
e
- -
-
mouseExited
dummy mouse exited- Specified by:
mouseExited
in interfaceMouseListener
- Parameters:
e
- -
-
mousePressed
mouse pressed- Specified by:
mousePressed
in 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:
mouseReleased
in 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:
mouseWheelMoved
in 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
-