public abstract class ColorScheme extends AnchorBean<ColorScheme>
Constructor and Description |
---|
ColorScheme() |
Modifier and Type | Method and Description |
---|---|
ColorIndex |
colorForEachIndex(int numberColors)
Assigns a color to each index value from a list of size
numberColors . |
abstract ColorList |
createList(int size)
Creates a sequence of related colors.
|
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public abstract ColorList createList(int size) throws OperationFailedException
size
- the size of the listOperationFailedException
public ColorIndex colorForEachIndex(int numberColors) throws OperationFailedException
numberColors
.
This allows non-contiguous indices to each use a unique-ish color.
Indices will be assigned a unique color until the list has no more unique colors, at which point they will be reused.
Beware that as each index is remembered in a hash-map, this can become inefficient for a large number of indices.
numberColors
- the size of the list from which colors are selectedOperationFailedException
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.