public class CompoundPropertyMaker extends PropertyMaker
contextDep, corresponding, defaultProperty, defaultValue, propId, setByShorthand
Constructor and Description |
---|
CompoundPropertyMaker(int propId)
Construct an instance of a CompoundPropertyMaker for the given property.
|
Modifier and Type | Method and Description |
---|---|
void |
addSubpropMaker(PropertyMaker subproperty)
Add a subproperty to this maker.
|
protected Property |
checkEnumValues(java.lang.String value)
For compound properties which can take enumerate values.
|
protected Property |
convertProperty(Property p,
PropertyList propertyList,
FObj fo)
Return a Property object based on the passed Property object.
|
Property |
get(int subpropertyId,
PropertyList propertyList,
boolean tryInherit,
boolean tryDefault)
Return the property on the current FlowObject.
|
PropertyMaker |
getSubpropMaker(int subpropertyId)
Return a Maker object which is used to set the values on components
of compound property types, such as "space".
|
Property |
make(Property baseProperty,
int subpropertyId,
PropertyList propertyList,
java.lang.String value,
FObj fo)
Return a property value for a compound property.
|
Property |
make(PropertyList propertyList)
Make a compound property with default values.
|
Property |
make(PropertyList propertyList,
java.lang.String value,
FObj fo)
Create a Property object from an attribute specification.
|
protected Property |
makeCompound(PropertyList propertyList,
FObj parentFO)
Create a empty compound property and fill it with default values for
the subproperties.
|
void |
useGeneric(PropertyMaker generic)
Copy all the values from the generic maker to this maker.
|
addEnum, addKeyword, addShorthand, checkValueKeywords, clone, compute, convertPropertyDatatype, convertShorthandProperty, findProperty, getName, getPercentBase, getPropId, getShorthand, getSubprop, isInherited, makeNewProperty, setByShorthand, setCorresponding, setDatatypeParser, setDefault, setDefault, setInherited, setPercentBase, setSubprop
public CompoundPropertyMaker(int propId)
propId
- The Constant ID of the property to be made.public void useGeneric(PropertyMaker generic)
useGeneric
in class PropertyMaker
generic
- a generic property maker.public void addSubpropMaker(PropertyMaker subproperty)
addSubpropMaker
in class PropertyMaker
subproperty
- the sub propertypublic PropertyMaker getSubpropMaker(int subpropertyId)
getSubpropMaker
in class PropertyMaker
subpropertyId
- the id of the component for which a Maker is to
returned, for example CP_OPTIMUM, if the FO attribute is
space.optimum='10pt'.protected Property checkEnumValues(java.lang.String value)
checkEnumValues
in class PropertyMaker
value
- the string containing the property valuepublic Property get(int subpropertyId, PropertyList propertyList, boolean tryInherit, boolean tryDefault) throws PropertyException
get
in class PropertyMaker
subpropertyId
- The subproperty id of the property being retrieved.
Is 0 when retriving a base property.propertyList
- The PropertyList object being built for this FO.tryInherit
- true if inherited properties should be examined.tryDefault
- true if the default value should be returned.PropertyException
- if a property exception occursprotected Property convertProperty(Property p, PropertyList propertyList, FObj fo) throws PropertyException
convertProperty
in class PropertyMaker
p
- The Property object return by the expression parserpropertyList
- The PropertyList object being built for this FO.fo
- The parent FO for the FO whose property is being made.PropertyException
- for invalid or inconsistent FO inputpublic Property make(PropertyList propertyList) throws PropertyException
make
in class PropertyMaker
propertyList
- The PropertyList object being built for this FO.PropertyException
- for invalid or inconsisten FO inputpublic Property make(PropertyList propertyList, java.lang.String value, FObj fo) throws PropertyException
make
in class PropertyMaker
propertyList
- The PropertyList object being built for this FO.value
- The attribute value.fo
- The parent FO for the FO whose property is being made.PropertyException
- for invalid or inconsistent FO inputpublic Property make(Property baseProperty, int subpropertyId, PropertyList propertyList, java.lang.String value, FObj fo) throws PropertyException
make
in class PropertyMaker
baseProperty
- The Property object representing the compound property,
for example: SpaceProperty.subpropertyId
- The Constants ID of the subproperty (component)
whose value is specified.propertyList
- The propertyList being built.fo
- The parent FO for the FO whose property is being made.value
- the value of thePropertyException
- for invalid or inconsistent FO inputprotected Property makeCompound(PropertyList propertyList, FObj parentFO) throws PropertyException
propertyList
- The propertyList being built.parentFO
- The parent FO for the FO whose property is being made.PropertyException
- ...Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.