Package org.cytoscape.util.color
Interface PaletteProvider
public interface PaletteProvider
This interface provides a consistent way for various providers (ColorBrewer,
ColourLovers, etc.) to provide color palettes to Cytoscape routines.
-
Method Summary
Modifier and TypeMethodDescriptiongetPalette
(Object paletteIdentifier) Get a palette by its internal identifiergetPalette
(Object paletteIdentifier, int size) Get a palette by its internal identifiergetPalette
(String paletteName) Get a palette by its namegetPalette
(String paletteName, int size) Get a palette of the specified size by its nameReturn the list oforg.cytoscape.util.color.Palette.PaletteType
s supported by this providerReturn the human-readable string identifier for this PaletteProvider.listPaletteIdentifiers
(PaletteType type, boolean colorBlindSafe) List all of the palettes available from this provider, optionally restricted by the palette type and whether or not the palette is color blind safe.listPaletteNames
(PaletteType type, boolean colorBlindSafe) List all of the palettes available from this provider, optionally restricted by the palette type and whether or not the palette is color blind safe.
-
Method Details
-
getProviderName
String getProviderName()Return the human-readable string identifier for this PaletteProvider.- Returns:
- the name
-
getPaletteTypes
List<PaletteType> getPaletteTypes()Return the list oforg.cytoscape.util.color.Palette.PaletteType
s supported by this provider- Returns:
- the list of palette types supported
-
listPaletteNames
List all of the palettes available from this provider, optionally restricted by the palette type and whether or not the palette is color blind safe. To get all palettes, use a PaletteType of 'ANY'.- Parameters:
type
- the PaletteType to restrct the list tocolorBlindSafe
- if this provider distinguishes between color blind safe palettes or not- Returns:
- a list of palette names
-
listPaletteIdentifiers
List all of the palettes available from this provider, optionally restricted by the palette type and whether or not the palette is color blind safe. To get all palettes, use a PaletteType of 'ANY'.- Parameters:
type
- the PaletteType to restrct the list tocolorBlindSafe
- if this provider distinguishes between color blind safe palettes or not- Returns:
- a list of palette identifiers
-
getPalette
Get a palette by its name- Parameters:
paletteName
- the name of the palette to return- Returns:
- the palette
-
getPalette
Get a palette of the specified size by its name- Parameters:
paletteName
- the name of the palette to returnsize
- the number of colors in the palette- Returns:
- the palette or null if no palette of that size exists
-
getPalette
Get a palette by its internal identifier- Parameters:
paletteIdentifier
- the identifier of the palette to return- Returns:
- the palette
-
getPalette
Get a palette by its internal identifier- Parameters:
paletteIdentifier
- the identifier of the palette to return- Returns:
- the palette or null if no palette of that size exists
-