Class OPTICSPlotSelectionVisualization.Instance

    • Field Detail

      • CSS_MARKER

        protected static final java.lang.String CSS_MARKER
        CSS class for markers
        See Also:
        Constant Field Values
      • CSS_RANGEMARKER

        protected static final java.lang.String CSS_RANGEMARKER
        CSS class for markers
        See Also:
        Constant Field Values
      • mtag

        private org.w3c.dom.Element mtag
        Element for the marker
    • Constructor Detail

      • Instance

        public Instance​(VisualizerContext context,
                        VisualizationTask task,
                        VisualizationPlot plot,
                        double width,
                        double height,
                        Projection proj)
        Constructor.
        Parameters:
        context - Visualizer context
        task - Visualization task
        plot - Plot to draw to
        width - Embedding width
        height - Embedding height
        proj - Projection
    • Method Detail

      • addMarker

        public void addMarker()
        Add marker for the selected IDs to mtag
      • addMarkerRect

        public org.w3c.dom.Element addMarkerRect​(double x1,
                                                 double width)
        Create a rectangle as marker (Marker higher than plot!)
        Parameters:
        x1 - X-Value for the marker
        width - Width of an entry
        Returns:
        SVG-Element svg-rectangle
      • startDrag

        public boolean startDrag​(org.w3c.dom.svg.SVGPoint startPoint,
                                 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:
        startPoint - 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 startPoint,
                                  org.w3c.dom.svg.SVGPoint dragPoint,
                                  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:
        startPoint - Drag starting point
        dragPoint - 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 startPoint,
                               org.w3c.dom.svg.SVGPoint dragPoint,
                               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:
        startPoint - Drag starting point
        dragPoint - Drag end point
        evt - The event object
        inside - Whether the end point was inside the area
        Returns:
        true to complete the drag
      • getInputMode

        private OPTICSPlotSelectionVisualization.Mode getInputMode​(org.w3c.dom.events.Event evt)
        Get the current input mode, on each mouse event.
        Parameters:
        evt - Mouse event.
        Returns:
        Input mode
      • getSelectedIndex

        private int getSelectedIndex​(ClusterOrder order,
                                     org.w3c.dom.svg.SVGPoint cPt)
        Gets the Index of the ClusterOrderEntry where the event occurred
        Parameters:
        order - List of ClusterOrderEntries
        cPt - clicked point
        Returns:
        Index of the object
      • updateSelection

        protected void updateSelection​(OPTICSPlotSelectionVisualization.Mode mode,
                                       int begin,
                                       int end)
        Updates the selection for the given ClusterOrderEntry.
        Parameters:
        mode - Input mode
        begin - first index to select
        end - last index to select
      • addCSSClasses

        private void addCSSClasses()
        Adds the required CSS-Classes