Enum Span

  • All Implemented Interfaces:
    Serializable, Comparable<Span>

    public enum Span
    extends Enum<Span>
    The Span enum simply represents how many columns a particular node in the GridLayout should span. This uses a concept similar to the Bootstrap layout common on the web, where a node can span between one and twelve columns.
    Since:
    2.0.0
    See Also:
    GridLayout, GridRow, GridSpan, Offset
    • Enum Constant Detail

      • SPAN_1

        public static final Span SPAN_1
        Span one column.
      • SPAN_2

        public static final Span SPAN_2
        Span two columns.
      • SPAN_3

        public static final Span SPAN_3
        Span three columns.
      • SPAN_4

        public static final Span SPAN_4
        Span four columns.
      • SPAN_5

        public static final Span SPAN_5
        Span five columns.
      • SPAN_6

        public static final Span SPAN_6
        Span six columns.
      • SPAN_7

        public static final Span SPAN_7
        Span seven columns.
      • SPAN_8

        public static final Span SPAN_8
        Span eight columns.
      • SPAN_9

        public static final Span SPAN_9
        Span nine columns.
      • SPAN_10

        public static final Span SPAN_10
        Span ten columns.
      • SPAN_11

        public static final Span SPAN_11
        Span eleven columns.
      • SPAN_12

        public static final Span SPAN_12
        Span twelve columns.
    • Method Detail

      • values

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

        public static Span 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
      • getSpan

        public final int getSpan()
        Returns the span as an integer value between one and twelve.
        Returns:
        The span as an integer.