
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, pendingRedraw, svgp, task| Constructor and Description |
|---|
CircleSegmentsVisualizer.Instance(VisualizationTask task)
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
|
protected void |
incrementalRedraw()
Redraw the visualization (maybe incremental).
|
protected String[] |
makeGradient(int shades,
String[] colors)
Creates a gradient over a set of colors
|
void |
redraw()
Perform a full redraw.
|
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) |
contentChanged, destroy, getHeight, getLayer, getWidth, resultAdded, resultRemoved, synchronizedRedrawclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresultAdded, resultRemovedprivate 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)
public void toggleUnclusteredPairs(boolean show)
public void resultChanged(Result current)
ResultListenerresultChanged in interface ResultListenerresultChanged in class AbstractVisualizationcurrent - Result that has changed.protected void incrementalRedraw()
AbstractVisualizationincrementalRedraw in class AbstractVisualizationpublic void redraw()
AbstractVisualizationredraw in class AbstractVisualizationprotected 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)