Class ApplicationEditorDescriptor
- java.lang.Object
-
- com.e1c.g5.dt.applications.ui.editor.ApplicationEditorDescriptor
-
- All Implemented Interfaces:
IApplicationEditorDescriptor
public abstract class ApplicationEditorDescriptor extends Object implements IApplicationEditorDescriptor
The abstract application editor descriptor.It simplifies the building of the
IManagingDefinition
and allows to construct the editor in a descriptive manner.Override the
build()
method to provide the descriptor content, e.g.:section("General") .element("Name", "nameId") .componentFactory(obj -> new TextComponent()) .element("Email", "emailId") .componentFactory(obj -> new EmailComponent()) .endSection(); section("Addition") .element("Assurance", "assuranceId") .componentFactory(obj -> new CheckboxComponent()) .endSection();
The specified identifiers in the example above ("nameId", "emailId", etc.) is required to identify the component/control within the
IModelFactory
.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description ApplicationEditorDescriptor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
build()
Builds the descriptor.protected ManagingDefinitionBuilder<?>
createBuilder()
Creates the application editor descriptor builder.protected ManagingDefinitionBuilder<?>
getBuilder()
Returns the application editor descriptor builder.IManagingDefinition
getDefinition()
Returns the managing definition.protected ManagingDefinitionBuilder<?>
rule(IRule rule)
Sets theIRule
.protected SectionDefinitionBuilder<Void,?>
section(String title)
Creates a new section and returns its builder.protected SectionDefinitionBuilder<Void,?>
section(String title, String toolbarId)
Creates a new section and returns its builder.
-
-
-
Method Detail
-
getDefinition
public final IManagingDefinition getDefinition()
Description copied from interface:IApplicationEditorDescriptor
Returns the managing definition.- Specified by:
getDefinition
in interfaceIApplicationEditorDescriptor
- Returns:
- the managing definition, cannot be
null
.
-
getBuilder
protected final ManagingDefinitionBuilder<?> getBuilder()
Returns the application editor descriptor builder.- Returns:
- the application editor descriptor builder, never
null
.
-
createBuilder
protected ManagingDefinitionBuilder<?> createBuilder()
Creates the application editor descriptor builder.
-
section
protected SectionDefinitionBuilder<Void,?> section(String title, String toolbarId)
Creates a new section and returns its builder.- Parameters:
title
- the section title, cannot benull
.toolbarId
- the toolbar id to poputale contributed actions with, can benull
.- Returns:
- a section builder instance, never
null
.
-
section
protected SectionDefinitionBuilder<Void,?> section(String title)
Creates a new section and returns its builder.- Parameters:
title
- the section title, cannot benull
.- Returns:
- a section builder instance, never
null
.
-
rule
protected ManagingDefinitionBuilder<?> rule(IRule rule)
Sets theIRule
.- Parameters:
rule
- the rule, cannot benull
.- Returns:
- the appropriate builder instance, never
null
.
-
build
protected abstract void build()
Builds the descriptor.
-
-