public class LabelDragRenderer extends AbstractDragRenderer
ghostColor
Constructor and Description |
---|
LabelDragRenderer()
create an instance, and presumably the mouse module will set the parent.
|
LabelDragRenderer(DasCanvasComponent parent)
create an instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addDirtyBounds(java.awt.Rectangle dirty) |
protected void |
addDirtyBounds(java.awt.Rectangle[] dirty) |
void |
clear(java.awt.Graphics g)
this is not used, and is left over from an old version of the library.
|
protected java.awt.Rectangle[] |
getDirtyBounds() |
MouseDragEvent |
getMouseDragEvent(java.lang.Object source,
java.awt.Point p1,
java.awt.Point p2,
boolean isModified)
This method is called by the DMIA on mouse release.
|
boolean |
isPointSelection()
indicates that MM.mousePointSelected() should called as new mouse events
come in.
|
boolean |
isTooltip() |
boolean |
isUpdatingDragSelection()
range selection events should be fired during drag.
|
java.awt.Rectangle[] |
renderDrag(java.awt.Graphics g,
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.
|
protected void |
resetDirtyBounds() |
void |
setLabel(java.lang.String s)
set the label to be drawn.
|
void |
setTooltip(boolean tooltip) |
getParent, setParent
public LabelDragRenderer(DasCanvasComponent parent)
parent
- component sourcing the mouse events, typically a DasPlot.public LabelDragRenderer()
public void clear(java.awt.Graphics g)
AbstractDragRenderer
clear
in interface DragRenderer
clear
in class AbstractDragRenderer
g
- the graphics contextpublic MouseDragEvent getMouseDragEvent(java.lang.Object source, java.awt.Point p1, java.awt.Point p2, boolean isModified)
getMouseDragEvent
in interface DragRenderer
getMouseDragEvent
in class AbstractDragRenderer
p1
- the click pointp2
- the current mouse position during drag and release.public boolean isPointSelection()
AbstractDragRenderer
isPointSelection
in interface DragRenderer
isPointSelection
in class AbstractDragRenderer
public boolean isUpdatingDragSelection()
AbstractDragRenderer
isUpdatingDragSelection
in interface DragRenderer
isUpdatingDragSelection
in class AbstractDragRenderer
public void setLabel(java.lang.String s)
s
- the label, which can contain Granny control sequences like !A and !n.http://autoplot.org/help#Granny_Strings
public java.awt.Rectangle[] renderDrag(java.awt.Graphics g, java.awt.Point p1, java.awt.Point p2)
DragRenderer
g
- the graphics context for renderingp1
- the click pointp2
- the current mouse position during drag and release.protected void resetDirtyBounds()
protected void addDirtyBounds(java.awt.Rectangle[] dirty)
protected void addDirtyBounds(java.awt.Rectangle dirty)
protected java.awt.Rectangle[] getDirtyBounds()
public boolean isTooltip()
public void setTooltip(boolean tooltip)