Enum Class FormBuildType

java.lang.Object
java.lang.Enum<FormBuildType>
com.jbstrap.ui.components.form.FormBuildType
All Implemented Interfaces:
Serializable, Comparable<FormBuildType>, Constable

public enum FormBuildType extends Enum<FormBuildType>
Enum containing the form build types used by the JBStrap framework
Since:
4.0
Author:
JBStrap
  • Enum Constant Details

    • DEFAULT

      public static final FormBuildType DEFAULT

      Default form builder

      If a form is built with the default builder, the form will be a full width, columned form, that does not contain blocks or tabs Every form item in it will be displayed under each other, in the full width of the form

    • BLOCKED_FORM

      public static final FormBuildType BLOCKED_FORM

      Blocked form builder

      If the form is built with this builder, the form items will be placed in previously set blocks. If one of the form items has no block assigned to it, it will be displayed on a separate block. The blocks can be created by using the Form.addBlock(String, String) method, before drawing the form.

      The block parameter can be specified during the DataDescriptor parameterizing (MetaParamName.BLOCK_NAME) or it can be specified within the form item parameters.

    • COLUMNED_FORM

      public static final FormBuildType COLUMNED_FORM

      Columned form builder

      If the form is built with this builder, the form items will be placed in previously set columns. If a form item has no column parameter set, it will not be displayed. The columns can be created by using the Form.addColumn(String) method, before the form is drawn.

      The column parameter can be specified during the DataDescriptor parameterizing (MetaParamName.FORM_COLUMN) or it can be specified within the form item parameters.

    • TABBED_FORM

      public static final FormBuildType TABBED_FORM

      Tabbed form builder

      If the form is built with this builder, the form items will be placed in previously set tabs. If a form item has no tab parameter set, it will not be displayed. The tabs can be created by using the Form.addTabPage(String, com.jbstrap.ui.Icon, String) method, before the form is drawn.

      The tab parameter can be specified during the DataDescriptor parameterizing (MetaParamName.TAB_NAME) or it can be specified within the form item parameters.

    • COMPLEX_FORM

      public static final FormBuildType COMPLEX_FORM

      Complex form builder

      If the form is built with this builder, the form items will be placed in tabs, blocks and columns. In this case, the form items must have 3 parameters specified, so the items can be displayed correctly.

      Before drawing, the tabs must be created on the form, by using the Form.addTabPage(String, com.jbstrap.ui.Icon, String) method, the blocks must be created by using the Form.addBlock(String, String) method, and the columns must be created by using the Form.addColumn(String) method. The individual form item parameters must be specified, either on the items, or when parameterizing the DataDescriptor:

      In this form builder the individual levels of the components can be set. For example, where should the block be within the tab, and where should the column be within the block. This can be set by using the Form.setHierarchy(com.jbstrap.ui.components.form.builders.ComplexBuilderHierarchy) method, where the hierarchy can be specified. The usable hierarchies can be found in the ComplexBuilderHierarchy enum.

    • CUSTOM

      public static final FormBuildType CUSTOM

      Custom form builder

      If this builder is used, the form builder method must be implemented. This is done by implementing the FormBuilder interface. For more information about the form builder implementation, see the FormBuilder interface description.

  • Method Details

    • values

      public static FormBuildType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FormBuildType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getBuilder

      Returns:
      A new instance of the builder class, or null, if the builder is a custom implementation.
      Throws:
      InstantiationException - If the class couldn't be instantiated
      IllegalAccessException - If the class couldn't be instantiated