public class WaypointsDragRenderer extends AbstractDragRenderer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_WIDTH |
ghostColor
Constructor and Description |
---|
WaypointsDragRenderer(DasCanvasComponent parent)
draws a boxed region of some vertical width along a path.
|
Modifier and Type | Method and Description |
---|---|
void |
addWayPoint()
add the current location, recorded from the last renderDrag operation, to the list of way points.
|
void |
clear(java.awt.Graphics g)
this is not used, and is left over from an old version of the library.
|
java.awt.Rectangle |
getBoundingBox()
return a rectangle that bounds the data.
|
int |
getWidth()
get the vertical width in pixels.
|
java.awt.Rectangle[] |
renderDrag(java.awt.Graphics g1,
java.awt.Point p1,
java.awt.Point p2)
draws the drag for mousing from p1 to p2, and returns an array of
Rectangles covering the rendering.
|
void |
setWidth(int width)
set the vertical width in pixels.
|
protected QDataSet |
whereWithin(DasAxis xaxis,
DasAxis yaxis,
QDataSet xx,
QDataSet yy)
returns a list of indices where the rank 1 yy is within the pathway.
|
getMouseDragEvent, getParent, isPointSelection, isUpdatingDragSelection, setParent
public static final java.lang.String PROP_WIDTH
public WaypointsDragRenderer(DasCanvasComponent parent)
parent
- public int getWidth()
public void setWidth(int width)
width
- public void clear(java.awt.Graphics g)
AbstractDragRenderer
clear
in interface DragRenderer
clear
in class AbstractDragRenderer
g
- the graphics contextpublic void addWayPoint()
public java.awt.Rectangle[] renderDrag(java.awt.Graphics g1, java.awt.Point p1, java.awt.Point p2)
DragRenderer
g1
- the graphics context for renderingp1
- the click pointp2
- the current mouse position during drag and release.protected QDataSet whereWithin(DasAxis xaxis, DasAxis yaxis, QDataSet xx, QDataSet yy)
xaxis
- the axis for horizontal transformsyaxis
- the axis for vertical transformsxx
- the rank 0 point for the datayy
- the rank 1 data pointspublic java.awt.Rectangle getBoundingBox()