|
layout | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.canoo.ulc.community.layout.application.ULCXmlConstraintBuilder
A helper class providing the ability to add constraints to a ULCRelativeLayoutPane by parsing XML definition
files.
Adapted to ULC by Seitter.Claus@muenchener-verein.de
| Inner Class Summary | |
static class |
ULCXmlConstraintBuilder.ParseException
An exception subclass with which we'll wrap any exceptions thrown in parsing the constraints specifications, to shield our clients from details about the libraries we use, unless they want to know about them. |
| Field Summary | |
static String |
CONSTRAINT_SET_DTD_PUBLIC
The public identifier by which our constraint-set DTD can be resolved. |
static String |
CONSTRAINT_SET_DTD_SYSTEM
The system identifier by which our constraint-set DTD is loaded. |
| Constructor Summary | |
ULCXmlConstraintBuilder()
Sets up the necessary resources for parsing XML specifications. |
|
| Method Summary | |
protected void |
addComponentConstraint(String component,
org.jdom.Element constraint,
ULCRelativeLayoutPane layout)
Utility method called once we have the element corresponding to a constraint that needs to be created. |
protected void |
addConstraints(org.jdom.Document document,
ULCRelativeLayoutPane layout)
Utility method to do the work of walking the document tree generated by parsing the supplied XML constraint specifications, and turning these into actual constraints to be added to the layout. |
void |
addConstraints(File file,
ULCRelativeLayoutPane layout)
Add constraints parsed from a file. |
void |
addConstraints(InputStream stream,
ULCRelativeLayoutPane layout)
Add constraints parsed from an input stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String CONSTRAINT_SET_DTD_PUBLIC
public static final String CONSTRAINT_SET_DTD_SYSTEM
| Constructor Detail |
public ULCXmlConstraintBuilder()
| Method Detail |
protected void addComponentConstraint(String component,
org.jdom.Element constraint,
ULCRelativeLayoutPane layout)
throws org.jdom.DataConversionException,
ULCXmlConstraintBuilder.ParseException
component - the name of the component being constrained.constraint - the XML element representing the constraint.layout - the layout to which the constraints should be added.org.jdom.DataConversionException - if there's a problem parsing an attribute.ULCXmlConstraintBuilder.ParseException - if there's a problem parsing the constraint.
protected void addConstraints(org.jdom.Document document,
ULCRelativeLayoutPane layout)
throws org.jdom.DataConversionException,
ULCXmlConstraintBuilder.ParseException
document - the parsed constraint document.layout - the layout to which the constraints should be added.org.jdom.DataConversionException - if there's a problem parsing an attribute.ULCXmlConstraintBuilder.ParseException - if there's a problem parsing the constraint.
public void addConstraints(File file,
ULCRelativeLayoutPane layout)
throws ULCXmlConstraintBuilder.ParseException
file - the file containing XML constraint specifications.layout - the layout to which the parsed constraints should be added.ULCXmlConstraintBuilder.ParseException - if there is a problem parsing the constraints.
public void addConstraints(InputStream stream,
ULCRelativeLayoutPane layout)
throws ULCXmlConstraintBuilder.ParseException
stream - the input stream containing XML constraint specifications.layout - the layout to which the parsed constraints should be added.ULCXmlConstraintBuilder.ParseException - if there is a problem parsing the constraints.
|
layout | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||