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

## org.apache.fop.area
Class Area

    java.lang.Object
      org.apache.fop.area.AreaTreeObject
          org.apache.fop.area.Area

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  BlockParent, Container, ForeignObject, Image, InlineArea, LineArea, MainReference, RegionReference, RegionViewport, Span

public class Area
extends AreaTreeObject
implements java.io.Serializable

Base object for all areas.

See Also:
  Serialized Form

Field Summary
`protected int` | `bpd` the area's block-progression-dimension
`static int` | `BT` Stacking bottom to top
`static int` | `CLASS_ABSOLUTE` Absolute position class
`static int` | `CLASS_BEFORE_FLOAT` Before float class
`static int` | `CLASS_FIXED` Fixed position class
`static int` | `CLASS_FOOTNOTE` Footnote class
`static int` | `CLASS_MAX` Maximum class count
`static int` | `CLASS_NORMAL` Normal class
`static int` | `CLASS_SIDE_FLOAT` Side float class
`protected int` | `ipd` the area's inline-progression-dimension
`protected static org.apache.commons.logging.Log` | `log` logging instance
`static int` | `LR` Stacking left to right
`static int` | `ORIENT_0` Normal orientation
`static int` | `ORIENT_180` Rotate 180 degrees
`static int` | `ORIENT_270` Rotated 270 degrees clockwise
`static int` | `ORIENT_90` Rotated 90 degrees clockwise
`protected java.util.Map` | `props` Traits for this area stored in a HashMap
`static int` | `RL` Stacking right to left
`static int` | `TB` Stacking top to bottom

Fields inherited from class org.apache.fop.area.AreaTreeObject
`extensionAttachments, foreignAttributes`

Constructor Summary
`Area()`

Method Summary
`void` | `addChildArea(Area child)` Add a child to this area.
`void` | `addTrait(java.lang.Object traitCode, java.lang.Object prop)` Add a trait to this area.
`int` | `getAllocBPD()` Get the allocation block progression dimension of this area.
`int` | `getAllocIPD()` Get the allocation inline progression dimension of this area.
`int` | `getAreaClass()` Get the area class of this area.
`int` | `getBorderAndPaddingWidthAfter()` Return the sum of region border- and padding-after
`int` | `getBorderAndPaddingWidthBefore()` Return the sum of region border- and padding-before
`int` | `getBorderAndPaddingWidthEnd()` Return the sum of region border- and padding-end
`int` | `getBorderAndPaddingWidthStart()` Return the sum of region border- and padding-start
`int` | `getBPD()` Get the block progression dimension of the content rectangle for this area.
`int` | `getIPD()` Get the inline progression dimension of the content rectangle for this area.
`int` | `getSpaceAfter()` Returns the space after
`int` | `getSpaceBefore()` Returns the space before
`int` | `getSpaceEnd()` Returns the space end
`int` | `getSpaceStart()` Returns the space start
`java.lang.Object` | `getTrait(java.lang.Object oTraitCode)` Get a trait from this area.
`boolean` | `getTraitAsBoolean(java.lang.Object oTraitCode)` Get a boolean trait from this area.
`int` | `getTraitAsInteger(java.lang.Object oTraitCode)` Get a trait from this area as an integer.
`java.util.Map` | `getTraits()` Get the map of all traits on this area.
`boolean` | `hasTrait(java.lang.Object oTraitCode)` Checks whether a certain trait is set on this area.
`boolean` | `hasTraits()`
`void` | `setAreaClass(int areaClass)` Set the area class of this area.
`void` | `setBPD(int bpd)` Set the block progression dimension of the content rectangle for this area.
`void` | `setIPD(int ipd)` Set the inline progression dimension of content rectangle for this area.
`java.lang.String` | `toString()`

Methods inherited from class org.apache.fop.area.AreaTreeObject
`addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes`

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

Field Detail

### LR

    public static final int LR

  Stacking left to right

  See Also:
    Constant Field Values

### RL

    public static final int RL

  Stacking right to left

  See Also:
    Constant Field Values

### TB

    public static final int TB

  Stacking top to bottom

  See Also:
    Constant Field Values

### BT

    public static final int BT

  Stacking bottom to top

  See Also:
    Constant Field Values

### ORIENT_0

    public static final int ORIENT_0

  Normal orientation

  See Also:
    Constant Field Values

### ORIENT_90

    public static final int ORIENT_90

  Rotated 90 degrees clockwise

  See Also:
    Constant Field Values

### ORIENT_180

    public static final int ORIENT_180

  Rotate 180 degrees

  See Also:
    Constant Field Values

### ORIENT_270

    public static final int ORIENT_270

  Rotated 270 degrees clockwise

  See Also:
    Constant Field Values

### CLASS_NORMAL

    public static final int CLASS_NORMAL

  Normal class

  See Also:
    Constant Field Values

### CLASS_FIXED

    public static final int CLASS_FIXED

  Fixed position class

  See Also:
    Constant Field Values

### CLASS_ABSOLUTE

    public static final int CLASS_ABSOLUTE

  Absolute position class

  See Also:
    Constant Field Values

### CLASS_BEFORE_FLOAT

    public static final int CLASS_BEFORE_FLOAT

  Before float class

  See Also:
    Constant Field Values

### CLASS_FOOTNOTE

    public static final int CLASS_FOOTNOTE

  Footnote class

  See Also:
    Constant Field Values

### CLASS_SIDE_FLOAT

    public static final int CLASS_SIDE_FLOAT

  Side float class

  See Also:
    Constant Field Values

### CLASS_MAX

    public static final int CLASS_MAX

  Maximum class count

  See Also:
    Constant Field Values

### ipd

    protected int ipd

  the area's inline-progression-dimension

### bpd

    protected int bpd

  the area's block-progression-dimension

### props

    protected java.util.Map props

  Traits for this area stored in a HashMap

### log

    protected static org.apache.commons.logging.Log log

  logging instance

Constructor Detail

### Area

    public Area()

Method Detail

### getAreaClass

    public int getAreaClass()

  Get the area class of this area.

  Returns:
    the area class

### setAreaClass

    public void setAreaClass(int areaClass)

  Set the area class of this area.

  Parameters:
    `areaClass` - the area class

### setIPD

    public void setIPD(int ipd)

  Set the inline progression dimension of content rectangle for this area.

  Parameters:
    `ipd` - the new inline progression dimension
  See Also:
    ipd

### getIPD

    public int getIPD()

  Get the inline progression dimension of the content rectangle for this area.

  Returns:
    the inline progression dimension
  See Also:
    ipd

### setBPD

    public void setBPD(int bpd)

  Set the block progression dimension of the content rectangle for this area.

  Parameters:
    `bpd` - the new block progression dimension
  See Also:
    bpd

### getBPD

    public int getBPD()

  Get the block progression dimension of the content rectangle for this area.

  Returns:
    the block progression dimension
  See Also:
    bpd

### getAllocIPD

    public int getAllocIPD()

  Get the allocation inline progression dimension of this area. This adds the content, borders and the padding to find the total allocated IPD.

  Returns:
    the total IPD allocation for this area

### getAllocBPD

    public int getAllocBPD()

  Get the allocation block progression dimension of this area. This adds the content, borders, padding and spaces to find the total allocated BPD.

  Returns:
    the total BPD allocation for this area

### getBorderAndPaddingWidthBefore

    public int getBorderAndPaddingWidthBefore()

  Return the sum of region border- and padding-before

  Returns:
    width in millipoints

### getBorderAndPaddingWidthAfter

    public int getBorderAndPaddingWidthAfter()

  Return the sum of region border- and padding-after

  Returns:
    width in millipoints

### getBorderAndPaddingWidthStart

    public int getBorderAndPaddingWidthStart()

  Return the sum of region border- and padding-start

  Returns:
    width in millipoints

### getBorderAndPaddingWidthEnd

    public int getBorderAndPaddingWidthEnd()

  Return the sum of region border- and padding-end

  Returns:
    width in millipoints

### getSpaceBefore

    public int getSpaceBefore()

  Returns the space before

  Returns:
    width in millipoints

### getSpaceAfter

    public int getSpaceAfter()

  Returns the space after

  Returns:
    width in millipoints

### getSpaceStart

    public int getSpaceStart()

  Returns the space start

  Returns:
    width in millipoints

### getSpaceEnd

    public int getSpaceEnd()

  Returns the space end

  Returns:
    width in millipoints

### addChildArea

    public void addChildArea(Area child)

  Add a child to this area. The default is to do nothing. Subclasses must override to do something if they can have child areas.

  Parameters:
    `child` - the child area to add

### addTrait

    public void addTrait(java.lang.Object traitCode,
                         java.lang.Object prop)

  Add a trait to this area.

  Parameters:
    `traitCode` - the trait key
    `prop` - the value of the trait

### getTraits

    public java.util.Map getTraits()

  Get the map of all traits on this area.

  Returns:
    the map of traits

### hasTraits

    public boolean hasTraits()

  Returns:
    true if the area has traits

### getTrait

    public java.lang.Object getTrait(java.lang.Object oTraitCode)

  Get a trait from this area.

  Parameters:
    `oTraitCode` - the trait key
  Returns:
    the trait value

### hasTrait

    public boolean hasTrait(java.lang.Object oTraitCode)

  Checks whether a certain trait is set on this area.

  Parameters:
    `oTraitCode` - the trait key
  Returns:
    true if the trait is set

### getTraitAsBoolean

    public boolean getTraitAsBoolean(java.lang.Object oTraitCode)

  Get a boolean trait from this area.

  Parameters:
    `oTraitCode` - the trait key
  Returns:
    the trait value

### getTraitAsInteger

    public int getTraitAsInteger(java.lang.Object oTraitCode)

  Get a trait from this area as an integer.

  Parameters:
    `oTraitCode` - the trait key
  Returns:
    the trait value

### toString

    public java.lang.String toString()

  Returns:
    ipd and bpd of area

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

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