Interface PaletteProviderManager


  • public interface PaletteProviderManager
    The PaletteProviderManager provides a way for palette providers to register themselves.
    • 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 palette
        colorSafe - 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 under
        palette - the Palette to save
      • retrievePalette

        Palette retrievePalette​(Object key)
        Retrieve a palette previously saved
        Parameters:
        key - the key that was used to save the Palette
        Returns:
        the saved Palette or null