| Home >> All >> org >> scopemvc >> model |
| | org.scopemvc.model.basic.* (3) | | org.scopemvc.model.beans.* (8) | | org.scopemvc.model.collection.* (5) |
| | org.scopemvc.model.util.* (3) |
Package Samples:
org.scopemvc.model.basic
org.scopemvc.model.beans
org.scopemvc.model.collection
org.scopemvc.model.util
Classes:
BasicModel: A simple implementation of ModelChangeEventSource for use as a base class. An alternative (JavaBeans style) is to use ModelChangeEventSupport as a delegate in all models. To implement a BasicModel: extend BasicModel , Notify interested listeners of changes in Model state at the end of set methods by: fireModelChange(...) Register as a ModelChangeListener with submodels in the appropriate set methods to ensure event propogation up the tree of models. For example: public final static Selector NAME = Selector.fromString("name"); public final static Selector ADDRESS = Selector.fromString("address"); ...
ListModelAdaptor: Used to present a list of ListModelSource s as an active BasicModel. Useful when initialising org.scopemvc.view.swing.SComboBox or org.scopemvc.view.swing.SList with a static list of data. This will propogate ModelChangeEvents from sublists that are ModelChangeEventSources. Note that this adaptor registers as a listener with such sublists: it may be necessary to manually unregister with removeModelChangeListeners() 55 if an adaptor is no longer needed. The adaptor can present its ListModelSources as a sorted list if a Comparator is passed to setComparator(java.util.Comparator) 55 or all list elements ...
BeansEditorManager: BeansEditorManager is a org.scopemvc.core.EditorManager that handles creation of editors and viewer for properties of JavaBean model objects. Currently this ignores BeanInfo and uses the defaults in org.scopemvc.view.util.PropertyEditorFactory since the BeanInfo API has no way to distinguish different View implementations and doesn't have a getter for a viewer, just an editor. We could handle this a little better by type-checking the BeanInfo property editor for instanceof JComponent (and View) to see if it has a Swing impl, however that doesn't really work for arbitrary view types.
ArrayModel: A BasicModel wrapper for an Object[] that can propogate changes to contained Models up the Model hierarchy, and implements the java.util.List interface. The array itself is exposed via the "array" property, however, changes to this array must be made through the public API in order to maintain the model change propogation. By default ArrayModel registers itself as a listener to Models that are added to the array and deregisters when those Models are removed. This behaviour can be changed at creation so that ModelChangeEvent propogation is disabled.
SetModel: A BasicModel wrapper for an Set that can propogate changes to contained Models up the Model hierarchy. The set itself is exposed via the "set" property, however, changes to this underlying set must be made through this class's public API in order to maintain the event propogation. By default SetModel registers itself as a listener to Models that are added to the list and deregisters when those Models are removed. This behaviour can be changed at creation so that ModelChangeEvent propogation from contained models is disabled.
ListModel: A BasicModel wrapper for an List that can propogate changes to contained Models up the Model hierarchy. The list itself is exposed via the "list" property, however, changes to this list must be made through this class's public API in order to maintain the event propogation. By default ListModel registers itself as a listener to Models that are added to the list and deregisters when those Models are removed. This behaviour can be changed at creation so that ModelChangeEvent propogation is disabled.
Accessor: Describes a single JavaBeans accessor. Since this includes indexed properties, it might represent access into an ordered Collection, consuming two Selectors: a String one to describes the Collection and an int one to fetch the member of the List. eg "customers.0" can be traversed in one step if the parent model JavaBean has a getCustomer(int) method. Handles java.util.List and Object[] for int indexed properties.
DynamicReadOnly: BeansPropertyManager queries models that implement this for whether a property is read-only before falling back on simply looking for a setter/getter. If access to properties in a model can be dynamically changed then implement this. ***** This can't handle JavaBeans indexed properties.
ListModelSource: Used with ListModelAdaptor to wrap a Collection, List, Array, Enumeration or Iterator as the source of a list of model objects. Useful when initialising org.scopemvc.view.swing.SComboBox or org.scopemvc.view.swing.SList with a static list of data.
IntIndexSelectorIterator: An Iterator that iterates between a range of IntIndexSelectors. Construct with a start and end index: the iterator steps over this sequence inclusive. ie (0, 0) gives a 0 Selector, but (0, -1) gives no Selector. Note: the Selectors returned must be treated as immutable: it is the same Selector.
DynamicInvokable: BeansActionManager queries models that implement this for whether a ModelAction can be invoked. If access to ModelActions can be dynamically changed then implement this.
ModelChangeEventSupport: Delegate to help ModelChangeEvent listener registration and firing. Used by BasicModel . Events are fired synchronously in this implementation.
BeansActionManager: BeansActionManager is a org.scopemvc.core.ActionManager that handles the actions (invokable methods) of JavaBean model objects.
BeansPropertyManager: BeansPropertyManager is a org.scopemvc.core.PropertyManager that handles the properties of JavaBean model objects.
BasicModelChangeEvent: Concrete implementation of ModelChangeEvent .
BeanInfos: Internal class used by the Beans ModelManagers to access BeanInfo for model objects.
CompoundSelectorIterator: An Iterator that iterates through the iterations of two child Iterators in sequence.
NullPropertyException: Internal Exception to mark traversal of properties that are null.
ArraySelectorIterator: An Iterator that iterates over an array of Selectors.
| Home | Contact Us | Privacy Policy | Terms of Service |