nl.tudelft.simulation.dsol.gui.editor2D.mouse
Class EditorInputListener

java.lang.Object
  extended by nl.tudelft.simulation.dsol.gui.animation2D.mouse.InputListener
      extended by nl.tudelft.simulation.dsol.gui.editor2D.mouse.EditorInputListener
All Implemented Interfaces:
KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, EventListener

public class EditorInputListener
extends InputListener

An input listener for the editor

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:23:36 $
Author:
Roy Chin

Field Summary
protected  boolean clickedWithinSelected
          did we click within the selected object?
protected  Point2D dragCoord
          Point where the mouse is when dragging
protected  int mouseButton
          Last mouse button that was pressed
protected  Editor2DPanel panel
          the source panel
 
Fields inherited from class nl.tudelft.simulation.dsol.gui.animation2D.mouse.InputListener
application, mouseClicked
 
Constructor Summary
EditorInputListener(DSOLApplicationInterface application, AnimationPanel panel)
          constructor
 
Method Summary
 void mouseClicked(MouseEvent event)
           
 void mouseDragged(MouseEvent event)
           
 void mousePressed(MouseEvent event)
           
 void mouseReleased(MouseEvent event)
           
protected  void performLeftMouseReleasedAction(MouseEvent event)
          perform one of the actions of the editor
protected  void performRightMouseReleasedAction(MouseEvent event)
          what to do if the right mouse button was released
 
Methods inherited from class nl.tudelft.simulation.dsol.gui.animation2D.mouse.InputListener
getSelectedObject, getSelectedObjects, keyPressed, keyReleased, keyTyped, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved, pan, popup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

panel

protected Editor2DPanel panel
the source panel


clickedWithinSelected

protected boolean clickedWithinSelected
did we click within the selected object?


mouseButton

protected int mouseButton
Last mouse button that was pressed


dragCoord

protected Point2D dragCoord
Point where the mouse is when dragging

Constructor Detail

EditorInputListener

public EditorInputListener(DSOLApplicationInterface application,
                           AnimationPanel panel)
constructor

Parameters:
application - the application
panel - the panel
Method Detail

mouseClicked

public void mouseClicked(MouseEvent event)
Specified by:
mouseClicked in interface MouseListener
Overrides:
mouseClicked in class InputListener
See Also:
MouseListener.mouseClicked(java.awt.event.MouseEvent)

mouseDragged

public void mouseDragged(MouseEvent event)
Specified by:
mouseDragged in interface MouseMotionListener
Overrides:
mouseDragged in class InputListener
See Also:
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)

mousePressed

public void mousePressed(MouseEvent event)
Specified by:
mousePressed in interface MouseListener
Overrides:
mousePressed in class InputListener
See Also:
MouseListener.mousePressed(java.awt.event.MouseEvent)

mouseReleased

public void mouseReleased(MouseEvent event)
Specified by:
mouseReleased in interface MouseListener
Overrides:
mouseReleased in class InputListener
See Also:
MouseListener.mouseReleased(java.awt.event.MouseEvent)

performLeftMouseReleasedAction

protected void performLeftMouseReleasedAction(MouseEvent event)
perform one of the actions of the editor

Parameters:
event - mouse event

performRightMouseReleasedAction

protected void performRightMouseReleasedAction(MouseEvent event)
what to do if the right mouse button was released

Parameters:
event - MouseEvent


Copyright © 2002-2010 Delft University of Technology, the Netherlands. All Rights Reserved.