Changes between Version 34 and Version 35 of mvc


Ignore:
Timestamp:
11/20/23 10:20:06 (12 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mvc

    v34 v35  
    6666* BooleanModel is BasicModel containing a boolean
    6767
    68 === ListModel
     68==== ListModel
    6969ListModel contains a list of Models and thus is a compound model.  Elements can be added and removed to the ListModel using add and remove. Individual submodels can be fetched with get(). Properties can be checked with getSize() and contains().
    7070
    71 === MapModel
     71==== MapModel
    7272The MapModel contains a Map, or dictionary, of values. Both key and value are a Model so this is a compound model. That key and value are a Model implies that both key and value can be manipulated directly, without calling the MapModel directly. All implementations of MapModel will listen to such changes and notify the change anyway.
    7373MapModel provides a getValue(key) and a put(key,value) function.
     
    7979
    8080
    81 === SelectionModel
     81==== SelectionModel
    8282A SelectionModel adds selection to a Model, by adding setSelection(), getSelection() and getListModel().
    8383The primary implementation is the DefaultSelectionModel. DefaultSelectionModel takes a ListModel and just stores the selection separately. When a selected  list item is removed, the selection is cleared.
    8484
    85 === TypedModel and RealType
    86 The RealType refers to the actual object contained in the model. This is especially relevant for Compound Models, such as the Person model described above. The getCurrentValue function now returns a Person.
    87 A TypedModel extends a Model by adding a RealType and the functions getCurrentValue and setCurrentValue to get/set the RealType contained by the model.
    88 The reason that the RealType is not included in Model is because the Models provided in this toolbox, and probably part of the Models developed by the GUI developer, must remain abstract and can not be linked to for instance a Person object already.
     85=== Compound Model
     86A compound model is a model containing other Models, for instance the Person model may contain two {{{StringModel}}}s to contain the first and last name, and a {{{NumberModel}}} to contain the age.
     87
     88A compound model is usually not changed directly, it's the contained basic models that change. It does listen to its children but usually only checks the consistency of the contained subvalues (throwing Unacceptable if needed). The compound model normally never calls setValue to its children.
     89
    8990
    9091= Panels