Enum Fill

  • All Implemented Interfaces:
    Serializable, Comparable<Fill>, Key, IsFill

    public enum Fill
    extends Enum<Fill>
    implements IsFill
    Both line and radar charts support a fill option on the data set object which can be used to create area between two data sets or a data set and a boundary.
    These are the constants of predefined filling mode values.
    Author:
    Andrea "Stock" Stocchero
    • Enum Constant Detail

      • START

        public static final Fill START
        Fill the area from the bottom X axis
      • END

        public static final Fill END
        Fill the area from the top X axis
      • ORIGIN

        public static final Fill ORIGIN
        Fill the area from 0 axis to top or bottom, depending on value.
        Default.
      • STACK

        public static final Fill STACK
        Fill the area from stacked value below.
      • SHAPE

        public static final Fill SHAPE
        Fill inside line.
      • FALSE

        public static final Fill FALSE
        Does not fill any area
    • Method Detail

      • values

        public static Fill[] 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 (Fill c : Fill.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Fill valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • value

        public String value()
        Description copied from interface: Key
        Returns the name value of property
        Specified by:
        value in interface Key
        Returns:
        the name value of property
      • getMode

        public FillingMode getMode()
        Description copied from interface: IsFill
        Returns the type of filling.
        Specified by:
        getMode in interface IsFill
        Returns:
        the type of filling.
      • getValueAsInt

        public int getValueAsInt()
        Description copied from interface: IsFill
        Returns the value as integer (valid ONLY for absolute dataset index), otherwise Undefined.INTEGER.
        Specified by:
        getValueAsInt in interface IsFill
        Returns:
        the value as integer (valid ONLY for absolute dataset index), otherwise Undefined.INTEGER.
      • getValue

        public String getValue()
        Description copied from interface: IsFill
        Returns the value as string (valid ONLY for relative dataset index and predefined), otherwise Undefined.STRING.
        Specified by:
        getValue in interface IsFill
        Returns:
        the value as string (valid ONLY for relative dataset index and predefined), otherwise Undefined.STRING.
      • isPredefined

        public static boolean isPredefined​(IsFill fill)
        Checks if the fill passed by argument is a predefined fill, the returns true.
        Parameters:
        fill - fill instance
        Returns:
        true if the fill passed by argument is a predefined fill otherwise false.
      • getFill

        public static IsFill getFill​(int index)
        Returns a fill, based on absolute data set index, using the passed index.
        Parameters:
        index - absolute data set index to use for filling
        Returns:
        a fill object with the right configuration to set in the chart
      • getFill

        public static IsFill getFill​(String index)
        Returns a fill, based on relative data set index, using the passed index.
        If the passed argument is not a relative data set index, checks if is predefined fill.
        Parameters:
        index - relative data set index to use for filling
        Returns:
        a fill object with the right configuration to set in the chart.