public class SelectionToolCubeVisualization.Instance extends AbstractScatterplotVisualization implements DragableArea.DragListener
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CSS_RANGEMARKER
Generic tag to indicate the type of element.
|
private int |
dim
Dimension.
|
private org.w3c.dom.Element |
rtag
Element for selection rectangle.
|
proj, rel, sample
context, layer, svgp, task
Constructor and Description |
---|
Instance(VisualizerContext context,
VisualizationTask task,
VisualizationPlot plot,
double width,
double height,
Projection proj)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCSSClasses(SVGPlot svgp)
Adds the required CSS-Classes.
|
private void |
deleteChildren(org.w3c.dom.Element container)
Delete the children of the element.
|
boolean |
duringDrag(org.w3c.dom.svg.SVGPoint startPoint,
org.w3c.dom.svg.SVGPoint dragPoint,
org.w3c.dom.events.Event evt,
boolean inside)
Method called during drags.
|
boolean |
endDrag(org.w3c.dom.svg.SVGPoint startPoint,
org.w3c.dom.svg.SVGPoint dragPoint,
org.w3c.dom.events.Event evt,
boolean inside)
Method called when a drag was ended.
|
void |
fullRedraw()
Request a full redrawing of the visualization.
|
boolean |
startDrag(org.w3c.dom.svg.SVGPoint startPoint,
org.w3c.dom.events.Event evt)
Action to do on drag start.
|
private void |
updateSelection(org.w3c.dom.svg.SVGPoint p1,
org.w3c.dom.svg.SVGPoint p2)
Update the selection in the context.
|
private void |
updateSelectionRectKoordinates(double x1,
double x2,
double y1,
double y2,
ModifiableHyperBoundingBox ranges)
Set the selected ranges and the mask for the actual dimensions in the
context.
|
setupCanvas, setupCanvas, visualizationChanged
addListeners, contentChanged, destroy, getHeight, getLayer, getWidth, incrementalRedraw, resultAdded, resultChanged, resultRemoved
private static final java.lang.String CSS_RANGEMARKER
private int dim
private org.w3c.dom.Element rtag
public Instance(VisualizerContext context, VisualizationTask task, VisualizationPlot plot, double width, double height, Projection proj)
context
- Visualizer contexttask
- Taskplot
- Plot to draw towidth
- Embedding widthheight
- Embedding heightproj
- Projectionpublic void fullRedraw()
Visualization
fullRedraw
in interface Visualization
fullRedraw
in class AbstractVisualization
private void deleteChildren(org.w3c.dom.Element container)
container
- SVG-Elementprivate void updateSelectionRectKoordinates(double x1, double x2, double y1, double y2, ModifiableHyperBoundingBox ranges)
x1
- x-value of the first dimensionx2
- x-value of the second dimensiony1
- y-value of the first dimensiony2
- y-value of the second dimensionranges
- Ranges to updatepublic boolean startDrag(org.w3c.dom.svg.SVGPoint startPoint, org.w3c.dom.events.Event evt)
DragableArea.DragListener
startDrag
in interface DragableArea.DragListener
startPoint
- Point where the drag was started.evt
- The event objecttrue
to start the drag operationpublic boolean duringDrag(org.w3c.dom.svg.SVGPoint startPoint, org.w3c.dom.svg.SVGPoint dragPoint, org.w3c.dom.events.Event evt, boolean inside)
DragableArea.DragListener
duringDrag
in interface DragableArea.DragListener
startPoint
- Drag starting pointdragPoint
- Drag end pointevt
- The event objectinside
- Inside the tracked elementtrue
to continue the dragpublic boolean endDrag(org.w3c.dom.svg.SVGPoint startPoint, org.w3c.dom.svg.SVGPoint dragPoint, org.w3c.dom.events.Event evt, boolean inside)
DragableArea.DragListener
endDrag
in interface DragableArea.DragListener
startPoint
- Drag starting pointdragPoint
- Drag end pointevt
- The event objectinside
- Whether the end point was inside the areatrue
to complete the dragprivate void updateSelection(org.w3c.dom.svg.SVGPoint p1, org.w3c.dom.svg.SVGPoint p2)
p1
- First Point of the selected rectanglep2
- Second Point of the selected rectangleprotected void addCSSClasses(SVGPlot svgp)
svgp
- SVG-PlotCopyright © 2019 ELKI Development Team. License information.