Changes between Version 3 and Version 4 of mvc


Ignore:
Timestamp:
06/13/22 10:05:27 (3 years ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mvc

    v3 v4  
    1212== Why a toolbox?
    1313This toolbox is to help users develop an MVC based GUI. The tools built into Java lack some functionality: while Java provides a ListModel and a TableModel, it lacks other models such as a StringModel.
     14
     15== The Model
     16The toolbox has a hierarchy of Models. This section describes the various standard models.
     17
     18=== Model and Submodels
     19At the root is the Model interface. A model basically is an object, which implicitly contains some values that can be adjusted. The interface only specifies that the object broadcasts Event objects whenever something changes in the model.
     20A Model can contain recursively contain sub-models. For instance a Person model may contain a StringModel containing the name, and a NumberModel containing the age.
     21
     22=== Event object
     23All  Event objects are objects containing details of a change that happened in a model. It contains a reference to the source Model of the event, and possibly a child event if the change happened on some sub-model.
     24There are four types of changes to a model:
     25* Changed: a sub-model of the model changed
     26* Added: a model (eg a list) just got extended by addition of a new submodel
     27* Removed: a model (eg a list) just got shrinked by removal of a submodel
     28* Selected: a model (eg in a list) just got selected
     29