Package prezoom.view
Class CenterCanvas.EditModeActionHandler
- java.lang.Object
-
- prezoom.view.CenterCanvas.EditModeActionHandler
-
- All Implemented Interfaces:
MouseListener,MouseMotionListener,MouseWheelListener,EventListener
- Enclosing class:
- CenterCanvas
private class CenterCanvas.EditModeActionHandler extends Object implements MouseWheelListener, MouseMotionListener, MouseListener
the listener for the edit mode
-
-
Constructor Summary
Constructors Modifier Constructor Description privateEditModeActionHandler()
-
Method Summary
Modifier and Type Method Description voidmouseClicked(MouseEvent e)right click to pop up delete menuvoidmouseDragged(MouseEvent e)deal with dragging if mouse right clicked, drag the canvas.voidmouseEntered(MouseEvent e)voidmouseExited(MouseEvent e)voidmouseMoved(MouseEvent e)when mouse moving, keep updating the cursor typevoidmousePressed(MouseEvent e)when pressed check whether an object or a resize point is selectedvoidmouseReleased(MouseEvent e)voidmouseWheelMoved(MouseWheelEvent e)deal with zooming
-
-
-
Method Detail
-
mouseWheelMoved
public void mouseWheelMoved(MouseWheelEvent e)
deal with zooming- Specified by:
mouseWheelMovedin interfaceMouseWheelListener- Parameters:
e- mouse action
-
mouseDragged
public void mouseDragged(MouseEvent e)
deal with dragging if mouse right clicked, drag the canvas. ifGObjectManager.drawingType!= null, drawing shapes. ifGObjectManager.draggedObj!= null, dragging the object ifGObjectManager.resizedObj!= null, resizing the object- Specified by:
mouseDraggedin interfaceMouseMotionListener- Parameters:
e- mouse action
-
mouseMoved
public void mouseMoved(MouseEvent e)
when mouse moving, keep updating the cursor type- Specified by:
mouseMovedin interfaceMouseMotionListener- Parameters:
e- mouse event
-
mouseClicked
public void mouseClicked(MouseEvent e)
right click to pop up delete menu- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
e- mouse event
-
mousePressed
public void mousePressed(MouseEvent e)
when pressed check whether an object or a resize point is selected- Specified by:
mousePressedin interfaceMouseListener- Parameters:
e- mouse action
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExitedin interfaceMouseListener
-
-