JGraphpad Pro
v6.0.5.0


com.jgraph.editor.factory
Class JGraphEditorToolbox.MarqueeRedirector

java.lang.Object
  extended byorg.jgraph.graph.BasicMarqueeHandler
      extended bycom.jgraph.editor.factory.JGraphEditorToolbox.MarqueeRedirector
Enclosing class:
JGraphEditorToolbox

public class JGraphEditorToolbox.MarqueeRedirector
extends org.jgraph.graph.BasicMarqueeHandler

A class that redirects marquee events to the marquee handler it replaces or to the selection tool of the enclosing toolbox depending on the return value of BasicMarqueeHandler.isForceMarqueeEvent(MouseEvent) of the JGraphEditorToolbox.previousMarqueeHandler.


Field Summary
protected  boolean redirect
          Indicates whether the initial isForceMarqueeEvent returned true.
 
Fields inherited from class org.jgraph.graph.BasicMarqueeHandler
currentPoint, marqueeBounds, previousCursor, startPoint
 
Constructor Summary
JGraphEditorToolbox.MarqueeRedirector()
           
 
Method Summary
 boolean isForceMarqueeEvent(MouseEvent event)
          Returns true if the tool wants to take control of an interaction, ie.
 void mouseDragged(MouseEvent event)
          Overrides the basic marquee handler by redirecting to the previous marquee handler or selection tool's mouseDragged method.
 void mouseMoved(MouseEvent event)
          Overrides the basic marquee handler to display the selection tool cursor and redirect to the selection tool.
 void mousePressed(MouseEvent event)
          Overrides the basic marquee handler by redirecting to the previous marquee handler or selection tool's mousePressed method.
 void mouseReleased(MouseEvent event)
          Overrides the basic marquee handler by redirecting to the previous marquee handler or selection tool's mouseReleased method.
 void overlay(org.jgraph.JGraph graph, Graphics g, boolean clear)
          Overrides the overlay method to redirect to the selection tool.
 void paint(org.jgraph.JGraph graph, Graphics g)
          Overrides the paint method to redirect to the selection tool.
 
Methods inherited from class org.jgraph.graph.BasicMarqueeHandler
getCurrentPoint, getGraphForEvent, getMarqueeBounds, getPreviousCursor, getStartPoint, handleMarqueeEvent, isMarqueeTriggerEvent, processMouseDraggedEvent, setCurrentPoint, setMarqueeBounds, setPreviousCursor, setStartPoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

redirect

protected boolean redirect
Indicates whether the initial isForceMarqueeEvent returned true.

Constructor Detail

JGraphEditorToolbox.MarqueeRedirector

public JGraphEditorToolbox.MarqueeRedirector()
Method Detail

isForceMarqueeEvent

public boolean isForceMarqueeEvent(MouseEvent event)
Returns true if the tool wants to take control of an interaction, ie. if it handles the sequence of events, or if the previous marquee handler wants to do so.

Parameters:
event - The object that describes the event.
Returns:
Returns the true if the event is handled.

mousePressed

public void mousePressed(MouseEvent event)
Overrides the basic marquee handler by redirecting to the previous marquee handler or selection tool's mousePressed method.

Parameters:
event - The object that describes the event.

mouseDragged

public void mouseDragged(MouseEvent event)
Overrides the basic marquee handler by redirecting to the previous marquee handler or selection tool's mouseDragged method.

Parameters:
event - The object that describes the event.

mouseReleased

public void mouseReleased(MouseEvent event)
Overrides the basic marquee handler by redirecting to the previous marquee handler or selection tool's mouseReleased method.

Parameters:
event - The object that describes the event.

mouseMoved

public void mouseMoved(MouseEvent event)
Overrides the basic marquee handler to display the selection tool cursor and redirect to the selection tool.

Parameters:
event - The object that describes the event.

paint

public void paint(org.jgraph.JGraph graph,
                  Graphics g)
Overrides the paint method to redirect to the selection tool.

Parameters:
graph - The graph to perform the preview in.
g - The graphics object to be used for painting.

overlay

public void overlay(org.jgraph.JGraph graph,
                    Graphics g,
                    boolean clear)
Overrides the overlay method to redirect to the selection tool.

Parameters:
graph - The graph to perform the preview in.
g - The graphics object to be used for painting.
clear - Specifies if the canvas should be cleared.

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.