|
||||||||||
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.Function
public abstract class Function
Abstract superclass for all XSL-FO functions.
Field Summary | |
---|---|
static byte |
ABS
Constant indicating the "abs" function. |
static byte |
BODY_START
Constant indicating the "body-start" function. |
static byte |
CEILING
Constant indicating the "ceiling" function. |
static byte |
FLOOR
Constant indicating the "floor" function. |
static byte |
FROM_NEAREST_SPECIFIED_VALUE
Constant indicating the "from-nearest-specified-value" function. |
static byte |
FROM_PAGE_MASTER_REGION
Constant indicating the "from-page-master-region" function. |
static byte |
FROM_PARENT
Constant indicating the "from-parent" function. |
static byte |
FROM_TABLE_COLUMN
Constant indicating the "from-table-column" function. |
static String[] |
FUNCTION_NAME_LIST
The array of valid function names. |
static byte |
INHERITED_PROPERTY_VALUE
Constant indicating the "inheritied-property-value" function. |
static byte |
LABEL_END
Constant indicating the "label-end" function. |
static byte |
MAX
Constant indicating the "max" function. |
static byte |
MERGE_PROPERTY_VALUES
Constant indicating the "merge-property-values" function. |
static byte |
MIN
Constant indicating the "min" function. |
static byte |
PROPORTIONAL_COLUMN_WIDTH
Constant indicating the "proportional-column-width" function. |
static byte |
RGB
Constant indicating the "rgb" function. |
static byte |
RGB_ICC
Constant indicating the "rgb-icc" function. |
static byte |
ROUND
Constant indicating the "round" function. |
static byte |
SYSTEM_COLOR
Constant indicating the "system-color" function. |
static byte |
SYSTEM_FONT
Constant indicating the "system-font" function. |
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 | |
---|---|
Function()
Constructor. |
Method Summary | |
---|---|
static byte |
enumerateFunctionName(String functionName)
Converts a function name to its integral equivalent. |
abstract String |
getFunctionName()
Return the name of this function. |
protected void |
invalidParameters()
Throws an exception indicating that the parameters are invalid. |
static Function |
makeFunction(int functionType,
Expr[] arguments,
PropertyType propertyType)
Factory method for the various function types. |
protected void |
validateNoArguments(Expr[] arguments)
Validates that this function has no arguments, and throws an exception if it does. |
protected DtName |
validateNoneOrOneName(Expr[] arguments)
Validates that this function either 1) has no arguments, or 2) has exactly one argument and that a Name. |
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 |
Methods inherited from interface org.foray.fotree.value.PropertyValue |
---|
canEvalColor, canEvalInteger, canEvalKeyword, canEvalLength, canEvalNumeric, canEvalPercentage, evalColor, evalInteger, evalKeyword, evalLength, evalNumeric, evalPercentage, getUnitPower, lengthRequiresFontSize |
Field Detail |
---|
public static final String[] FUNCTION_NAME_LIST
public static final byte ABS
public static final byte BODY_START
public static final byte CEILING
public static final byte FLOOR
public static final byte FROM_NEAREST_SPECIFIED_VALUE
public static final byte FROM_PAGE_MASTER_REGION
public static final byte FROM_PARENT
public static final byte FROM_TABLE_COLUMN
public static final byte INHERITED_PROPERTY_VALUE
public static final byte LABEL_END
public static final byte MAX
public static final byte MERGE_PROPERTY_VALUES
public static final byte MIN
public static final byte PROPORTIONAL_COLUMN_WIDTH
public static final byte RGB
public static final byte RGB_ICC
public static final byte ROUND
public static final byte SYSTEM_COLOR
public static final byte SYSTEM_FONT
Constructor Detail |
---|
public Function()
Method Detail |
---|
protected void invalidParameters() throws PropertyException
PropertyException
- Always, as that is the purpose of this method.public abstract String getFunctionName()
public static byte enumerateFunctionName(String functionName)
functionName
- The function name to be enumerated.
public static Function makeFunction(int functionType, Expr[] arguments, PropertyType propertyType) throws PropertyException
functionType
- The integral value of the function type.arguments
- The array of arguments to this function.propertyType
- The property which is calling this function.
PropertyException
- For invalid arguments to the function.protected void validateNoArguments(Expr[] arguments) throws PropertyException
arguments
- The arguments passed to this function.
PropertyException
- If this function has any arguments.protected DtName validateNoneOrOneName(Expr[] arguments) throws PropertyException
arguments
- The arguments passed to this function.
PropertyException
- If this function does not meet the stated
requirements.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |