public class ServerComponentUpdate
extends java.lang.Object
implements java.io.Serializable
LayoutData states of
children of the component.| Constructor and Description |
|---|
ServerComponentUpdate(Component parent)
Creates a new
ServerComponentUpdate representing the given
parent Component. |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(Component child)
Adds a description of an added child to the
ServerComponentUpdate. |
void |
appendRemovedDescendants(ServerComponentUpdate update)
Appends the removed child and descendant components of the given
ServerComponentUpdate to this
ServerComponentUpdate's list of removed descendants. |
void |
cancelUpdateProperty(java.lang.String propertyName)
Cancels an update to a property.
|
Component[] |
getAddedChildren()
Returns the child components which have been added to the parent.
|
Component |
getParent()
Returns the parent component being updated.
|
Component[] |
getRemovedChildren()
Returns the child components which have been removed from the parent.
|
Component[] |
getRemovedDescendants()
Returns all descendants of the child components which have been
removed from the parent.
|
Component[] |
getUpdatedLayoutDataChildren()
Returns the child components whose
LayoutData properties
have been updated. |
PropertyUpdate |
getUpdatedProperty(java.lang.String name)
Returns a
PropertyUpdate describing an update to the
property with the given name. |
java.lang.String[] |
getUpdatedPropertyNames()
Returns the names of all properties being updated in this update.
|
boolean |
hasAddedChild(Component component)
Determines if the specified component has been added
as a child in this update.
|
boolean |
hasAddedChildren()
Determines if the update is adding any children to the parent component.
|
boolean |
hasRemovedChild(Component component)
Determines if the specified child was removed from the parent component.
|
boolean |
hasRemovedChildren()
Determines if the update is removing children from the parent
component.
|
boolean |
hasRemovedDescendant(Component component)
Determines if the specified component is a removed child or descendant of the parent component.
|
boolean |
hasRemovedDescendants()
Determines if the update is removing children from the parent that
have descendants.
|
boolean |
hasUpdatedLayoutDataChildren()
Determines if the update has child components whose
LayoutData states have changed. |
boolean |
hasUpdatedProperties()
Determines if the update is updating properties of the parent component.
|
boolean |
hasUpdatedProperty(java.lang.String propertyName)
Determines if the update is updating a specific property of the parent component.
|
void |
removeChild(Component child)
Adds a description of a removed child to the
ServerComponentUpdate. |
void |
removeDescendant(Component descendant)
Recursive method to add descriptions of descendants which were
removed.
|
java.lang.String |
toString()
Display debug representation.
|
void |
updateLayoutData(Component child)
Adds a description of an update to a child component's
LayoutData information to the
ServerComponentUpdate. |
void |
updateProperty(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Adds a description of an update to a property of the parent component
to the
ServerComponentUpdate. |
public ServerComponentUpdate(Component parent)
ServerComponentUpdate representing the given
parent Component.parent - the updating parent Componentpublic void addChild(Component child)
ServerComponentUpdate.child - the child being addedpublic void cancelUpdateProperty(java.lang.String propertyName)
propertyName - the property update to cancelpublic void appendRemovedDescendants(ServerComponentUpdate update)
ServerComponentUpdate to this
ServerComponentUpdate's list of removed descendants. This method is invoked by the
ServerUpdateManager when a component is removed that is an ancestor of a component that has been updated. In
such a case, the descendant ServerComponentUpdate is destroyed, and thus its removed descendant components must
be stored in the ancestor ServerComponentUpdate.update - the ServerComponentUpdate whose removed descendants are to be appendedpublic Component[] getAddedChildren()
public Component getParent()
public Component[] getRemovedChildren()
getRemovedDescendants()public Component[] getRemovedDescendants()
getRemovedChildren()public Component[] getUpdatedLayoutDataChildren()
LayoutData properties
have been updated.public PropertyUpdate getUpdatedProperty(java.lang.String name)
PropertyUpdate describing an update to the
property with the given name.name - the name of the property being updatedPropertyUpdate, or null if none existsgetUpdatedPropertyNames()public java.lang.String[] getUpdatedPropertyNames()
getUpdatedPropertyNames()public boolean hasAddedChild(Component component)
component - the component to testpublic boolean hasAddedChildren()
public boolean hasRemovedChild(Component component)
component - the potentially removed childpublic boolean hasRemovedChildren()
public boolean hasRemovedDescendant(Component component)
component - the potentially removed child/descendantpublic boolean hasRemovedDescendants()
public boolean hasUpdatedLayoutDataChildren()
LayoutData states have changed.LayoutData properties are being updatedpublic boolean hasUpdatedProperties()
public boolean hasUpdatedProperty(java.lang.String propertyName)
propertyName - the property namepublic void removeChild(Component child)
ServerComponentUpdate.child - the child being removedpublic void removeDescendant(Component descendant)
descendant - the removed descendantpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public void updateLayoutData(Component child)
LayoutData information to the
ServerComponentUpdate.child - the updated childpublic void updateProperty(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
ServerComponentUpdate.propertyName - the name of the propertyoldValue - the previous value of the propertynewValue - the current value of the property