|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.foray.fotree.value.PropertyValueStatic
public abstract class PropertyValueStatic
Abstract superclass for static property values, that is, property values that are not expressions.
| Constructor Summary | |
|---|---|
PropertyValueStatic()
|
|
| Method Summary | |
|---|---|
boolean |
canEvalColor()
Indicates whether this property value has the ability to express itself as a Color. |
boolean |
canEvalInteger()
Indicates whether this property value has the ability to express itself as an integer Numeric item. |
boolean |
canEvalLength()
Indicates whether this expression can be evaluated to a unit power = 1 (length) or not. |
boolean |
canEvalNumeric()
Indicates whether this property value has the ability to express itself as a Numeric item. |
boolean |
canEvalPercentage()
Indicates whether this property value can evaluate to a percentage. |
Color |
evalColor()
Return the color value of "this". |
int |
evalInteger()
Return this value as an int. |
IllegalStateException |
evalIntegerException()
Standard exception when trying to evaluate to an Integer for a value that cannot do so. |
IllegalStateException |
evalKeywordException()
Standard exception when trying to evaluate to a Keyword for a value that cannot do so. |
int |
evalLength(int pointSize)
Evaluates the expression to a unit power of 1 (length). |
IllegalStateException |
evalLengthException()
Standard exception when trying to evaluate to a Length for a value that cannot do so. |
double |
evalNumeric()
Return the raw numeric value of "this", without regard to unit power. |
float |
evalPercentage()
Returns the percentage value of this property value. |
IllegalStateException |
evalPercentageException()
Standard exception when trying to evaluate to a Percentage for a value that cannot do so. |
byte |
getUnitPower()
Each numeric has a "unit power". |
boolean |
lengthRequiresFontSize()
Indicates whether the computation of the length will require an accurate font-size parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.foray.fotree.value.PropertyValue |
|---|
canEvalKeyword, evalKeyword |
| Constructor Detail |
|---|
public PropertyValueStatic()
| Method Detail |
|---|
public boolean canEvalNumeric()
PropertyValue
canEvalNumeric in interface PropertyValuepublic double evalNumeric()
PropertyValue
evalNumeric in interface PropertyValuepublic boolean canEvalLength()
PropertyValue
canEvalLength in interface PropertyValuepublic boolean canEvalColor()
PropertyValue
canEvalColor in interface PropertyValuepublic Color evalColor()
PropertyValue
evalColor in interface PropertyValuepublic byte getUnitPower()
PropertyValue
getUnitPower in interface PropertyValueExpr.UNIT_POWER_NUMERIC or Expr.UNIT_POWER_LENGTH.public IllegalStateException evalLengthException()
public IllegalStateException evalIntegerException()
public IllegalStateException evalKeywordException()
public IllegalStateException evalPercentageException()
public int evalLength(int pointSize)
PropertyValue
evalLength in interface PropertyValuepointSize - The point size, in millipoints, of the font.
This is used in calculations that are relative to the point size.
In cases where the computation of the font-size is expensive, check
PropertyValue.lengthRequiresFontSize() first.
If that method returns false, zero or some other constant can safely
be passed, as it will be ignored anyway.
Integer.MIN_VALUE otherwise.
The value is expressed in millipoints.public boolean lengthRequiresFontSize()
PropertyValue
lengthRequiresFontSize in interface PropertyValuepublic boolean canEvalInteger()
PropertyValue
canEvalInteger in interface PropertyValuepublic int evalInteger()
PropertyValuePropertyValue.canEvalInteger() returns true.
Doing so on other instances may result in an
IllegalStateException.
evalInteger in interface PropertyValuepublic boolean canEvalPercentage()
PropertyValue
canEvalPercentage in interface PropertyValuepublic float evalPercentage()
PropertyValuePropertyValue.canEvalPercentage() returns true.
Doing so on other instances may result in an
IllegalStateException.
evalPercentage in interface PropertyValue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||