Class MoveObjectsToolVisualization.Instance
- java.lang.Object
-
- elki.visualization.visualizers.AbstractVisualization
-
- elki.visualization.visualizers.scatterplot.AbstractScatterplotVisualization
-
- elki.visualization.visualizers.scatterplot.selection.MoveObjectsToolVisualization.Instance
-
- All Implemented Interfaces:
DataStoreListener,ResultListener,DragableArea.DragListener,VisualizationListener,Visualization,java.util.EventListener
- Enclosing class:
- MoveObjectsToolVisualization
public static class MoveObjectsToolVisualization.Instance extends AbstractScatterplotVisualization implements DragableArea.DragListener
Instance.- Author:
- Heidi Kolb, Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCSS_ARROWCSS tag for our event rectangleprivate org.w3c.dom.ElementrtagElement to contain the drag arrow-
Fields inherited from class elki.visualization.visualizers.scatterplot.AbstractScatterplotVisualization
proj, rel, sample
-
Fields inherited from class elki.visualization.visualizers.AbstractVisualization
context, layer, svgp, task
-
-
Constructor Summary
Constructors Constructor Description Instance(VisualizerContext context, VisualizationTask task, VisualizationPlot plot, double width, double height, Projection proj)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddCSSClasses(SVGPlot svgp)Adds the required CSS-Classesprivate voiddeleteChildren(org.w3c.dom.Element container)Delete the children of the elementbooleanduringDrag(org.w3c.dom.svg.SVGPoint startPoint, org.w3c.dom.svg.SVGPoint dragPoint, org.w3c.dom.events.Event evt, boolean inside)Method called during drags.booleanendDrag(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.voidfullRedraw()Request a full redrawing of the visualization.booleanstartDrag(org.w3c.dom.svg.SVGPoint startPoint, org.w3c.dom.events.Event evt)Action to do on drag start.private voidupdateDB(DBIDs dbids, double[] movingVector)Updates the objects with the given DBIDs It will be moved depending on the given Vector-
Methods inherited from class elki.visualization.visualizers.scatterplot.AbstractScatterplotVisualization
setupCanvas, setupCanvas, visualizationChanged
-
Methods inherited from class elki.visualization.visualizers.AbstractVisualization
addListeners, contentChanged, destroy, getHeight, getLayer, getWidth, incrementalRedraw, resultChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.result.ResultListener
resultAdded, resultRemoved
-
-
-
-
Field Detail
-
CSS_ARROW
protected static final java.lang.String CSS_ARROW
CSS tag for our event rectangle- See Also:
- Constant Field Values
-
rtag
private org.w3c.dom.Element rtag
Element to contain the drag arrow
-
-
Constructor Detail
-
Instance
public Instance(VisualizerContext context, VisualizationTask task, VisualizationPlot plot, double width, double height, Projection proj)
Constructor.- Parameters:
context- Visualizer contexttask- Taskplot- Plot to draw towidth- Embedding widthheight- Embedding heightproj- Projection
-
-
Method Detail
-
fullRedraw
public void fullRedraw()
Description copied from interface:VisualizationRequest a full redrawing of the visualization.- Specified by:
fullRedrawin interfaceVisualization- Specified by:
fullRedrawin classAbstractVisualization
-
updateDB
private void updateDB(DBIDs dbids, double[] movingVector)
Updates the objects with the given DBIDs It will be moved depending on the given Vector- Parameters:
dbids- - DBIDs of the objects to movemovingVector- - Vector for moving object
-
deleteChildren
private void deleteChildren(org.w3c.dom.Element container)
Delete the children of the element- Parameters:
container- SVG-Element
-
addCSSClasses
private void addCSSClasses(SVGPlot svgp)
Adds the required CSS-Classes- Parameters:
svgp- SVGPlot
-
startDrag
public boolean startDrag(org.w3c.dom.svg.SVGPoint startPoint, org.w3c.dom.events.Event evt)Description copied from interface:DragableArea.DragListenerAction to do on drag start.- Specified by:
startDragin interfaceDragableArea.DragListener- Parameters:
startPoint- Point where the drag was started.evt- The event object- Returns:
trueto start the drag operation
-
duringDrag
public boolean duringDrag(org.w3c.dom.svg.SVGPoint startPoint, org.w3c.dom.svg.SVGPoint dragPoint, org.w3c.dom.events.Event evt, boolean inside)Description copied from interface:DragableArea.DragListenerMethod called during drags.- Specified by:
duringDragin interfaceDragableArea.DragListener- Parameters:
startPoint- Drag starting pointdragPoint- Drag end pointevt- The event objectinside- Inside the tracked element- Returns:
trueto continue the drag
-
endDrag
public boolean endDrag(org.w3c.dom.svg.SVGPoint startPoint, org.w3c.dom.svg.SVGPoint dragPoint, org.w3c.dom.events.Event evt, boolean inside)Description copied from interface:DragableArea.DragListenerMethod called when a drag was ended.- Specified by:
endDragin interfaceDragableArea.DragListener- Parameters:
startPoint- Drag starting pointdragPoint- Drag end pointevt- The event objectinside- Whether the end point was inside the area- Returns:
trueto complete the drag
-
-