org.jgraph.graph.BasicMarqueeHandler Class Reference

Inheritance diagram for org.jgraph.graph.BasicMarqueeHandler:

manas.event.MyMarqueeHandler List of all members.

Public Member Functions

boolean isForceMarqueeEvent (MouseEvent event)
void mouseReleased (MouseEvent e)
void handleMarqueeEvent (MouseEvent e, JGraph graph, Rectangle2D bounds)
void mouseDragged (MouseEvent e)
void paint (JGraph graph, Graphics g)
void overlay (JGraph graph, Graphics g, boolean clear)
void mousePressed (MouseEvent e)
boolean isMarqueeTriggerEvent (MouseEvent e, JGraph graph)
void mouseMoved (MouseEvent e)
Point2D getCurrentPoint ()
Rectangle2D getMarqueeBounds ()
Cursor getPreviousCursor ()
Point2D getStartPoint ()
void setCurrentPoint (Point2D currentPoint)
void setMarqueeBounds (Rectangle2D marqueeBounds)
void setPreviousCursor (Cursor previousCursor)
void setStartPoint (Point2D startPoint)

Static Public Member Functions

static JGraph getGraphForEvent (MouseEvent event)

Protected Member Functions

void processMouseDraggedEvent (MouseEvent e)

Protected Attributes

transient Cursor previousCursor = null
Rectangle2D marqueeBounds
Point2D startPoint
Point2D currentPoint

Detailed Description

A simple implementation of a marquee handler for JGraph.

Version:
1.0 1/1/02
Author:
Gaudenz Alder


Member Function Documentation

Point2D org.jgraph.graph.BasicMarqueeHandler.getCurrentPoint  ) 
 

Returns the currentPoint.

Returns:
Point

static JGraph org.jgraph.graph.BasicMarqueeHandler.getGraphForEvent MouseEvent  event  )  [static]
 

Returns:
Returns the source of the manas.event as a graph.

Rectangle2D org.jgraph.graph.BasicMarqueeHandler.getMarqueeBounds  ) 
 

Returns the marqueeBounds.

Returns:
Rectangle

Cursor org.jgraph.graph.BasicMarqueeHandler.getPreviousCursor  ) 
 

Returns the previousCursor.

Returns:
Cursor

Point2D org.jgraph.graph.BasicMarqueeHandler.getStartPoint  ) 
 

Returns the startPoint.

Returns:
Point

void org.jgraph.graph.BasicMarqueeHandler.handleMarqueeEvent MouseEvent  e,
JGraph  graph,
Rectangle2D  bounds
 

Hook for subclassers. Current implementation checks if graph selection is enabled. This is called from mouseReleased to execute the marquee selection.

boolean org.jgraph.graph.BasicMarqueeHandler.isForceMarqueeEvent MouseEvent  event  ) 
 

Reimplemented in manas.event.MyMarqueeHandler.

boolean org.jgraph.graph.BasicMarqueeHandler.isMarqueeTriggerEvent MouseEvent  e,
JGraph  graph
 

Hook for subclassers. Current implementation checks if graph selection is enabled. This is called from mousePressed before initiating the marquee selection.

void org.jgraph.graph.BasicMarqueeHandler.mouseDragged MouseEvent  e  ) 
 

Includes the specified startPoint in the marquee selection. Calls overlay.

Reimplemented in manas.event.MyMarqueeHandler.

void org.jgraph.graph.BasicMarqueeHandler.mouseMoved MouseEvent  e  ) 
 

Empty.

Reimplemented in manas.event.MyMarqueeHandler.

void org.jgraph.graph.BasicMarqueeHandler.mousePressed MouseEvent  e  ) 
 

Start the marquee at the specified startPoint. This invokes expandMarqueeToPoint to initialize marquee selection.

void org.jgraph.graph.BasicMarqueeHandler.mouseReleased MouseEvent  e  ) 
 

Stops the current marquee selection.

Reimplemented in manas.event.MyMarqueeHandler.

void org.jgraph.graph.BasicMarqueeHandler.overlay JGraph  graph,
Graphics  g,
boolean  clear
 

Draw the current state of the handler. This is called twice by the overlay method and also by the paint method. The caller's intention is that the overlay method draws exactly the current state of the handler so that it may be used for XOR paint. The drag method calls overlay, changes the state, and calls overlay again to use this. However, since it is not always possible to clear the screen with an exact repaint the caller passes a flag to indicate if the graphics object should be cleared with this call (eg. if a subsequent call follows).

Parameters:
g 

void org.jgraph.graph.BasicMarqueeHandler.paint JGraph  graph,
Graphics  g
 

Called after the component was repainted (after autoscroll). This is used to indicate that the graphics is no more dirty.

void org.jgraph.graph.BasicMarqueeHandler.processMouseDraggedEvent MouseEvent  e  )  [protected]
 

Called from mouse dragged to update the marquee state during a repaint.

void org.jgraph.graph.BasicMarqueeHandler.setCurrentPoint Point2D  currentPoint  ) 
 

Sets the currentPoint.

Parameters:
currentPoint The currentPoint to set

void org.jgraph.graph.BasicMarqueeHandler.setMarqueeBounds Rectangle2D  marqueeBounds  ) 
 

Sets the marqueeBounds.

Parameters:
marqueeBounds The marqueeBounds to set

void org.jgraph.graph.BasicMarqueeHandler.setPreviousCursor Cursor  previousCursor  ) 
 

Sets the previousCursor.

Parameters:
previousCursor The previousCursor to set

void org.jgraph.graph.BasicMarqueeHandler.setStartPoint Point2D  startPoint  ) 
 

Sets the startPoint.

Parameters:
startPoint The startPoint to set


Member Data Documentation

Point2D org.jgraph.graph.BasicMarqueeHandler.currentPoint [protected]
 

Rectangle2D org.jgraph.graph.BasicMarqueeHandler.marqueeBounds [protected]
 

transient Cursor org.jgraph.graph.BasicMarqueeHandler.previousCursor = null [protected]
 

Point2D org.jgraph.graph.BasicMarqueeHandler.startPoint [protected]
 


The documentation for this class was generated from the following file:
Generated on Sun May 28 19:13:13 2006 for Digimod by  doxygen 1.4.6-NO