|
||||||||||
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.DtWritingMode
public final class DtWritingMode
Writing Mode is not a datatype recognized in XSL-FO. However, its definition in the standard makes it a de facto compound data type. It is discussed in the XSL-FO Standard 1.0 at Section 7.27.7 and at Appendix A.1. Please note that most applications using members of this class will not want to deal with the different ipd and shift values for odd and even line numbers. In that case, it is recommended that they simply use the odd value for each.
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 |
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. |
org.axsl.common.value.AbsoluteAxis |
getAbsoluteAxis(org.axsl.common.value.RelativeAxis relativeAxis)
|
org.axsl.common.value.AbsoluteCompass |
getAbsoluteDirection(org.axsl.common.value.RelativeCompass relativeDir)
|
org.axsl.common.value.AbsoluteDirection |
getAbsoluteDirFromRelativeAxis(org.axsl.common.value.RelativeAxis relativeAxis)
|
org.axsl.common.value.AbsoluteCompass |
getAfter()
|
org.axsl.common.value.AbsoluteCompass |
getBefore()
|
org.axsl.common.value.RelativeCompass |
getBottom()
|
org.axsl.common.value.AbsoluteAxis |
getBpAxis()
|
org.axsl.common.value.AbsoluteDirection |
getBpDirection()
|
org.axsl.common.value.Compass |
getCorresponding(org.axsl.common.value.Compass inputDirection)
|
org.axsl.common.value.AbsoluteCompass |
getEnd()
|
org.axsl.common.value.RelativeAxis |
getHorizontalAxis()
|
org.axsl.common.value.AbsoluteAxis |
getIpAxis()
|
org.axsl.common.value.AbsoluteDirection |
getIpDirectionEven()
|
org.axsl.common.value.AbsoluteDirection |
getIpDirectionOdd()
|
org.axsl.common.value.RelativeCompass |
getLeft()
|
org.axsl.common.value.RelativeAxis |
getRelativeAxis(org.axsl.common.value.AbsoluteAxis absoluteAxis)
Converts an absolute axis(horizontal or vertical) to a relative axis (inline-progression or block-progression) for this writing mode. |
org.axsl.common.value.RelativeCompass |
getRelativeDirection(org.axsl.common.value.AbsoluteCompass absoluteDir)
|
org.axsl.common.value.RelativeCompass |
getRight()
|
org.axsl.common.value.AbsoluteDirection |
getShiftEven()
|
org.axsl.common.value.AbsoluteDirection |
getShiftOdd()
|
org.axsl.common.value.AbsoluteCompass |
getStart()
|
org.axsl.common.value.RelativeCompass |
getTop()
|
byte |
getUnitPower()
Each numeric has a "unit power". |
org.axsl.common.value.RelativeAxis |
getVerticalAxis()
|
boolean |
isHorizontal()
Indicates whether this writing-mode is horizontal or vertical. |
boolean |
isPaired()
|
boolean |
lengthRequiresFontSize()
Indicates whether the computation of the length will require an accurate font-size parameter. |
static DtWritingMode |
obtainWritingMode(String writingModeName)
Returns the DtWritingMode instance for a given description of
that writing mode. |
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 |
Method Detail |
---|
public static DtWritingMode obtainWritingMode(String writingModeName)
DtWritingMode
instance for a given description of
that writing mode.
writingModeName
- The name of the writing mode, for example,
"lr-tb".
public org.axsl.common.value.AbsoluteDirection getBpDirection()
getBpDirection
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteDirection getIpDirectionEven()
getIpDirectionEven
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteDirection getIpDirectionOdd()
getIpDirectionOdd
in interface org.axsl.common.value.WritingMode
public boolean isPaired()
isPaired
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteDirection getShiftEven()
getShiftEven
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteDirection getShiftOdd()
getShiftOdd
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.RelativeAxis getHorizontalAxis()
getHorizontalAxis
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.RelativeAxis getVerticalAxis()
getVerticalAxis
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteAxis getBpAxis()
getBpAxis
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteAxis getIpAxis()
getIpAxis
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteAxis getAbsoluteAxis(org.axsl.common.value.RelativeAxis relativeAxis)
getAbsoluteAxis
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.RelativeAxis getRelativeAxis(org.axsl.common.value.AbsoluteAxis absoluteAxis)
getRelativeAxis
in interface org.axsl.common.value.WritingMode
absoluteAxis
- Either AXIS_HORIZONTAL or AXIS_VERTICAL.
public org.axsl.common.value.AbsoluteCompass getStart()
getStart
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteCompass getEnd()
getEnd
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteCompass getBefore()
getBefore
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteCompass getAfter()
getAfter
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.RelativeCompass getLeft()
getLeft
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.RelativeCompass getRight()
getRight
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.RelativeCompass getTop()
getTop
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.RelativeCompass getBottom()
getBottom
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteCompass getAbsoluteDirection(org.axsl.common.value.RelativeCompass relativeDir)
getAbsoluteDirection
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.AbsoluteDirection getAbsoluteDirFromRelativeAxis(org.axsl.common.value.RelativeAxis relativeAxis)
getAbsoluteDirFromRelativeAxis
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.RelativeCompass getRelativeDirection(org.axsl.common.value.AbsoluteCompass absoluteDir)
getRelativeDirection
in interface org.axsl.common.value.WritingMode
public org.axsl.common.value.Compass getCorresponding(org.axsl.common.value.Compass inputDirection)
getCorresponding
in interface org.axsl.common.value.WritingMode
public boolean canEvalNumeric()
PropertyValue
canEvalNumeric
in interface PropertyValue
public double evalNumeric()
PropertyValue
evalNumeric
in interface PropertyValue
public boolean canEvalLength()
PropertyValue
canEvalLength
in interface PropertyValue
public byte getUnitPower()
PropertyValue
getUnitPower
in interface PropertyValue
Expr.UNIT_POWER_NUMERIC
or Expr.UNIT_POWER_LENGTH
.public int evalLength(int pointSize)
PropertyValue
evalLength
in interface 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
canEvalColor
in interface PropertyValue
public Color evalColor()
PropertyValue
evalColor
in interface PropertyValue
public boolean lengthRequiresFontSize()
PropertyValue
lengthRequiresFontSize
in interface PropertyValue
public boolean canEvalInteger()
PropertyValue
canEvalInteger
in interface PropertyValue
public int evalInteger()
PropertyValue
PropertyValue.canEvalInteger()
returns true.
Doing so on other instances may result in an
IllegalStateException
.
evalInteger
in interface PropertyValue
public boolean canEvalKeyword()
PropertyValue
canEvalKeyword
in interface PropertyValue
public PvKeyword evalKeyword()
PropertyValue
PropertyValue.canEvalKeyword()
returns true.
Doing so on other instances may result in an
IllegalStateException
.
evalKeyword
in interface PropertyValue
public boolean canEvalPercentage()
PropertyValue
canEvalPercentage
in interface PropertyValue
public float evalPercentage()
PropertyValue
PropertyValue.canEvalPercentage()
returns true.
Doing so on other instances may result in an
IllegalStateException
.
evalPercentage
in interface PropertyValue
public boolean isHorizontal()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |