Interface MainPanelPresentation
public interface MainPanelPresentation
This interface describes all the interactions with the presentation object.
- Author:
- Fabrizio Giudici
- Stereotype:
- Presentation
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
If the presentation contains form fields, it's a good practice to group them together within a single class which exposesBoundProperty
instances. -
Method Summary
Modifier and TypeMethodDescriptionvoid
bind
(MainPanelPresentation.Bindings bindings) A presentation always exposes abind()
method which is invoked by the control and binds callbacks and form fields.void
notify
(UserNotificationWithFeedback notification) When the control requires an interaction with the user in form of a dialog box with feedback (such as Ok/Cancel) a method must be exposed which accepts aUserNotificationWithFeedback
.void
Displays a notification in the presentation.void
pickDirectory
(BoundProperty<Path> selectedFolder, UserNotificationWithFeedback notification) Asks the user to pick a directory.void
pickFile
(BoundProperty<Path> selectedFile, UserNotificationWithFeedback notification) Asks the user to pick a file.void
populate
(PresentationModel pmSimpleEntities, PresentationModel pmDciEntities, PresentationModel pmFileEntities) A presentation also exposes somepopulateXYZ()
methods which are used to fill various parts of the UI with model.
-
Method Details
-
bind
A presentation always exposes abind()
method which is invoked by the control and binds callbacks and form fields. There is no requirement on the name and signature of the method.- Parameters:
bindings
- the container of bindings
-
populate
void populate(@Nonnull PresentationModel pmSimpleEntities, @Nonnull PresentationModel pmDciEntities, @Nonnull PresentationModel pmFileEntities) A presentation also exposes somepopulateXYZ()
methods which are used to fill various parts of the UI with model. Data structures are modelled byPresentationModel
s. There is no requirement on the name of the method.- Parameters:
pmSimpleEntities
- the presentation model for SimpleEntity instancespmDciEntities
- the presentation model for SimpleDciEntity instancespmFileEntities
- the presentation model for FileEntity instances
-
notify
When the control requires an interaction with the user in form of a dialog box with feedback (such as Ok/Cancel) a method must be exposed which accepts aUserNotificationWithFeedback
. There is no requirement on the name of the method.- Parameters:
notification
- the object managing the interaction
-
notify
Displays a notification in the presentation.- Parameters:
message
- the text of the notification
-
pickFile
void pickFile(@Nonnull BoundProperty<Path> selectedFile, @Nonnull UserNotificationWithFeedback notification) Asks the user to pick a file.- Parameters:
selectedFile
- a property containing both the file to pre-select and later the piked filenotification
- the object managing the interaction
-
pickDirectory
void pickDirectory(@Nonnull BoundProperty<Path> selectedFolder, @Nonnull UserNotificationWithFeedback notification) Asks the user to pick a directory.- Parameters:
selectedFolder
- a property containing both the directory to pre-select and later the picked foldernotification
- the object managing the interaction
-