|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.fotree.value.Expr
org.foray.fotree.value.ExprAdditive
org.foray.fotree.value.ExprMultiplicative
org.foray.fotree.value.ExprUnary
org.foray.fotree.value.ExprPrimary
org.foray.fotree.value.Datatype
org.foray.fotree.value.DtTextDeco
public class DtTextDeco
Text Decoration is not a datatype recognized in XSL-FO. However, its definition in the standard makes it a de facto compound data type.
Field Summary |
---|
Fields inherited from class org.foray.fotree.value.Expr |
---|
OPERATION_ADD, OPERATION_DIVIDE, OPERATION_MOD, OPERATION_MULTIPLY, OPERATION_NEGATION, OPERATION_SUBTRACT, UNIT_POWER_AREA, UNIT_POWER_LENGTH, UNIT_POWER_NON_NUMERIC, UNIT_POWER_NUMERIC |
Constructor Summary | |
---|---|
DtTextDeco(boolean isUnderlined,
boolean isOverlined,
boolean isLineThrough,
boolean isBlink)
Constructor. |
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 |
canEvalKeyword()
Indicates whether this property value can evaluate to a keyword. |
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. |
PvKeyword |
evalKeyword()
Returns the keyword value of this property value. |
int |
evalLength(int pointSize)
Evaluates the expression to a unit power of 1 (length). |
double |
evalNumeric()
Return the raw numeric value of "this", without regard to unit power. |
float |
evalPercentage()
Returns the percentage value of this property value. |
boolean |
getIsBlink()
Indicates whether "blink" is on. |
boolean |
getIsLineThrough()
Indicates whether "line-through" is on. |
boolean |
getIsOverlined()
Indicates whether "overline" is on. |
boolean |
getIsUnderlined()
Indicates whether "underline" is on. |
byte |
getUnitPower()
Each numeric has a "unit power". |
boolean |
lengthRequiresFontSize()
Indicates whether the computation of the length will require an accurate font-size parameter. |
void |
setBlink(boolean isBlink)
Sets the "blink" value. |
void |
setLineThrough(boolean isLineThrough)
Sets the "line-through" value. |
void |
setOverlined(boolean isOverlined)
Sets the "overline" value. |
void |
setUnderlined(boolean isUnderlined)
Sets the "underline" value. |
Methods inherited from class org.foray.fotree.value.Datatype |
---|
convertValueToFoValue |
Methods inherited from class org.foray.fotree.value.Expr |
---|
evalColorException, evalIntegerException, evalKeywordException, evalLengthException, evalNumericException, evalPercentageException |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DtTextDeco(boolean isUnderlined, boolean isOverlined, boolean isLineThrough, boolean isBlink)
isUnderlined
- True if the text should be underlined.isOverlined
- True if the text should be overlined.isLineThrough
- True if the text should be lined-through.isBlink
- True if the text should blink.Method Detail |
---|
public boolean getIsBlink()
public void setBlink(boolean isBlink)
isBlink
- The isBlink to set.public boolean getIsLineThrough()
public void setLineThrough(boolean isLineThrough)
isLineThrough
- The isLineThrough to set.public boolean getIsOverlined()
public void setOverlined(boolean isOverlined)
isOverlined
- The isOverlined to set.public boolean getIsUnderlined()
public void setUnderlined(boolean isUnderlined)
isUnderlined
- The isUnderlined to set.public boolean canEvalNumeric()
PropertyValue
public double evalNumeric()
PropertyValue
public boolean canEvalLength()
PropertyValue
public byte getUnitPower()
PropertyValue
Expr.UNIT_POWER_NUMERIC
or Expr.UNIT_POWER_LENGTH
.public int evalLength(int pointSize)
PropertyValue
pointSize
- 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 canEvalColor()
PropertyValue
public Color evalColor()
PropertyValue
public boolean lengthRequiresFontSize()
PropertyValue
public boolean canEvalInteger()
PropertyValue
public int evalInteger()
PropertyValue
PropertyValue.canEvalInteger()
returns true.
Doing so on other instances may result in an
IllegalStateException
.
public boolean canEvalKeyword()
PropertyValue
public PvKeyword evalKeyword()
PropertyValue
PropertyValue.canEvalKeyword()
returns true.
Doing so on other instances may result in an
IllegalStateException
.
public boolean canEvalPercentage()
PropertyValue
public float evalPercentage()
PropertyValue
PropertyValue.canEvalPercentage()
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 |