[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

A helper class for View implementations that provides generic implementation for some of the methods. Methods that contain the actual logic of the view are not implemented in this class. A common implementation normally does not need to override any of the methods implemented here, their implementation is generic and should suffice.

The class provides a convenience method for updateing it's children data UpdateChildren(Object[], Object[]). This method should be called from within the View.update(Object[], Object[]) methods in the subclasses.

The following tables list the members exposed by the ViewSupport type.

Public Methods

  NameDescription
AddView
Add a view to the viewable object.

AttachesTo
Return null if the view will accept being attached to a particular object.

static memberDumpChildViews
Convenience method for logging the child views of a Viewable. Only logs if debug is enabled.This is a recursive method.

static memberDumpUpdateParams
Convenience method for logging the parameters passed to the update method. Only logs if debug is enabled.

Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
static memberFindDescendent
Find the descendent view in the view tree under the parent view returning the list of view nodesbetween the parent view and the descendent view. Returns null if the descendent view is not found.Returns an empty list if the descendent view is a child view of the parent view.

GetEnumerator
Returns an enumerator that iterates through the collection.

GetHashCode
Serves as a hash function for a particular type. GetHashCode() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
GetType
Gets the Type of the current instance.
(Inherited from Object.)
GetViews
Returns all added views.

RemoveView
Remove a view.

static memberShallowCopyView
Copies the view by copying the bean properties of the view but does not copy the views children,does not copy or set the property for the parent view.

ToString
Returns a String that represents the current Object.
(Inherited from Object.)
Update
Notify that data has been added or removed from the Viewable parent. The last object in the newData array of objects would be the newest object added to the parent view. The first object of the oldData array of objects would be the oldest object removed from the parent view.

If the call to update contains new (inserted) data, then the first argument will be a non-empty list and the second will be empty. Similarly, if the call is a notification of deleted data, then the first argument will be empty and the second will be non-empty. Either the newData or oldData will be non-null. This method won't be called with both arguments being null, but either one could be null. The same is true for zero-length arrays. Either newData or oldData will be non-empty. If both are non-empty, then the update is a modification notification.

When update() is called on a view by the parent object, the data in newData will be in the collection of the parent, and its data structures will be arranged to reflect that. The data in oldData will not be in the parent's data structures, and any access to the parent will indicate that that data is no longer there.


UpdateChildrenOverloaded.

Protected Methods

  NameDescription
Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)

Explicit Interface Implementations

  NameDescription
Explicit interface implemetationIEnumerable.System.Collections.IEnumerable.GetEnumerator
Returns an enumerator that iterates through a collection.