|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.composite.persistence.CompositeBuilder
com.tensegrity.composite.persistence.CompositeGroupBuilder
The class CompositeGroupBuilder creates a CompositeGroup instance from a given AttributeList containing the definition of such group.
| Constructor Summary | |
CompositeGroupBuilder()
Constructor for CompositeGroupBuilder. |
|
| Method Summary | |
java.lang.Object |
build(AttributeList list)
Creates a composite instance from the given AttributeList. |
protected Anchor |
getAnchorMayBeNull(AttributeList list,
java.lang.String attributename)
|
protected Size |
getSize(AttributeList list,
java.lang.String attributeName)
Returns an instance of Size created by the passed
AttributeList elements. |
protected Size |
getSizeMayBeNull(AttributeList list,
java.lang.String attributeName,
Size defaultValue)
This method returns an instance of size read from the given AttributeList. |
protected void |
setGroupAttributes(CompositeGroup group,
AttributeList list)
Applies the attributes from the given list to the given group. |
| Methods inherited from class com.tensegrity.composite.persistence.CompositeBuilder |
addPrimitives, getLocation, getSizeMayBeNull, getTransform, readFlag, readFlagMayBeNull, setCompositeAttributes, setGeometryAttributes, setStyleAttributes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CompositeGroupBuilder()
| Method Detail |
public java.lang.Object build(AttributeList list)
throws BuildException
CompositeBuilderAttributeList.
build in interface Builderbuild in class CompositeBuilderBuildExceptionBuilder.build(AttributeList)
protected void setGroupAttributes(CompositeGroup group,
AttributeList list)
throws BuildException
group - the CompositeGroup to apply the
Attributes to.list - a AttributeList holding the
Attributes.
BuildException - thrown if one of the internally used methods throws
an exception.
protected Size getSize(AttributeList list,
java.lang.String attributeName)
throws BuildException
Size created by the passed
AttributeList elements.
getSize in class CompositeBuilderlist - the AttributeList.attributeName - the name of the Attribute.
Size created by the passed
AttributeList.
BuildException
protected Size getSizeMayBeNull(AttributeList list,
java.lang.String attributeName,
Size defaultValue)
throws BuildException
attributeName-attribute and creates the
Size instance from it. If no such attribute can be read or the value is
null, the parameter defaultValue is returned.
list - the AttributeList to read the size attribute from.attributeName - the name of the attribute in the list which value is
a serialized Size instance.defaultValue - the value which should be returned, if no such attribute
is found or its value is null.
BuildException - thrown if
BuilderUtilities.getAttributeValueMayBeNull(AttributeList, String, Class)
throws an exception.
protected Anchor getAnchorMayBeNull(AttributeList list,
java.lang.String attributename)
throws BuildException
BuildException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||