Class ScreenBuilders
-
Field Summary
Modifier and TypeFieldDescriptionprotected EditorBuilderProcessor
protected LookupBuilderProcessor
protected ScreenBuilderProcessor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<E> EditorBuilder<E>
editor
(EntityPicker<E> field) Creates a screen builder usingEntityPicker
component.<E> EditorBuilder<E>
editor
(ListComponent<E> listComponent) Creates a screen builder using list component.<E> EditorBuilder<E>
editor
(Class<E> entityClass, FrameOwner origin) Creates a screen builder.<E> LookupBuilder<E>
lookup
(EntityPicker<E> field) Creates a screen builder usingEntityPicker
component.<E> LookupBuilder<E>
lookup
(ListComponent<E> listComponent) Creates a screen builder using list component.<E> LookupBuilder<E>
Creates a screen builder usingTagPicker
component.<E> LookupBuilder<E>
lookup
(Class<E> entityClass, FrameOwner origin) Creates a screen builder.screen
(FrameOwner origin) Creates a screen builder.
-
Field Details
-
editorBuilderProcessor
-
lookupBuilderProcessor
-
screenBuilderProcessor
-
-
Constructor Details
-
ScreenBuilders
public ScreenBuilders()
-
-
Method Details
-
editor
Creates a screen builder.Example of building a screen for editing an entity:
SomeCustomerEditor screen = screenBuilders.editor(Customer.class, this) .withScreen(SomeCustomerEditor.class) .withListComponent(customersTable) .editEntity(customersTable.getSingleSelected()) .build();
Example of building a screen for creating a new entity instance:
SomeCustomerEditor screen = screenBuilders.editor(Customer.class, this) .withScreen(SomeCustomerEditor.class) .withListComponent(customersTable) .newEntity() .build();
- Parameters:
entityClass
- edited entity classorigin
- invoking screen- See Also:
-
editor
Creates a screen builder using list component.Example of building a screen for editing a currently selected entity:
SomeCustomerEditor screen = screenBuilders.editor(customersTable) .withScreen(SomeCustomerEditor.class) .build();
Example of building a screen for creating a new entity instance:
SomeCustomerEditor screen = screenBuilders.editor(customersTable) .withScreen(SomeCustomerEditor.class) .newEntity() .build();
-
editor
Creates a screen builder usingEntityPicker
component.Example of building a screen for editing a currently set value:
SomeCustomerEditor screen = screenBuilders.editor(customerPicker) .withScreen(SomeCustomerEditor.class) .build();
Example of building a screen for creating a new entity instance:
SomeCustomerEditor screen = screenBuilders.editor(customerPicker) .withScreen(SomeCustomerEditor.class) .newEntity() .build();
- Parameters:
field
-EntityPicker
,EntityComboBox
or another picker component- See Also:
-
lookup
Creates a screen builder.Example of building a lookup screen for adding instance to data container:
SomeCustomerListScreen screen = screenBuilders.lookup(Customer.class, this) .withScreen(SomeCustomerListScreen.class) .withOpenMode(OpenMode.DIALOG) .withContainer(customersDc) .build();
Example of building a lookup screen with custom select handler:
SomeCustomerListScreen screen = screenBuilders.lookup(Customer.class, this) .withScreen(SomeCustomerListScreen.class) .withOpenMode(OpenMode.DIALOG) .withSelectHandler(customers -> { // customers contains selected values }) .build();
- Type Parameters:
E
- type of entity- Parameters:
entityClass
- entity classorigin
- invoking screen
-
lookup
Creates a screen builder using list component.Example of building a lookup screen for adding row to table / tree component:
SomeCustomerListScreen screen = screenBuilders.lookup(customersTable) .withScreen(SomeCustomerListScreen.class) .build();
-
lookup
Creates a screen builder usingEntityPicker
component.Example of building a lookup screen for setting value to
EntityPicker
:SomeCustomerListScreen screen = screenBuilders.lookup(customerPicker) .withScreen(SomeCustomerListScreen.class) .build();
- Type Parameters:
E
- type of entity- Parameters:
field
-EntityPicker
,EntityComboBox
or another picker component- See Also:
-
lookup
Creates a screen builder usingTagPicker
component.Example of building a lookup screen for setting value to
TagPicker
:SomeCustomerListScreen screen = screenBuilders.lookup(customerTagPicker) .withScreen(SomeCustomerListScreen.class) .build();
- Type Parameters:
E
- type of entity- Parameters:
field
-TagPicker
- Returns:
- instance of lookup builder
- See Also:
-
screen
Creates a screen builder.Example of building a screen:
SomeScreen screen = screenBuilders.screen(this) .withScreen(SomeScreen.class) .build();
- Parameters:
origin
- invoking screen
-