public static interface Action.ScreenOpeningAction
Modifier and Type | Method and Description |
---|---|
OpenMode |
getOpenMode()
Returns the screen open mode if it was set by
setOpenMode(OpenMode)
or in the screen XML, otherwise returns null . |
java.lang.Class<? extends Screen> |
getScreenClass()
Returns the screen class if it was set by
setScreenClass(Class)
or in the screen XML, otherwise returns null . |
java.lang.String |
getScreenId()
Returns the screen id if it was set by
setScreenId(String)
or in the screen XML, otherwise returns null . |
void |
setAfterCloseHandler(java.util.function.Consumer<Screen.AfterCloseEvent> afterCloseHandler)
Sets the handler to be invoked when the editor screen closes.
|
void |
setOpenMode(OpenMode openMode)
Sets the screen open mode.
|
void |
setScreenClass(java.lang.Class<? extends Screen> screenClass)
Sets the screen class.
|
void |
setScreenConfigurer(java.util.function.Consumer<Screen> screenConfigurer)
Sets the screen configurer.
|
void |
setScreenId(java.lang.String screenId)
Sets the screen id.
|
void |
setScreenOptionsSupplier(java.util.function.Supplier<ScreenOptions> screenOptionsSupplier)
Sets the screen options supplier.
|
@Nullable OpenMode getOpenMode()
setOpenMode(OpenMode)
or in the screen XML, otherwise returns null
.void setOpenMode(@Nullable OpenMode openMode)
openMode
- the open mode to set@Nullable java.lang.String getScreenId()
setScreenId(String)
or in the screen XML, otherwise returns null
.void setScreenId(@Nullable java.lang.String screenId)
screenId
- the screen id to set@Nullable java.lang.Class<? extends Screen> getScreenClass()
setScreenClass(Class)
or in the screen XML, otherwise returns null
.void setScreenClass(@Nullable java.lang.Class<? extends Screen> screenClass)
screenClass
- the screen class to setvoid setScreenOptionsSupplier(java.util.function.Supplier<ScreenOptions> screenOptionsSupplier)
ScreenOptions
to the opened screen.
The preferred way to set the supplier is using a controller method
annotated with Install
, e.g.:
@Install(to = "petsTable.view", subject = "screenOptionsSupplier") protected ScreenOptions petsTableViewScreenOptionsSupplier() { return new MapScreenOptions(ParamsMap.of("someParameter", 10)); }
void setScreenConfigurer(java.util.function.Consumer<Screen> screenConfigurer)
The preferred way to set the configurer is using a controller method
annotated with Install
, e.g.:
@Install(to = "petsTable.view", subject = "screenConfigurer") protected void petsTableViewScreenConfigurer(Screen editorScreen) { ((PetEdit) editorScreen).setSomeParameter(someValue); }
void setAfterCloseHandler(java.util.function.Consumer<Screen.AfterCloseEvent> afterCloseHandler)
The preferred way to set the handler is using a controller method
annotated with Install
, e.g.:
@Install(to = "petsTable.view", subject = "afterCloseHandler") protected void petsTableViewAfterCloseHandler(AfterCloseEvent event) { if (event.closedWith(StandardOutcome.COMMIT)) { System.out.println("Committed"); } }