Package org.cytoscape.util.color
Interface PaletteProviderManager
-
public interface PaletteProviderManagerThe PaletteProviderManager provides a way for palette providers to register themselves.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPaletteProvider(PaletteProvider provider)Add a palette provider to the manager.PaletteProvidergetPaletteProvider(String provider)Return the palette provider that matches the name in the argument.List<PaletteProvider>getPaletteProviders()Return the list of currently registered palette providersList<PaletteProvider>getPaletteProviders(PaletteType type, boolean colorSafe)Return the list of currently registered palette providers that provide palettes of the requested type.voidremovePaletteProvider(PaletteProvider provider)Remove a palette provider from the manager.PaletteretrievePalette(Object key)Retrieve a palette previously savedvoidsavePalette(Object key, Palette palette)Save a palette.
-
-
-
Method Detail
-
getPaletteProviders
List<PaletteProvider> getPaletteProviders()
Return the list of currently registered palette providers- Returns:
- the list of palette providers
-
getPaletteProviders
List<PaletteProvider> getPaletteProviders(PaletteType type, boolean colorSafe)
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
PaletteProvider getPaletteProvider(String provider)
Return the palette provider that matches the name in the argument.- Parameters:
provider- the name of the provider.- Returns:
- the named palette provider
-
addPaletteProvider
void addPaletteProvider(PaletteProvider provider)
Add a palette provider to the manager.- Parameters:
provider- the provider to add.
-
removePaletteProvider
void removePaletteProvider(PaletteProvider provider)
Remove a palette provider from the manager.- Parameters:
provider- the provider to remove.
-
savePalette
void savePalette(Object key, Palette palette)
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- thePaletteto save
-
-