Interface OpenTypeFont.Palette

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.awt.Color getColor​(int i)
      Return the Color at index i
      int getIndex​(java.lang.String name)
      Given a name of a color, return the index that matches that name, or -1 if there is no index with that name.
      java.util.Collection<java.lang.String> getNames()
      Return the names of the Palette if specified, or an empty set otherwise.
      boolean isDark()
      Return true if this Palette specifies it for user over a light background.
      boolean isLight()
      Return true if this Palette specifies it for user over a light background.
      int size()
      Return the number of colors in this Palette
    • Method Detail

      • getNames

        java.util.Collection<java.lang.String> getNames()
        Return the names of the Palette if specified, or an empty set otherwise. A Palette may have names in multiple languages.
      • isLight

        boolean isLight()
        Return true if this Palette specifies it for user over a light background.
      • isDark

        boolean isDark()
        Return true if this Palette specifies it for user over a light background.
      • size

        int size()
        Return the number of colors in this Palette
      • getIndex

        int getIndex​(java.lang.String name)
        Given a name of a color, return the index that matches that name, or -1 if there is no index with that name. A single index may have names in multiple languages.
        Parameters:
        name - the name
        Returns:
        the index of the color that matches that name, or -1 if it's not found.
      • getColor

        java.awt.Color getColor​(int i)
        Return the Color at index i
        Parameters:
        i - a value where 0 <= i < size()