
public class SegmentsStylingPolicy extends Object implements ClassStylingPolicy, Result
| Modifier and Type | Field and Description | 
|---|---|
(package private) ColorLibrary | 
colorset
Color library (only used in compatibility mode) 
 | 
protected TreeMap<Segment,Segment> | 
indirectSelections
Segments indirectly selected 
 | 
protected Segments | 
segments
The segments we use for visualization 
 | 
protected ArrayList<Segment> | 
selectedSegments
Selected segments 
 | 
protected ModifiableDBIDs | 
unselectedObjects
Not selected IDs that will be drawn in default colors. 
 | 
| Constructor and Description | 
|---|
SegmentsStylingPolicy(Segments segments)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
classSize(int cnum)
Get the number of elements in the styling class. 
 | 
void | 
deselectAllSegments()
Deselect all currently selected segments 
 | 
protected void | 
deselectSegment(Segment segment)
Deselect a segment 
 | 
int | 
getColorForDBID(DBIDRef id)
Get the color for an individual object. 
 | 
String | 
getLongName()
A "pretty" name for the result, for use in titles, captions and menus. 
 | 
int | 
getMaxStyle()
Get the maximum style in use. 
 | 
int | 
getMinStyle()
Get the minimum style in use. 
 | 
String | 
getShortName()
A short name for the result, useful for file names. 
 | 
int | 
getStyleForDBID(DBIDRef id)
Get the style number for a particular object 
 | 
int | 
indexOfSegment(Segment segment)
Get the index of a selected segment. 
 | 
boolean | 
isSelected(Segment segment)
Test whether a segment is selected. 
 | 
DBIDIter | 
iterateClass(int cnum)
Iterate over all objects from a given class. 
 | 
void | 
select(Segment segment,
      boolean addToSelection)
Adds or removes the given segment to the selection. 
 | 
protected void | 
selectSegment(Segment segment)
Select a segment 
 | 
void | 
setStyleLibrary(StyleLibrary style)
Assign the style library, for compatibility color styling. 
 | 
protected final Segments segments
protected TreeMap<Segment,Segment> indirectSelections
protected ModifiableDBIDs unselectedObjects
ColorLibrary colorset
public SegmentsStylingPolicy(Segments segments)
segments - Segmentspublic void setStyleLibrary(StyleLibrary style)
style - Style librarypublic boolean isSelected(Segment segment)
segment - Segment to testpublic int getStyleForDBID(DBIDRef id)
ClassStylingPolicygetStyleForDBID in interface ClassStylingPolicyid - Object IDpublic int getColorForDBID(DBIDRef id)
StylingPolicygetColorForDBID in interface StylingPolicyid - Object IDpublic int getMinStyle()
ClassStylingPolicygetMinStyle in interface ClassStylingPolicypublic int getMaxStyle()
ClassStylingPolicygetMaxStyle in interface ClassStylingPolicypublic DBIDIter iterateClass(int cnum)
ClassStylingPolicyiterateClass in interface ClassStylingPolicycnum - Class numberpublic int classSize(int cnum)
ClassStylingPolicyclassSize in interface ClassStylingPolicycnum - Class numberpublic void select(Segment segment, boolean addToSelection)
segment - the selected element representing a segment ring (specific
        clustering)addToSelection - flag for adding segment to current selectionpublic void deselectAllSegments()
protected void deselectSegment(Segment segment)
segment - Segment to deselectprotected void selectSegment(Segment segment)
segment - Segment to selectpublic int indexOfSegment(Segment segment)
segment - Segment to findpublic String getLongName()
ResultgetLongName in interface Resultpublic String getShortName()
ResultgetShortName in interface Result