com.jgraph.graph
Class BasicMarqueeHandler

java.lang.Object
  extended bycom.jgraph.graph.BasicMarqueeHandler

public class BasicMarqueeHandler
extends java.lang.Object

A simple implementation of a marquee handler for JGraph.


Field Summary
protected  java.awt.Point currentPoint
           
protected  java.awt.Rectangle lastVisibleRect
           
protected  java.awt.Rectangle marqueeBounds
           
protected  java.awt.Cursor previousCursor
           
protected  java.awt.Point startPoint
           
 
Constructor Summary
BasicMarqueeHandler()
           
 
Method Summary
 boolean isForceMarqueeEvent(java.awt.event.MouseEvent event)
           
 void mouseDragged(java.awt.event.MouseEvent e)
          Includes the specified startPoint in the marquee selection.
 void mouseMoved(java.awt.event.MouseEvent e)
          Empty.
 void mousePressed(java.awt.event.MouseEvent e)
          Start the marquee at the specified startPoint.
 void mouseReleased(java.awt.event.MouseEvent e)
          Stops the current marquee selection.
protected  void overlay(java.awt.Graphics g)
           
 void paint(java.awt.Graphics g)
          Called after the component was repainted (ie.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

previousCursor

protected transient java.awt.Cursor previousCursor

marqueeBounds

protected java.awt.Rectangle marqueeBounds

lastVisibleRect

protected java.awt.Rectangle lastVisibleRect

startPoint

protected java.awt.Point startPoint

currentPoint

protected java.awt.Point currentPoint
Constructor Detail

BasicMarqueeHandler

public BasicMarqueeHandler()
Method Detail

isForceMarqueeEvent

public boolean isForceMarqueeEvent(java.awt.event.MouseEvent event)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Stops the current marquee selection.


mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Includes the specified startPoint in the marquee selection. Calls overlay.


paint

public void paint(java.awt.Graphics g)
Called after the component was repainted (ie. after autoscroll). This is used to indicate that the graphics is no more dirty.


overlay

protected void overlay(java.awt.Graphics g)

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Start the marquee at the specified startPoint. This invokes expandMarqueeToPoint to initialize marquee selection.


mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Empty.