public final class ObjectDrawAttributes extends Object
Constructor and Description |
---|
ObjectDrawAttributes(ColorIndex colorIndex)
Creates with a specific color-index and uses the iteration-index as both the ID and color-ID
|
ObjectDrawAttributes(ColorIndex colorIndex,
IdentifierGetter<ObjectWithProperties> idGetter,
IdentifierGetter<ObjectWithProperties> colorIDGetter) |
Modifier and Type | Method and Description |
---|---|
RGBColor |
colorFor(ObjectWithProperties object,
int index)
A color for a particular object
|
boolean |
equals(Object o) |
IdentifierGetter<ObjectWithProperties> |
getColorIDGetter()
Gets a color ID associated with the object
|
ColorIndex |
getColorIndex()
Colors for a given index
|
IdentifierGetter<ObjectWithProperties> |
getIdGetter()
Gets a unique ID associated with the object
|
int |
hashCode() |
int |
idFor(ObjectWithProperties object,
int index)
ID for a particular object
|
String |
toString() |
public ObjectDrawAttributes(ColorIndex colorIndex)
colorIndex
- color-indexpublic ObjectDrawAttributes(ColorIndex colorIndex, IdentifierGetter<ObjectWithProperties> idGetter, IdentifierGetter<ObjectWithProperties> colorIDGetter)
public RGBColor colorFor(ObjectWithProperties object, int index)
object
- the objectindex
- the index of the object (unique incrementing ID for each object in a collection)public int idFor(ObjectWithProperties object, int index)
object
- the objectindex
- the index of the object (unique incrementing ID for each object in a collection)public ColorIndex getColorIndex()
public IdentifierGetter<ObjectWithProperties> getIdGetter()
public IdentifierGetter<ObjectWithProperties> getColorIDGetter()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.