Interface MainPanelPresentation
public interface MainPanelPresentation
This interface describes all the interactions with the presentation object.
- Author:
- Fabrizio Giudici
- Stereotype:
- Presentation
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classIf the presentation contains form fields, it's a good practice to group them together within a single class which exposesBoundPropertyinstances. -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(MainPanelPresentation.Bindings bindings) A presentation always exposes abind()method which is invoked by the control and binds callbacks and form fields.voidnotify(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.voidDisplays a notification in the presentation.voidpickDirectory(BoundProperty<Path> selectedFolder, UserNotificationWithFeedback notification) Asks the user to pick a directory.voidpickFile(BoundProperty<Path> selectedFile, UserNotificationWithFeedback notification) Asks the user to pick a file.voidpopulate(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 byPresentationModels. 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
-