Changes between Version 34 and Version 35 of mvc
- Timestamp:
- 11/20/23 10:20:06 (12 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
mvc
v34 v35 66 66 * BooleanModel is BasicModel containing a boolean 67 67 68 === ListModel68 ==== ListModel 69 69 ListModel 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(). 70 70 71 === MapModel71 ==== MapModel 72 72 The 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. 73 73 MapModel provides a getValue(key) and a put(key,value) function. … … 79 79 80 80 81 === SelectionModel81 ==== SelectionModel 82 82 A SelectionModel adds selection to a Model, by adding setSelection(), getSelection() and getListModel(). 83 83 The 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. 84 84 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 86 A 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 88 A 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 89 90 90 91 = Panels