org.jscience.architecture.traffic.tools
Class ZoomTool

java.lang.Object
  extended by org.jscience.architecture.traffic.tools.ZoomTool
All Implemented Interfaces:
Overlay, Tool

public class ZoomTool
extends java.lang.Object
implements Tool

Left-click to zoom in, right-click to zoom out. That is, when this Tool is the currently selected Tool.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jscience.architecture.traffic.tools.Tool
Tool.Mask
 
Field Summary
protected  ZoomAction za
          DOCUMENT ME!
 
Constructor Summary
ZoomTool(Controller c)
          Creates a ZoomTool.
 
Method Summary
 java.awt.Panel getPanel()
          DOCUMENT ME!
 void mouseMoved(View view, java.awt.Point p, Tool.Mask mask)
          DOCUMENT ME!
 void mousePressed(View view, java.awt.Point p, Tool.Mask mask)
          Invoked when the user releases a mouse button.
 void mouseReleased(View view, java.awt.Point p, Tool.Mask mask)
          DOCUMENT ME!
 int overlayType()
          DOCUMENT ME!
 void paint(java.awt.Graphics g)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

za

protected ZoomAction za
DOCUMENT ME!

Constructor Detail

ZoomTool

public ZoomTool(Controller c)
Creates a ZoomTool.

Parameters:
c - The Controller controlling this Tool.
Method Detail

mousePressed

public void mousePressed(View view,
                         java.awt.Point p,
                         Tool.Mask mask)
Invoked when the user releases a mouse button. Zoom in on left-click, zoom out on right-click.

Specified by:
mousePressed in interface Tool
Parameters:
view - The View that the event originates from.
p - The coordinates in the infrastructure the mouse cursor was at when the event was generated.
mask - Identifies which button was pressed, as well as any aditional sytem keys

mouseReleased

public void mouseReleased(View view,
                          java.awt.Point p,
                          Tool.Mask mask)
DOCUMENT ME!

Specified by:
mouseReleased in interface Tool
Parameters:
view - DOCUMENT ME!
p - DOCUMENT ME!
mask - DOCUMENT ME!

mouseMoved

public void mouseMoved(View view,
                       java.awt.Point p,
                       Tool.Mask mask)
DOCUMENT ME!

Specified by:
mouseMoved in interface Tool
Parameters:
view - DOCUMENT ME!
p - DOCUMENT ME!
mask - DOCUMENT ME!

overlayType

public int overlayType()
DOCUMENT ME!

Specified by:
overlayType in interface Overlay
Returns:
DOCUMENT ME!

paint

public void paint(java.awt.Graphics g)
           throws TrafficException
DOCUMENT ME!

Specified by:
paint in interface Overlay
Parameters:
g - DOCUMENT ME!
Throws:
TrafficException - DOCUMENT ME!

getPanel

public java.awt.Panel getPanel()
DOCUMENT ME!

Specified by:
getPanel in interface Tool
Returns:
DOCUMENT ME!