From a4de1d4257a7a62f71fc64eb6a56b09359aaf47a Mon Sep 17 00:00:00 2001 From: Francesco Galgani <1997316+jsfan3@users.noreply.github.com> Date: Wed, 29 Apr 2020 11:43:38 +0200 Subject: [PATCH] Fixed typo --- docs/javadoc/overview-summary.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/javadoc/overview-summary.html b/docs/javadoc/overview-summary.html index 3f3d1e74..327290b7 100644 --- a/docs/javadoc/overview-summary.html +++ b/docs/javadoc/overview-summary.html @@ -547,7 +547,7 @@
In order to get the benefits of MVC, you shouldn’t put any program login inside the view, outside of logic required to make the view function as a view. If you’re used to calling addActionListener()
directly on your buttons inside your view, thing may take some getting used to. It requires some discipline.
In order to get the benefits of MVC, you shouldn’t put any program logic inside the view, outside of logic required to make the view function as a view. If you’re used to calling addActionListener()
directly on your buttons inside your view, thing may take some getting used to. It requires some discipline.
Use Actions
Rather than embed logic directly inside the view, you should use actions to propagate relevant events up to the controller. The ChatRoomView
, for example, needs to let the controller know when the user has clicked the "Send" button in the chat room so that it can process the user input. In order to facilitate this, it defines an action category named SEND_ACTION
, which the controller can use to register its own sent action to process such events. When a user clicks the "Send" button of the view, the view checks to see if there is an action registered in this catgory, and, if so, it will fire the action.