Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.fo.expr
Class NumericProperty

    java.lang.Object
      org.apache.fop.fo.properties.Property
          org.apache.fop.fo.expr.NumericProperty

All Implemented Interfaces:
  Length, Numeric

    public class NumericProperty

extends Property
implements Numeric, Length

A numeric property which hold the final absolute result of an expression calculations.

Field Summary

Fields inherited from class org.apache.fop.fo.properties.Property
`log`

Constructor Summary
`protected` | `NumericProperty(double value, int dim)` Construct a Numeric object by specifying one or more components, including absolute length, percent length, table units.

Method Summary
`boolean` | `equals(java.lang.Object obj)`
`java.awt.Color` | `getColor(FOUserAgent foUserAgent)` This method expects to be overridden by subclasses
`int` | `getDimension()` Return the dimension.
`Length` | `getLength()` This method expects to be overridden by subclasses
`java.lang.Number` | `getNumber()` This method expects to be overridden by subclasses
`Numeric` | `getNumeric()` This method expects to be overridden by subclasses
`double` | `getNumericValue()` Return the value.
`double` | `getNumericValue(PercentBaseContext context)` Return the value of this Numeric
`java.lang.Object` | `getObject()` This method expects to be overridden by subclasses
`int` | `getValue()` Returns the value of this numeric as an int.
`int` | `getValue(PercentBaseContext context)` Returns the value of this numeric as an int.
`int` | `hashCode()`
`boolean` | `isAbsolute()` Return true of the numeric is absolute.
`java.lang.String` | `toString()`

Methods inherited from class org.apache.fop.fo.properties.Property
`getCharacter, getCondLength, getEnum, getKeep, getLengthPair, getLengthRange, getList, getNCname, getSpace, getSpecifiedValue, getString, isAuto, setSpecifiedValue`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.apache.fop.datatypes.Numeric
`getEnum`

Constructor Detail

### NumericProperty

    protected NumericProperty(double value,
                              int dim)

  Construct a Numeric object by specifying one or more components, including absolute length, percent length, table units.

  Parameters:
    `value` - The value of the numeric.
    `dim` - The dimension of the value. 0 for a Number, 1 for a Length (any type), >1, <0 if Lengths have been multiplied or divided.

Method Detail

### getDimension

    public int getDimension()

  Return the dimension. Return the dimension of this numeric. Plain numbers has a dimension of 0 and length has a dimension of 1. Other dimension can occur as a result of multiplications and divisions.

  Specified by:
    `getDimension` in interface `Numeric`
  Returns:
    the dimension.

### getNumericValue

    public double getNumericValue()

  Return the value. Return the value of this Numeric

  Specified by:
    `getNumericValue` in interface `Numeric`
  Returns:
    the computed value.

### getNumericValue

    public double getNumericValue(PercentBaseContext context)

  Return the value of this Numeric

  Specified by:
    `getNumericValue` in interface `Numeric`
  Parameters:
    `context` - The context for the length calculation (for percentage based lengths)
  Returns:
    the computed value.

### isAbsolute

    public boolean isAbsolute()

  Return true of the numeric is absolute. Return true if the numeric is an absolute value. Relative values are percentages and table-column-units. All other numerics are absolute.

  Specified by:
    `isAbsolute` in interface `Numeric`
  Returns:
    true when the numeric is absolute.

### getNumeric

    public Numeric getNumeric()

  This method expects to be overridden by subclasses

  Overrides:
    `getNumeric` in class `Property`
  Returns:
    Numeric property value

### getNumber

    public java.lang.Number getNumber()

  This method expects to be overridden by subclasses

  Overrides:
    `getNumber` in class `Property`
  Returns:
    Number property value

### getValue

    public int getValue()

  Returns the value of this numeric as an int.

  Specified by:
    `getValue` in interface `Length`
  Specified by:
    `getValue` in interface `Numeric`
  Returns:
    the value as an integer.

### getValue

    public int getValue(PercentBaseContext context)

  Returns the value of this numeric as an int.

  Specified by:
    `getValue` in interface `Length`
  Specified by:
    `getValue` in interface `Numeric`
  Parameters:
    `context` - the context for the length calculation (for percentage based lengths)
  Returns:
    the value as an integer.

### getLength

    public Length getLength()

  This method expects to be overridden by subclasses

  Overrides:
    `getLength` in class `Property`
  Returns:
    Length property value

### getColor

    public java.awt.Color getColor(FOUserAgent foUserAgent)

  This method expects to be overridden by subclasses

  Overrides:
    `getColor` in class `Property`
  Parameters:
    `foUserAgent` - FOP user agent
  Returns:
    ColorType property value

### getObject

    public java.lang.Object getObject()

  This method expects to be overridden by subclasses

  Overrides:
    `getObject` in class `Property`
  Returns:
    Object property value

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `Property`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.