public class SegmentsStylingPolicy extends Object implements ClassStylingPolicy
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.
|
int |
getMaxStyle()
Get the maximum style in use.
|
String |
getMenuName()
Name to display in the menu.
|
int |
getMinStyle()
Get the minimum style in use.
|
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)
ClassStylingPolicy
getStyleForDBID
in interface ClassStylingPolicy
id
- Object IDpublic int getColorForDBID(DBIDRef id)
StylingPolicy
getColorForDBID
in interface StylingPolicy
id
- Object IDpublic int getMinStyle()
ClassStylingPolicy
getMinStyle
in interface ClassStylingPolicy
public int getMaxStyle()
ClassStylingPolicy
getMaxStyle
in interface ClassStylingPolicy
public DBIDIter iterateClass(int cnum)
ClassStylingPolicy
iterateClass
in interface ClassStylingPolicy
cnum
- Class numberpublic int classSize(int cnum)
ClassStylingPolicy
classSize
in interface ClassStylingPolicy
cnum
- 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 getMenuName()
VisualizationItem
null
or empty string.getMenuName
in interface VisualizationItem
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.