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 Detail

      • getProviderName

        String getProviderName()
        Return the human-readable string identifier for this PaletteProvider.
        Returns:
        the name
      • getPaletteTypes

        List<PaletteType> getPaletteTypes()
        Return the list of org.cytoscape.util.color.Palette.PaletteTypes 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 to
        colorBlindSafe - 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 to
        colorBlindSafe - 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 return
        size - 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
      • getPalette

        Palette getPalette​(Object paletteIdentifier,
                           int size)
        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