public class CircleSegmentsVisualizer.Instance extends AbstractVisualization implements ResultListener
Modifier and Type | Class and Description |
---|---|
private class |
CircleSegmentsVisualizer.Instance.SegmentListenerProxy
Proxy element to connect signals.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLR_BORDER_CLASS
CSS border class of a cluster
|
private static java.lang.String |
CLR_CLUSTER_CLASS_PREFIX
CSS class name for the clusterings.
|
static java.lang.String |
CLR_HOVER_CLASS
CSS hover class of a segment cluster
|
static java.lang.String |
CLR_UNPAIRED_CLASS
CSS hover class for clusters of hovered segment
|
private org.w3c.dom.Element |
ctrlLayer
The two main layers
|
private boolean |
noIncrementalRedraw
Flag to disallow an incremental redraw
|
protected SegmentsStylingPolicy |
policy
Styling policy
|
private static double |
RADIUS_DISTANCE
Margin between two rings
|
private static double |
RADIUS_INNER
Offset from center to first ring
|
private static double |
RADIUS_OUTER
Radius of whole CircleSegments except selection border
|
private static double |
RADIUS_SELECTION
Radius of highlight selection (outer ring)
|
static java.lang.String |
SEG_UNPAIRED_SELECTED_CLASS
CSS class of selected Segment
|
private static double |
SEGMENT_MIN_ANGLE
Minimum width (radian) of Segment
|
private static double |
SEGMENT_MIN_SEP_ANGLE
Gap (radian) between segments
|
protected Segments |
segments
Segmentation of Clusterings
|
java.util.Map<Segment,java.util.List<org.w3c.dom.Element>> |
segmentToElements
Map to connect segments to their visual elements
|
(package private) boolean |
showUnclusteredPairs
Show unclustered Pairs in CircleSegments
|
static java.lang.String |
STYLE
Style prefix
|
static java.lang.String |
STYLE_BORDER
Style for border lines
|
static java.lang.String |
STYLE_GRADIENT_FIRST
First color for producing segment-cluster colors
|
static java.lang.String |
STYLE_GRADIENT_SECOND
Second color for producing segment-cluster colors
|
static java.lang.String |
STYLE_HOVER
Style for hover effect
|
private org.w3c.dom.Element |
visLayer
The two main layers
|
context, layer, svgp, task
Constructor and Description |
---|
Instance(VisualizerContext context,
VisualizationTask task,
VisualizationPlot plot,
double width,
double height)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCSSClasses(int maxClusterSize)
Define and add required CSS classes
|
protected org.w3c.dom.Element |
drawClusteringInfo() |
private void |
drawSegments()
Create the segments
|
void |
fullRedraw()
Request a full redrawing of the visualization.
|
void |
incrementalRedraw()
Redraw the visualization (maybe incremental).
|
protected java.lang.String[] |
makeGradient(int shades,
java.lang.String[] colors)
Creates a gradient over a set of colors
|
private void |
redrawSelection() |
void |
resultChanged(Result current)
Notify that the current result has changed substantially.
|
protected void |
segmentClick(Segment segment,
org.w3c.dom.events.Event evt,
boolean dblClick) |
protected void |
segmentHover(Segment segment,
int ringid,
boolean active) |
void |
toggleUnclusteredPairs(boolean show) |
addListeners, contentChanged, destroy, getHeight, getLayer, getWidth, resultAdded, resultRemoved, visualizationChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resultAdded, resultRemoved
private static final double SEGMENT_MIN_ANGLE
private static final double SEGMENT_MIN_SEP_ANGLE
private static final double RADIUS_INNER
private static final double RADIUS_DISTANCE
private static final double RADIUS_OUTER
private static final double RADIUS_SELECTION
private static final java.lang.String CLR_CLUSTER_CLASS_PREFIX
public static final java.lang.String CLR_BORDER_CLASS
public static final java.lang.String CLR_UNPAIRED_CLASS
public static final java.lang.String CLR_HOVER_CLASS
public static final java.lang.String SEG_UNPAIRED_SELECTED_CLASS
public static final java.lang.String STYLE
public static final java.lang.String STYLE_BORDER
public static final java.lang.String STYLE_HOVER
public static final java.lang.String STYLE_GRADIENT_FIRST
public static final java.lang.String STYLE_GRADIENT_SECOND
protected final Segments segments
private org.w3c.dom.Element visLayer
private org.w3c.dom.Element ctrlLayer
public java.util.Map<Segment,java.util.List<org.w3c.dom.Element>> segmentToElements
boolean showUnclusteredPairs
protected final SegmentsStylingPolicy policy
private boolean noIncrementalRedraw
public Instance(VisualizerContext context, VisualizationTask task, VisualizationPlot plot, double width, double height)
context
- Visualizer contexttask
- Taskplot
- Plot to draw towidth
- Embedding widthheight
- Embedding heightpublic void toggleUnclusteredPairs(boolean show)
public void resultChanged(Result current)
ResultListener
resultChanged
in interface ResultListener
resultChanged
in class AbstractVisualization
current
- Result that has changed.public void incrementalRedraw()
AbstractVisualization
incrementalRedraw
in interface Visualization
incrementalRedraw
in class AbstractVisualization
public void fullRedraw()
Visualization
fullRedraw
in interface Visualization
fullRedraw
in class AbstractVisualization
protected void addCSSClasses(int maxClusterSize)
private void drawSegments()
private void redrawSelection()
protected java.lang.String[] makeGradient(int shades, java.lang.String[] colors)
shades
- number of colors in the gradientcolors
- colors for the gradientprotected org.w3c.dom.Element drawClusteringInfo()
protected void segmentHover(Segment segment, int ringid, boolean active)
protected void segmentClick(Segment segment, org.w3c.dom.events.Event evt, boolean dblClick)
Copyright © 2019 ELKI Development Team. License information.