Enum FormElement

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      GridBagFormula getLabelConstraints()
      Get the constraints to use for the label associated with the current component.
      java.awt.GridBagConstraints setConstraints​(java.awt.GridBagConstraints gbc)
      Apply the constraints for the current component.
      static FormElement valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static FormElement[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • LEFT_LABEL

        public static final FormElement LEFT_LABEL
        Label constraints for TEXT_FIELD. The label is placed in the column to the left of the field.
      • BUTTON_GROUP

        public static final FormElement BUTTON_GROUP
        Constraints for a button group (a Box or a JPanel). Two columns wide and no vertical growth.
      • CHECK_BOX

        public static final FormElement CHECK_BOX
        Constraints for a JCheckBox.
      • TEXT_FIELD

        public static final FormElement TEXT_FIELD
        Constraints for a JTextField.
      • TEXT_AREA

        public static final FormElement TEXT_AREA
        Constraints for a JTextArea.
      • LIST

        public static final FormElement LIST
        Constraints for a JList.
      • TABLE

        public static final FormElement TABLE
        Constraints for a JTable.
      • PANEL

        public static final FormElement PANEL
        Constraints for a JPanel.
    • Method Detail

      • values

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

        public static FormElement 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
      • setConstraints

        public java.awt.GridBagConstraints setConstraints​(java.awt.GridBagConstraints gbc)
        Description copied from interface: GridBagFormula
        Apply the constraints for the current component.
        Specified by:
        setConstraints in interface GridBagFormula
        Parameters:
        gbc - the constraints to be updated
        Returns:
        the updated gbc parameter