Class CircleSegmentsVisualizer.Instance

    • Field Detail

      • SEGMENT_MIN_ANGLE

        private static final double SEGMENT_MIN_ANGLE
        Minimum width (radian) of Segment
        See Also:
        Constant Field Values
      • SEGMENT_MIN_SEP_ANGLE

        private static final double SEGMENT_MIN_SEP_ANGLE
        Gap (radian) between segments
        See Also:
        Constant Field Values
      • RADIUS_INNER

        private static final double RADIUS_INNER
        Offset from center to first ring
        See Also:
        Constant Field Values
      • RADIUS_DISTANCE

        private static final double RADIUS_DISTANCE
        Margin between two rings
        See Also:
        Constant Field Values
      • RADIUS_OUTER

        private static final double RADIUS_OUTER
        Radius of whole CircleSegments except selection border
        See Also:
        Constant Field Values
      • RADIUS_SELECTION

        private static final double RADIUS_SELECTION
        Radius of highlight selection (outer ring)
        See Also:
        Constant Field Values
      • CLR_CLUSTER_CLASS_PREFIX

        private static final java.lang.String CLR_CLUSTER_CLASS_PREFIX
        CSS class name for the clusterings.
        See Also:
        Constant Field Values
      • CLR_BORDER_CLASS

        public static final java.lang.String CLR_BORDER_CLASS
        CSS border class of a cluster
        See Also:
        Constant Field Values
      • CLR_UNPAIRED_CLASS

        public static final java.lang.String CLR_UNPAIRED_CLASS
        CSS hover class for clusters of hovered segment
        See Also:
        Constant Field Values
      • CLR_HOVER_CLASS

        public static final java.lang.String CLR_HOVER_CLASS
        CSS hover class of a segment cluster
        See Also:
        Constant Field Values
      • SEG_UNPAIRED_SELECTED_CLASS

        public static final java.lang.String SEG_UNPAIRED_SELECTED_CLASS
        CSS class of selected Segment
        See Also:
        Constant Field Values
      • STYLE_BORDER

        public static final java.lang.String STYLE_BORDER
        Style for border lines
        See Also:
        Constant Field Values
      • STYLE_HOVER

        public static final java.lang.String STYLE_HOVER
        Style for hover effect
        See Also:
        Constant Field Values
      • STYLE_GRADIENT_FIRST

        public static final java.lang.String STYLE_GRADIENT_FIRST
        First color for producing segment-cluster colors
        See Also:
        Constant Field Values
      • STYLE_GRADIENT_SECOND

        public static final java.lang.String STYLE_GRADIENT_SECOND
        Second color for producing segment-cluster colors
        See Also:
        Constant Field Values
      • segments

        protected final Segments segments
        Segmentation of Clusterings
      • visLayer

        private org.w3c.dom.Element visLayer
        The two main layers
      • ctrlLayer

        private org.w3c.dom.Element ctrlLayer
        The two main layers
      • segmentToElements

        public java.util.Map<Segment,​java.util.List<org.w3c.dom.Element>> segmentToElements
        Map to connect segments to their visual elements
      • showUnclusteredPairs

        boolean showUnclusteredPairs
        Show unclustered Pairs in CircleSegments
      • noIncrementalRedraw

        private boolean noIncrementalRedraw
        Flag to disallow an incremental redraw
    • Constructor Detail

      • Instance

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

      • toggleUnclusteredPairs

        public void toggleUnclusteredPairs​(boolean show)
      • addCSSClasses

        protected void addCSSClasses​(int maxClusterSize)
        Define and add required CSS classes
      • drawSegments

        private void drawSegments()
        Create the segments
      • redrawSelection

        private void redrawSelection()
      • makeGradient

        protected java.lang.String[] makeGradient​(int shades,
                                                  java.lang.String[] colors)
        Creates a gradient over a set of colors
        Parameters:
        shades - number of colors in the gradient
        colors - colors for the gradient
        Returns:
        array of colors for CSS
      • drawClusteringInfo

        protected org.w3c.dom.Element drawClusteringInfo()
      • segmentHover

        protected void segmentHover​(Segment segment,
                                    int ringid,
                                    boolean active)
      • segmentClick

        protected void segmentClick​(Segment segment,
                                    org.w3c.dom.events.Event evt,
                                    boolean dblClick)