public class BasicMarqueeHandler extends Object
Modifier and Type | Field and Description |
---|---|
protected Point2D |
currentPoint |
protected Rectangle2D |
marqueeBounds |
protected Cursor |
previousCursor |
protected Point2D |
startPoint |
Constructor and Description |
---|
BasicMarqueeHandler() |
Modifier and Type | Method and Description |
---|---|
Point2D |
getCurrentPoint()
Returns the currentPoint.
|
static JGraph |
getGraphForEvent(MouseEvent event) |
Rectangle2D |
getMarqueeBounds()
Returns the marqueeBounds.
|
Cursor |
getPreviousCursor()
Returns the previousCursor.
|
Point2D |
getStartPoint()
Returns the startPoint.
|
void |
handleMarqueeEvent(MouseEvent e,
JGraph graph,
Rectangle2D bounds)
Hook for subclassers.
|
boolean |
isForceMarqueeEvent(MouseEvent event) |
boolean |
isMarqueeTriggerEvent(MouseEvent e,
JGraph graph)
Hook for subclassers.
|
void |
mouseDragged(MouseEvent e)
Includes the specified startPoint in the marquee selection.
|
void |
mouseMoved(MouseEvent e)
Empty.
|
void |
mousePressed(MouseEvent e)
Start the marquee at the specified startPoint.
|
void |
mouseReleased(MouseEvent e)
Stops the current marquee selection.
|
void |
overlay(JGraph graph,
Graphics g,
boolean clear)
Draw the current state of the handler.
|
void |
paint(JGraph graph,
Graphics g)
Called after the component was repainted (after autoscroll).
|
protected void |
processMouseDraggedEvent(MouseEvent e)
Called from mouse dragged to update the marquee state during a repaint.
|
void |
setCurrentPoint(Point2D currentPoint)
Sets the currentPoint.
|
void |
setMarqueeBounds(Rectangle2D marqueeBounds)
Sets the marqueeBounds.
|
void |
setPreviousCursor(Cursor previousCursor)
Sets the previousCursor.
|
void |
setStartPoint(Point2D startPoint)
Sets the startPoint.
|
protected transient Cursor previousCursor
protected Rectangle2D marqueeBounds
protected Point2D startPoint
protected Point2D currentPoint
public boolean isForceMarqueeEvent(MouseEvent event)
public void mouseReleased(MouseEvent e)
public void handleMarqueeEvent(MouseEvent e, JGraph graph, Rectangle2D bounds)
public void mouseDragged(MouseEvent e)
protected void processMouseDraggedEvent(MouseEvent e)
public void paint(JGraph graph, Graphics g)
public void overlay(JGraph graph, Graphics g, boolean clear)
g
- public void mousePressed(MouseEvent e)
public boolean isMarqueeTriggerEvent(MouseEvent e, JGraph graph)
public void mouseMoved(MouseEvent e)
public Point2D getCurrentPoint()
public Rectangle2D getMarqueeBounds()
public Cursor getPreviousCursor()
public Point2D getStartPoint()
public void setCurrentPoint(Point2D currentPoint)
currentPoint
- The currentPoint to setpublic void setMarqueeBounds(Rectangle2D marqueeBounds)
marqueeBounds
- The marqueeBounds to setpublic void setPreviousCursor(Cursor previousCursor)
previousCursor
- The previousCursor to setpublic void setStartPoint(Point2D startPoint)
startPoint
- The startPoint to setpublic static JGraph getGraphForEvent(MouseEvent event)
Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.