be.ugent.caagt.swirl.mouse
Class MouseTool

java.lang.Object
  extended by be.ugent.caagt.swirl.mouse.MouseTool
All Implemented Interfaces:
java.lang.Iterable<MouseHandler>

public class MouseTool
extends java.lang.Object
implements java.lang.Iterable<MouseHandler>

Wraps a list of mouse handlers for use with a MouseOverlay.


Constructor Summary
MouseTool()
          Default constructor.
 
Method Summary
 void addHandler(MouseHandler handler)
          Add a handler to this tool.
 boolean canHandle(javax.swing.JComponent parent)
          Returns true if and only if all handlers registered with this tool can handle the given component.
 java.util.Iterator<MouseHandler> iterator()
          Return an iterator over the handlers of this tool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseTool

public MouseTool()
Default constructor.

Method Detail

addHandler

public void addHandler(MouseHandler handler)
Add a handler to this tool. The order in which handlers are registered determines the order in which they are tried when the mouse is pressed on the overlay which uses this tool.

Do not call this method while the tool is registered with some overlay.


canHandle

public boolean canHandle(javax.swing.JComponent parent)
Returns true if and only if all handlers registered with this tool can handle the given component.


iterator

public java.util.Iterator<MouseHandler> iterator()
Return an iterator over the handlers of this tool.

Specified by:
iterator in interface java.lang.Iterable<MouseHandler>