
D - distance typepublic class OPTICSPlotSelectionVisualization.Instance<D extends Distance<D>> extends AbstractOPTICSVisualization<D> implements DragableArea.DragListener
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CSS_MARKER
CSS class for markers
|
protected static String |
CSS_RANGEMARKER
CSS class for markers
|
private Element |
etag
Element for the events
|
private Element |
mtag
Element for the marker
|
optics, plotheight, plotwidthcontext, layer, pendingRedraw, svgp, task| Constructor and Description |
|---|
OPTICSPlotSelectionVisualization.Instance(VisualizationTask task)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
addCSSClasses()
Adds the required CSS-Classes
|
void |
addMarker()
Add marker for the selected IDs to mtag
|
Element |
addMarkerRect(double x1,
double width)
Create a rectangle as marker (Marker higher than plot!)
|
boolean |
duringDrag(org.w3c.dom.svg.SVGPoint startPoint,
org.w3c.dom.svg.SVGPoint dragPoint,
Event evt,
boolean inside)
Method called during drags.
|
boolean |
endDrag(org.w3c.dom.svg.SVGPoint startPoint,
org.w3c.dom.svg.SVGPoint dragPoint,
Event evt,
boolean inside)
Method called when a drag was ended.
|
private OPTICSPlotSelectionVisualization.Mode |
getInputMode(Event evt)
Get the current input mode, on each mouse event.
|
private int |
getSelectedIndex(List<ClusterOrderEntry<D>> order,
org.w3c.dom.svg.SVGPoint cPt)
Gets the Index of the ClusterOrderEntry where the event occurred
|
protected void |
redraw()
Perform a full redraw.
|
void |
resultChanged(Result current)
Notify that the current result has changed substantially.
|
boolean |
startDrag(org.w3c.dom.svg.SVGPoint startPoint,
Event evt)
Action to do on drag start.
|
protected void |
updateSelection(OPTICSPlotSelectionVisualization.Mode mode,
int begin,
int end)
Updates the selection for the given ClusterOrderEntry.
|
getClusterOrder, makeLayerElementcontentChanged, destroy, getHeight, getLayer, getWidth, incrementalRedraw, resultAdded, resultRemoved, synchronizedRedrawprotected static final String CSS_MARKER
protected static final String CSS_RANGEMARKER
private Element etag
private Element mtag
public OPTICSPlotSelectionVisualization.Instance(VisualizationTask task)
task - Visualization taskprotected void redraw()
AbstractVisualizationredraw in class AbstractVisualizationpublic void addMarker()
public Element addMarkerRect(double x1, double width)
x1 - X-Value for the markerwidth - Width of an entrypublic boolean startDrag(org.w3c.dom.svg.SVGPoint startPoint, Event evt)
DragableArea.DragListenerstartDrag in interface DragableArea.DragListenerstartPoint - 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, Event evt, boolean inside)
DragableArea.DragListenerduringDrag in interface DragableArea.DragListenerstartPoint - 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, Event evt, boolean inside)
DragableArea.DragListenerendDrag in interface DragableArea.DragListenerstartPoint - Drag starting pointdragPoint - Drag end pointevt - The event objectinside - Whether the end point was inside the areatrue to complete the dragprivate OPTICSPlotSelectionVisualization.Mode getInputMode(Event evt)
evt - Mouse event.private int getSelectedIndex(List<ClusterOrderEntry<D>> order, org.w3c.dom.svg.SVGPoint cPt)
order - List of ClusterOrderEntriescPt - clicked pointprotected void updateSelection(OPTICSPlotSelectionVisualization.Mode mode, int begin, int end)
mode - Input modebegin - first index to selectend - last index to selectprivate void addCSSClasses()
public void resultChanged(Result current)
ResultListenerresultChanged in interface ResultListenerresultChanged in class AbstractVisualizationcurrent - Result that has changed.