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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Palette
getPalette(Object paletteIdentifier)
Get a palette by its internal identifierPalette
getPalette(Object paletteIdentifier, int size)
Get a palette by its internal identifierPalette
getPalette(String paletteName)
Get a palette by its namePalette
getPalette(String paletteName, int size)
Get a palette of the specified size by its nameList<PaletteType>
getPaletteTypes()
Return the list oforg.cytoscape.util.color.Palette.PaletteType
s supported by this providerString
getProviderName()
Return the human-readable string identifier for this PaletteProvider.List<Object>
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.List<String>
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 Detail
-
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<String> 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. 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<Object> 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. 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
Palette getPalette(String paletteName)
Get a palette by its name- Parameters:
paletteName
- the name of the palette to return- Returns:
- the palette
-
getPalette
Palette getPalette(String paletteName, int size)
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
Palette getPalette(Object paletteIdentifier)
Get a palette by its internal identifier- Parameters:
paletteIdentifier
- the identifier of the palette to return- Returns:
- the palette
-
-