Enum ContourPlot.DefaultColorMap

    • Constructor Detail

      • DefaultColorMap

        private DefaultColorMap​(int[] colors,
                                double[] locations)
      • DefaultColorMap

        private DefaultColorMap​(int... colors)
    • Method Detail

      • values

        public static ContourPlot.DefaultColorMap[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ContourPlot.DefaultColorMap c : ContourPlot.DefaultColorMap.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ContourPlot.DefaultColorMap valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getColor

        public int getColor​(int index)
        Description copied from interface: ContourPlot.ColorMap
        Returns the ith color
        Specified by:
        getColor in interface ContourPlot.ColorMap
        Parameters:
        index - index of the color
        Returns:
        ith color in integer packed ARGB format (0xff00ff00 is opaque green)
      • getLocation

        public double getLocation​(int index)
        Description copied from interface: ContourPlot.ColorMap
        Returns the location of the ith color within the unit interval.
        Specified by:
        getLocation in interface ContourPlot.ColorMap
        Parameters:
        index - index of the location/color
        Returns:
        location within [0,1]