Package org.apache.fop.traits
Class SpaceVal
- java.lang.Object
-
- org.apache.fop.traits.SpaceVal
-
public class SpaceVal extends java.lang.ObjectStore a single Space property value in simplified form, with all Length values resolved. See section 4.3 in the specs.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanconditionalprivate booleanforcingprivate intprecedenceprivate MinOptMaxspace
-
Constructor Summary
Constructors Constructor Description SpaceVal(SpaceProperty spaceprop, PercentBaseContext context)Constructor for SpaceVal objects based on Space objects.SpaceVal(MinOptMax space, boolean conditional, boolean forcing, int precedence)Constructor for SpaceVal objects based on the full set of properties.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static MinOptMaxcreateSpaceProperty(SpaceProperty spaceprop, PercentBaseContext context)intgetPrecedence()Returns the Precedence value.MinOptMaxgetSpace()Returns the Space value.booleanisConditional()Returns the Conditionality value.booleanisForcing()Returns the Forcing value.static SpaceValmakeLetterSpacing(Property letterSpacing)static SpaceValmakeWordSpacing(Property wordSpacing, SpaceVal letterSpacing, Font fs)java.lang.StringtoString()
-
-
-
Field Detail
-
space
private final MinOptMax space
-
conditional
private final boolean conditional
-
forcing
private final boolean forcing
-
precedence
private final int precedence
-
-
Constructor Detail
-
SpaceVal
public SpaceVal(SpaceProperty spaceprop, PercentBaseContext context)
Constructor for SpaceVal objects based on Space objects.- Parameters:
spaceprop- Space object to usecontext- Percentage evaluation context
-
SpaceVal
public SpaceVal(MinOptMax space, boolean conditional, boolean forcing, int precedence)
Constructor for SpaceVal objects based on the full set of properties.- Parameters:
space- space to useconditional- Conditionality valueforcing- Forcing valueprecedence- Precedence value
-
-
Method Detail
-
createSpaceProperty
private static MinOptMax createSpaceProperty(SpaceProperty spaceprop, PercentBaseContext context)
-
makeWordSpacing
public static SpaceVal makeWordSpacing(Property wordSpacing, SpaceVal letterSpacing, Font fs)
- Parameters:
wordSpacing- propertyletterSpacing- space valuefs- font- Returns:
- space value
-
makeLetterSpacing
public static SpaceVal makeLetterSpacing(Property letterSpacing)
- Parameters:
letterSpacing- property- Returns:
- space value
-
isConditional
public boolean isConditional()
Returns the Conditionality value.- Returns:
- the Conditionality value
-
isForcing
public boolean isForcing()
Returns the Forcing value.- Returns:
- the Forcing value
-
getPrecedence
public int getPrecedence()
Returns the Precedence value.- Returns:
- the Precedence value
-
getSpace
public MinOptMax getSpace()
Returns the Space value.- Returns:
- the Space value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-