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 String |
CLR_BORDER_CLASS
CSS border class of a cluster
|
private static String |
CLR_CLUSTER_CLASS_PREFIX
CSS class name for the clusterings.
|
static String |
CLR_HOVER_CLASS
CSS hover class of a segment cluster
|
static String |
CLR_UNPAIRED_CLASS
CSS hover class for clusters of hovered segment
|
private 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 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
|
Map<Segment,List<Element>> |
segmentToElements
Map to connect segments to their visual elements
|
(package private) boolean |
showUnclusteredPairs
Show unclustered Pairs in CircleSegments
|
static String |
STYLE
Style prefix
|
static String |
STYLE_BORDER
Style for border lines
|
static String |
STYLE_GRADIENT_FIRST
First color for producing segment-cluster colors
|
static String |
STYLE_GRADIENT_SECOND
Second color for producing segment-cluster colors
|
static String |
STYLE_HOVER
Style for hover effect
|
private Element |
visLayer
The two main layers
|
context, layer, svgp, task
Constructor and Description |
---|
CircleSegmentsVisualizer.Instance(VisualizationTask task,
VisualizationPlot plot,
double width,
double height,
Projection proj)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCSSClasses(int maxClusterSize)
Define and add required CSS classes
|
protected 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 String[] |
makeGradient(int shades,
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,
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 String CLR_CLUSTER_CLASS_PREFIX
public static final String CLR_BORDER_CLASS
public static final String CLR_UNPAIRED_CLASS
public static final String CLR_HOVER_CLASS
public static final String SEG_UNPAIRED_SELECTED_CLASS
public static final String STYLE
public static final String STYLE_BORDER
public static final String STYLE_HOVER
public static final String STYLE_GRADIENT_FIRST
public static final String STYLE_GRADIENT_SECOND
protected final Segments segments
private Element visLayer
private Element ctrlLayer
public Map<Segment,List<Element>> segmentToElements
boolean showUnclusteredPairs
protected final SegmentsStylingPolicy policy
private boolean noIncrementalRedraw
public CircleSegmentsVisualizer.Instance(VisualizationTask task, VisualizationPlot plot, double width, double height, Projection proj)
task
- Taskplot
- Plot to draw towidth
- Embedding widthheight
- Embedding heightproj
- Projectionpublic 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 String[] makeGradient(int shades, String[] colors)
shades
- number of colors in the gradientcolors
- colors for the gradientprotected Element drawClusteringInfo()
protected void segmentHover(Segment segment, int ringid, boolean active)
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.