Class FormBuilderImpl
java.lang.Object
ch.tocco.nice2.model.form.impl.form2.builder.AbstractLayoutContainerBuilder<FormImpl>
ch.tocco.nice2.model.form.impl.form2.builder.FormBuilderImpl
- All Implemented Interfaces:
FormBuilder
,LayoutContainerBuilder
public class FormBuilderImpl
extends AbstractLayoutContainerBuilder<FormImpl>
implements FormBuilder
-
Field Summary
Fields inherited from class ch.tocco.nice2.model.form.impl.form2.builder.AbstractLayoutContainerBuilder
component
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddActionGroup
(String id, String label, @Nullable String position) add a action grouplooks for a child with the given id in the form (recursively).get()
returns the form component.@Nullable ActionGroupBuilder
getActionGroupBuilder
(ActionGroup actionGroup) get a builder for a given ActionGroup@Nullable LayoutBuilder
getLayoutBuilder
(Layout layout) get or create the main action bar at the top of the form that contains the major action groups and actions.returns the form component as opposed toFormBuilder.get()
, this does not validate or process the contents of the form do not use the result of this method as a final form, but only as a carrier for form databoolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
markable
(boolean markable) readOnly
(boolean readOnly) void
removeComponent
(Component component) void
removeComponents
(Predicate<Component> componentPredicate) remove all components (recursively) which returns the given predicate `true` for.void
sort()
sort the component represented by this builderMethods inherited from class ch.tocco.nice2.model.form.impl.form2.builder.AbstractLayoutContainerBuilder
addLayout, addTable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.model.form.api.form2.builder.FormBuilder
addAction, addActionGroup, addReport
Methods inherited from interface ch.tocco.nice2.model.form.api.form2.builder.LayoutContainerBuilder
addLayout, addLayout, addTable, addTable
-
Constructor Details
-
FormBuilderImpl
-
-
Method Details
-
getFormId
- Specified by:
getFormId
in interfaceFormBuilder
-
getEntityModel
- Specified by:
getEntityModel
in interfaceFormBuilder
-
isReplaced
public boolean isReplaced()- Specified by:
isReplaced
in interfaceFormBuilder
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnly
in interfaceFormBuilder
-
isAppendDefaultActions
public boolean isAppendDefaultActions()- Specified by:
isAppendDefaultActions
in interfaceFormBuilder
-
isAppendMassMutationActions
public boolean isAppendMassMutationActions()- Specified by:
isAppendMassMutationActions
in interfaceFormBuilder
-
hasOutputJobAction
public boolean hasOutputJobAction()- Specified by:
hasOutputJobAction
in interfaceFormBuilder
-
hasMergeAction
public boolean hasMergeAction()- Specified by:
hasMergeAction
in interfaceFormBuilder
-
hasGenericLabelAction
public boolean hasGenericLabelAction()- Specified by:
hasGenericLabelAction
in interfaceFormBuilder
-
hasCopyAction
public boolean hasCopyAction()- Specified by:
hasCopyAction
in interfaceFormBuilder
-
hasImportAction
public boolean hasImportAction()- Specified by:
hasImportAction
in interfaceFormBuilder
-
hasExportAction
public boolean hasExportAction()- Specified by:
hasExportAction
in interfaceFormBuilder
-
hasGenericActions
public boolean hasGenericActions()- Specified by:
hasGenericActions
in interfaceFormBuilder
-
isMarkable
public boolean isMarkable()- Specified by:
isMarkable
in interfaceFormBuilder
-
markable
- Specified by:
markable
in interfaceFormBuilder
-
readOnly
- Specified by:
readOnly
in interfaceFormBuilder
-
getChildren
- Specified by:
getChildren
in interfaceFormBuilder
-
getLayoutBuilder
- Specified by:
getLayoutBuilder
in interfaceFormBuilder
-
addAction
- Specified by:
addAction
in interfaceFormBuilder
-
removeComponent
- Specified by:
removeComponent
in interfaceFormBuilder
-
addReport
- Specified by:
addReport
in interfaceFormBuilder
-
addActionGroup
public ActionGroupBuilder addActionGroup(String id, String label, @Nullable @Nullable String position) Description copied from interface:FormBuilder
add a action group- Specified by:
addActionGroup
in interfaceFormBuilder
- Parameters:
id
- id of the action grouplabel
- label of the action groupposition
- relative position of the action group- Returns:
- the builder of the newly created action group
-
getActionGroupBuilder
Description copied from interface:FormBuilder
get a builder for a given ActionGroup- Specified by:
getActionGroupBuilder
in interfaceFormBuilder
- Parameters:
actionGroup
- the action group to use- Returns:
- the builder
-
getOrCreateMainActionBar
Description copied from interface:FormBuilder
get or create the main action bar at the top of the form that contains the major action groups and actions.- Specified by:
getOrCreateMainActionBar
in interfaceFormBuilder
- Returns:
- the existing main action bar or the newly created one.
-
sort
Description copied from interface:FormBuilder
sort the component represented by this builder- Specified by:
sort
in interfaceFormBuilder
- Throws:
ModelBuildException
-
get
Description copied from interface:FormBuilder
returns the form component. note: for performance reasons this method should be called only once at the end when the form is built completely, because it also validates all components and does some other final modifications.- Specified by:
get
in interfaceFormBuilder
- Returns:
- the form component
- Throws:
ModelBuildException
-
getWithoutProcessing
Description copied from interface:FormBuilder
returns the form component as opposed toFormBuilder.get()
, this does not validate or process the contents of the form do not use the result of this method as a final form, but only as a carrier for form data- Specified by:
getWithoutProcessing
in interfaceFormBuilder
- Returns:
- the form component
-
findById
Description copied from interface:FormBuilder
looks for a child with the given id in the form (recursively).- Specified by:
findById
in interfaceFormBuilder
-
removeComponents
Description copied from interface:FormBuilder
remove all components (recursively) which returns the given predicate `true` for.- Specified by:
removeComponents
in interfaceFormBuilder
-