Class OPTICSPlotCutVisualization.Instance
- java.lang.Object
-
- elki.visualization.visualizers.AbstractVisualization
-
- elki.visualization.visualizers.optics.AbstractOPTICSVisualization
-
- elki.visualization.visualizers.optics.OPTICSPlotCutVisualization.Instance
-
- All Implemented Interfaces:
DataStoreListener
,ResultListener
,DragableArea.DragListener
,VisualizationListener
,Visualization
,java.util.EventListener
- Enclosing class:
- OPTICSPlotCutVisualization
public static class OPTICSPlotCutVisualization.Instance extends AbstractOPTICSVisualization implements DragableArea.DragListener
Instance.- Author:
- Heidi Kolb, Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
CSS_EPSILON
CSS-Stylesprotected static java.lang.String
CSS_LINE
CSS-Stylesprivate org.w3c.dom.Element
elementLine
The line elementprivate org.w3c.dom.Element
elementPoint
The drag handle elementprivate org.w3c.dom.Element
elemText
The label elementprivate double
epsilon
The current epsilon value.private DragableArea
eventarea
Sensitive (clickable) area-
Fields inherited from class elki.visualization.visualizers.optics.AbstractOPTICSVisualization
optics, plotheight, plotwidth
-
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 void
addCSSClasses()
Adds the required CSS-Classesvoid
destroy()
Destroy the visualization.boolean
duringDrag(org.w3c.dom.svg.SVGPoint start, org.w3c.dom.svg.SVGPoint end, org.w3c.dom.events.Event evt, boolean inside)
Method called during drags.boolean
endDrag(org.w3c.dom.svg.SVGPoint start, org.w3c.dom.svg.SVGPoint end, org.w3c.dom.events.Event evt, boolean inside)
Method called when a drag was ended.void
fullRedraw()
Request a full redrawing of the visualization.protected double
getEpsilonFromY(double y)
Get epsilon from y-valueprotected double
getYFromEpsilon(double epsilon)
Get y-value from epsilonvoid
incrementalRedraw()
Redraw the visualization (maybe incremental).boolean
startDrag(org.w3c.dom.svg.SVGPoint start, org.w3c.dom.events.Event evt)
Action to do on drag start.void
unsetEpsilon()
Reset the epsilon value.-
Methods inherited from class elki.visualization.visualizers.optics.AbstractOPTICSVisualization
getClusterOrder, makeLayerElement
-
Methods inherited from class elki.visualization.visualizers.AbstractVisualization
addListeners, contentChanged, getHeight, getLayer, getWidth, resultChanged, visualizationChanged
-
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_LINE
protected static final java.lang.String CSS_LINE
CSS-Styles- See Also:
- Constant Field Values
-
CSS_EPSILON
protected static final java.lang.String CSS_EPSILON
CSS-Styles- See Also:
- Constant Field Values
-
epsilon
private double epsilon
The current epsilon value.
-
eventarea
private DragableArea eventarea
Sensitive (clickable) area
-
elemText
private org.w3c.dom.Element elemText
The label element
-
elementLine
private org.w3c.dom.Element elementLine
The line element
-
elementPoint
private org.w3c.dom.Element elementPoint
The drag handle element
-
-
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:Visualization
Request a full redrawing of the visualization.- Specified by:
fullRedraw
in interfaceVisualization
- Specified by:
fullRedraw
in classAbstractVisualization
-
incrementalRedraw
public void incrementalRedraw()
Description copied from class:AbstractVisualization
Redraw the visualization (maybe incremental). Optional - by default, it will do a full redraw, which often is faster!- Specified by:
incrementalRedraw
in interfaceVisualization
- Overrides:
incrementalRedraw
in classAbstractVisualization
-
destroy
public void destroy()
Description copied from interface:Visualization
Destroy the visualization. Called after the elements have been removed from the document. Implementations should remove their listeners etc.- Specified by:
destroy
in interfaceVisualization
- Overrides:
destroy
in classAbstractVisualization
-
getEpsilonFromY
protected double getEpsilonFromY(double y)
Get epsilon from y-value- Parameters:
y
- y-Value- Returns:
- epsilon
-
getYFromEpsilon
protected double getYFromEpsilon(double epsilon)
Get y-value from epsilon- Parameters:
epsilon
- epsilon- Returns:
- y-Value
-
startDrag
public boolean startDrag(org.w3c.dom.svg.SVGPoint start, org.w3c.dom.events.Event evt)
Description copied from interface:DragableArea.DragListener
Action to do on drag start.- Specified by:
startDrag
in interfaceDragableArea.DragListener
- Parameters:
start
- Point where the drag was started.evt
- The event object- Returns:
true
to start the drag operation
-
duringDrag
public boolean duringDrag(org.w3c.dom.svg.SVGPoint start, org.w3c.dom.svg.SVGPoint end, org.w3c.dom.events.Event evt, boolean inside)
Description copied from interface:DragableArea.DragListener
Method called during drags.- Specified by:
duringDrag
in interfaceDragableArea.DragListener
- Parameters:
start
- Drag starting pointend
- Drag end pointevt
- The event objectinside
- Inside the tracked element- Returns:
true
to continue the drag
-
endDrag
public boolean endDrag(org.w3c.dom.svg.SVGPoint start, org.w3c.dom.svg.SVGPoint end, org.w3c.dom.events.Event evt, boolean inside)
Description copied from interface:DragableArea.DragListener
Method called when a drag was ended.- Specified by:
endDrag
in interfaceDragableArea.DragListener
- Parameters:
start
- Drag starting pointend
- Drag end pointevt
- The event objectinside
- Whether the end point was inside the area- Returns:
true
to complete the drag
-
unsetEpsilon
public void unsetEpsilon()
Reset the epsilon value.
-
addCSSClasses
private void addCSSClasses()
Adds the required CSS-Classes
-
-