Class AWTAbstractMouseSelector
java.lang.Object
org.jzy3d.chart.controllers.mouse.selection.AWTAbstractMouseSelector
- All Implemented Interfaces:
 MouseListener,MouseMotionListener,EventListener
- Direct Known Subclasses:
 AWTScatterMouseSelector,AWTSphereMouseSelector
public abstract class AWTAbstractMouseSelector
extends Object
implements MouseListener, MouseMotionListener
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ICanvasprotected Chartprotected booleanprotected IntegerCoord2dprotected IntegerCoord2dprotected IntegerCoord2dprotected AWTRenderer2d - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionabstract voidvoiddispose()protected voidprotected voiddrawRectangle(Graphics2D g2d, IntegerCoord2d in, IntegerCoord2d out) protected abstract voiddrawSelection(Graphics2D g, int width, int height) Drawing occurs in the selection renderer which as the dimension of the GL2 scene viewport.protected AWTRenderer2dprotected booleanmatchRectangleSelection(IntegerCoord2d in, IntegerCoord2d out, float px, float py, int width, int height) protected booleanmatchRectangleSelection(IntegerCoord2d in, IntegerCoord2d out, Coord3d projection, int width, int height) voidvoidvoidvoidvoidvoidvoidvoidprotected abstract voidprocessSelection(Scene scene, View view, int width, int height) voidprotected voidprotected voidprotected voidvoidprotected voidintx(MouseEvent e) xy(MouseEvent e) inty(MouseEvent e)  
- 
Field Details
- 
chart
 - 
canvas
 - 
dragging
protected boolean dragging - 
in
 - 
out
 - 
last
 - 
selectionRenderer
 
 - 
 - 
Constructor Details
- 
AWTAbstractMouseSelector
public AWTAbstractMouseSelector() 
 - 
 - 
Method Details
- 
dispose
public void dispose() - 
register
 - 
unregister
public void unregister() - 
initRenderer2d
 - 
processSelection
 - 
drawSelection
Drawing occurs in the selection renderer which as the dimension of the GL2 scene viewport. In other words, one should not expect to draw on the entire canvas if the GL2 scene viewport only covers a slice of the screen. As an example, the following piece of code will draw a border around the GL2 scene: g2d.drawRect(1, 1, chart.getCanvas().getRendererWidth()-2, chart.getCanvas().getRendererHeight()-2); - 
clearLastSelection
public abstract void clearLastSelection() - 
matchRectangleSelection
protected boolean matchRectangleSelection(IntegerCoord2d in, IntegerCoord2d out, Coord3d projection, int width, int height)  - 
matchRectangleSelection
protected boolean matchRectangleSelection(IntegerCoord2d in, IntegerCoord2d out, float px, float py, int width, int height) - Parameters:
 in- The mouse selection start pointout- The mouse selection end pointpx- A projected point x valuepy- A projected point y valuewidth- The canvas dimensionheight- The canvas dimension- Returns:
 - true if the point (px,py) is inside the (in,out) mouse selection of a canvas having dimensions (width, height)
 
 - 
drawRectangle
 - 
startSelection
 - 
xy
 - 
x
 - 
y
 - 
dragSelection
 - 
releaseSelection
 - 
rollOver
 - 
updateLast
protected void updateLast() - 
mousePressed
- Specified by:
 mousePressedin interfaceMouseListener
 - 
mouseReleased
- Specified by:
 mouseReleasedin interfaceMouseListener
 - 
mouseDragged
- Specified by:
 mouseDraggedin interfaceMouseMotionListener
 - 
mouseMoved
- Specified by:
 mouseMovedin interfaceMouseMotionListener
 - 
mouseWheelMoved
 - 
mouseEntered
- Specified by:
 mouseEnteredin interfaceMouseListener
 - 
mouseExited
- Specified by:
 mouseExitedin interfaceMouseListener
 - 
mouseClicked
- Specified by:
 mouseClickedin interfaceMouseListener
 
 -