Enum Class FormBuildType
- All Implemented Interfaces:
Serializable
,Comparable<FormBuildType>
,Constable
- Since:
- 4.0
- Author:
- JBStrap
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionBlocked form builderColumned form builderComplex form builderCustom form builderDefault form builderTabbed form builder -
Method Summary
Modifier and TypeMethodDescriptionstatic FormBuildType
Returns the enum constant of this class with the specified name.static FormBuildType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
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
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 theForm.addBlock(String, String)
method, and the columns must be created by using theForm.addColumn(String)
method. The individual form item parameters must be specified, either on the items, or when parameterizing the DataDescriptor:MetaParamName.TAB_NAME
- The name of the tab, in which the form item will be placedMetaParamName.BLOCK_NAME
- The name of the block, in which the form item will be placedMetaParamName.FORM_COLUMN
- The name of the column, in which the form item will be placed
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 theComplexBuilderHierarchy
enum. -
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 theFormBuilder
interface description.
-
-
Method Details
-
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
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 nameNullPointerException
- 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 instantiatedIllegalAccessException
- If the class couldn't be instantiated
-