org.das2.event.DragRenderer
A DragRenderer provides the feedback to the human operator
of what their mousing is doing. It applies constraints to the
drag as well. It promotes the AWT mouse events into events
that represent the operation, implementing for example mouse
gestures.
ghostColor
use this color when drawing ghostly backgrounds for contrast.
clear
clear( java.awt.Graphics g ) → void
clears whatever renderDrag rendered. This is not used by the DasMouseInputAdapter,
but must still be supported for now. Originally the drag renderer would have
to unpaint itself as well, but this is no longer used.
Parameters
g - the graphics context
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getMouseDragEvent
getMouseDragEvent( Object source, java.awt.Point p1, java.awt.Point p2, boolean isModified ) → MouseDragEvent
promotes the drag begin and end into a mouseDragEvent.
Parameters
source - an Object
p1 - the click point
p2 - the current mouse position during drag and release.
isModified - a boolean
Returns:
an org.das2.event.MouseDragEvent
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
isPointSelection
isPointSelection( ) → boolean
indicates that the mouse module's mousePointSelected() should be called as new mouse events come in.
Returns:
true if the mouse module should receive events during the drag.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
isUpdatingDragSelection
isUpdatingDragSelection( ) → boolean
range selection events should be fired during drag.
Returns:
true if selection events should be fired during drag.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
renderDrag
renderDrag( java.awt.Graphics g, java.awt.Point p1, java.awt.Point p2 ) → Rectangle
draws the drag for mousing from p1 to p2, and returns an array of
Rectangles covering the rendering. If nothing is drawn, then an
array of length zero should be returned, and nulls are allowed in the
array. p1 and p2, and g are in the canvas frame of reference.
Parameters
g - the graphics context for rendering
p1 - the click point
p2 - the current mouse position during drag and release.
Returns:
a java.awt.Rectangle[]
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]