Enum CellSize

  • All Implemented Interfaces:
    Serializable, Comparable<CellSize>

    public enum CellSize
    extends Enum<CellSize>

    An enumeration class that defines possible sizes for the cells of a percent layout.

    A constant defined by this enumeration class is used to specify the sizing behavior of cells in the layout. It is evaluated to calculate the optimum size of the container to layout. The constants represent different strategies for querying the sizes of contained components. Based on these sizes the required space is calculated.

    The CellConstraints class has a property of this type.

    Version:
    $Id: CellSize.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Enum Constant Detail

      • PREFERRED

        public static final CellSize PREFERRED
        The size constant preferred. To determine the optimum size of a cell the preferred size of the contained component is evaluated.
      • MINIMUM

        public static final CellSize MINIMUM
        The size constant minimum. To determine the optimum size of a cell the minimum size of the contained component is evaluated.
      • NONE

        public static final CellSize NONE
        The size constant none. This means that the size of a component contained in this cell is ignored. This is appropriate for cells that do not contain components, but act as delimiters between other cells (e.g. a column that separates labels from their associated input fields). Typically these cells are assigned a fix size, so that no size calculation is required.
    • Method Detail

      • values

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

        public static CellSize 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