|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.fotree.value.PropertyValueStatic
org.foray.fotree.value.PropertyCollection
public class PropertyCollection
This class is odd because it is a PropertyValue subclass that encapsulates one or more Property instances. It is useful for properties like "border-style" which can contain 1, 2, 3 or 4 values, and which must be wrapped up and unwrapped in some orderly way.
Constructor Summary | |
---|---|
PropertyCollection()
Constructor. |
Method Summary | |
---|---|
void |
addItem(Property property)
Add an item to the collection. |
boolean |
canEvalKeyword()
Indicates whether this property value can evaluate to a keyword. |
PvKeyword |
evalKeyword()
Returns the keyword value of this property value. |
Property |
findProperty(FoProperty propertyType)
Returns the first occurrence of a Property in the collection that is of the type propertyType. |
int |
getCount()
Returns the number of items in this collection. |
Property |
getItem(int index)
Returns a specific property from the collection. |
List<Property> |
getValue()
Returns the list of properties in this collection. |
static byte |
whichElementForDirectional(org.axsl.common.value.Compass direction,
int size)
Determines which of the elements in this PropertyCollection should be used for the given direction that is supplied. |
Methods inherited from class org.foray.fotree.value.PropertyValueStatic |
---|
canEvalColor, canEvalInteger, canEvalLength, canEvalNumeric, canEvalPercentage, evalColor, evalInteger, evalIntegerException, evalKeywordException, evalLength, evalLengthException, evalNumeric, evalPercentage, evalPercentageException, getUnitPower, lengthRequiresFontSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyCollection()
Method Detail |
---|
public void addItem(Property property)
property
- The property to add to the collection.public List<Property> getValue()
public int getCount()
public Property getItem(int index)
index
- The index to the property needed.
public static byte whichElementForDirectional(org.axsl.common.value.Compass direction, int size)
"If there is only one value, it applies to all sides. If there are two values, the top and bottom borders are set to the first value and the right and left are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values, they apply to the top, right, bottom, and left, respectively."
direction
- One of the integral direction identifiers (e.g.
ABSOLUTE_DIR_LEFT).size
- The number of elements that exist in the collection.
public Property findProperty(FoProperty propertyType)
propertyType
- The propertyType which is being sought.
public boolean canEvalKeyword()
PropertyValue
public PvKeyword evalKeyword()
PropertyValue
PropertyValue.canEvalKeyword()
returns true.
Doing so on other instances may result in an
IllegalStateException
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |