de.lmu.ifi.dbs.elki.visualization.visualizers.optics
Class OPTICSPlotCutVisualization<D extends Distance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization
      extended by de.lmu.ifi.dbs.elki.visualization.visualizers.optics.AbstractOPTICSVisualization<D>
          extended by de.lmu.ifi.dbs.elki.visualization.visualizers.optics.OPTICSPlotCutVisualization<D>
Type Parameters:
D - distance type
All Implemented Interfaces:
ResultListener, DragableArea.DragListener, ContextChangeListener, Visualization, EventListener

public class OPTICSPlotCutVisualization<D extends Distance<D>>
extends AbstractOPTICSVisualization<D>
implements DragableArea.DragListener

Visualizes a cut in an OPTICS Plot to select an Epsilon value and generate a new clustering result


Nested Class Summary
static class OPTICSPlotCutVisualization.Factory
          Factory class
 
Field Summary
protected static String CSS_EPSILON
          CSS-Styles
protected static String CSS_LINE
          CSS-Styles
private  Element elementLine
          The line element
private  Element elementPoint
          The drag handle element
private  Element elemText
          The label element
private  double epsilon
          The current epsilon value.
private  DragableArea eventarea
          Sensitive (clickable) area
private static String NAME
          A short name characterizing this Visualizer.
 
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.optics.AbstractOPTICSVisualization
optics, plotheight, plotwidth
 
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization
context, layer, pendingRedraw, svgp, task
 
Constructor Summary
OPTICSPlotCutVisualization(VisualizationTask task)
          Constructor.
 
Method Summary
private  void addCSSClasses()
          Adds the required CSS-Classes
 void destroy()
          Destroy the visualization.
 boolean duringDrag(org.w3c.dom.svg.SVGPoint start, org.w3c.dom.svg.SVGPoint end, Event evt, boolean inside)
          Method called during drags.
 boolean endDrag(org.w3c.dom.svg.SVGPoint start, org.w3c.dom.svg.SVGPoint end, Event evt, boolean inside)
          Method called when a drag was ended.
protected  double getEpsilonFromY(double y)
          Get epsilon from y-value
protected  double getYFromEpsilon(double epsilon)
          Get y-value from epsilon
protected  void incrementalRedraw()
          Redraw the visualization (maybe incremental).
protected  void redraw()
          Perform a full redraw.
 boolean startDrag(org.w3c.dom.svg.SVGPoint start, Event evt)
          Action to do on drag start.
 void unsetEpsilon()
          Reset the epsilon value.
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.optics.AbstractOPTICSVisualization
getClusterOrder, makeLayerElement
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization
contextChanged, getHeight, getLayer, getWidth, resultAdded, resultChanged, resultRemoved, synchronizedRedraw, testRedraw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

private static final String NAME
A short name characterizing this Visualizer.

See Also:
Constant Field Values

CSS_LINE

protected static final String CSS_LINE
CSS-Styles

See Also:
Constant Field Values

CSS_EPSILON

protected static final 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 Element elemText
The label element


elementLine

private Element elementLine
The line element


elementPoint

private Element elementPoint
The drag handle element

Constructor Detail

OPTICSPlotCutVisualization

public OPTICSPlotCutVisualization(VisualizationTask task)
Constructor.

Parameters:
task - Task
Method Detail

redraw

protected void redraw()
Description copied from class: AbstractVisualization
Perform a full redraw.

Specified by:
redraw in class AbstractVisualization

incrementalRedraw

protected 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!

Overrides:
incrementalRedraw in class AbstractVisualization

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 interface Visualization
Overrides:
destroy in class AbstractVisualization

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,
                         Event evt)
Description copied from interface: DragableArea.DragListener
Action to do on drag start.

Specified by:
startDrag in interface DragableArea.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,
                          Event evt,
                          boolean inside)
Description copied from interface: DragableArea.DragListener
Method called during drags.

Specified by:
duringDrag in interface DragableArea.DragListener
Parameters:
start - Drag starting point
end - Drag end point
evt - The event object
inside - 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,
                       Event evt,
                       boolean inside)
Description copied from interface: DragableArea.DragListener
Method called when a drag was ended.

Specified by:
endDrag in interface DragableArea.DragListener
Parameters:
start - Drag starting point
end - Drag end point
evt - The event object
inside - 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


Release 0.4.0 (2011-09-20_1324)