Package org.cytoscape.util.color
Interface PaletteProviderManager
public interface PaletteProviderManager
The PaletteProviderManager provides a way for palette providers
to register themselves.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPaletteProvider
(PaletteProvider provider) Add a palette provider to the manager.getPaletteProvider
(String provider) Return the palette provider that matches the name in the argument.Return the list of currently registered palette providersgetPaletteProviders
(PaletteType type, boolean colorSafe) Return the list of currently registered palette providers that provide palettes of the requested type.void
removePaletteProvider
(PaletteProvider provider) Remove a palette provider from the manager.retrievePalette
(Object key) Retrieve a palette previously savedvoid
savePalette
(Object key, Palette palette) Save a palette.
-
Method Details
-
getPaletteProviders
List<PaletteProvider> getPaletteProviders()Return the list of currently registered palette providers- Returns:
- the list of palette providers
-
getPaletteProviders
Return the list of currently registered palette providers that provide palettes of the requested type.- Parameters:
type
- the type of the palettecolorSafe
- true if the palette should provide color safe palettes- Returns:
- the list of palette providers
-
getPaletteProvider
Return the palette provider that matches the name in the argument.- Parameters:
provider
- the name of the provider.- Returns:
- the named palette provider
-
addPaletteProvider
Add a palette provider to the manager.- Parameters:
provider
- the provider to add.
-
removePaletteProvider
Remove a palette provider from the manager.- Parameters:
provider
- the provider to remove.
-
savePalette
Save a palette. This is a convenience method that provides a way for apps (and the core) to remember palettes that were previously used. The main idea is that palettes can be saved with an arbitrary key (use the full name of the class to avoid conflicts) and recalled later. This mechanism is used internally by the Styles (vizmap) interface to remember palette selections used for color visual properties.- Parameters:
key
- the key to save this palette underpalette
- thePalette
to save
-
retrievePalette
Retrieve a palette previously saved
-