Class OPTICSPlotCutVisualization.Instance

    • Field Detail

      • 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 context
        task - Task
        plot - Plot to draw to
        width - Embedding width
        height - Embedding height
        proj - Projection
    • Method Detail

      • 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,
                                 org.w3c.dom.events.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,
                                  org.w3c.dom.events.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,
                               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 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