fop 0.95

org.apache.fop.render.afp.modca
Class ActiveEnvironmentGroup

java.lang.Object
  extended by org.apache.fop.render.afp.modca.AbstractAFPObject
      extended by org.apache.fop.render.afp.modca.AbstractNamedAFPObject
          extended by org.apache.fop.render.afp.modca.ActiveEnvironmentGroup

public final class ActiveEnvironmentGroup
extends AbstractNamedAFPObject

An Active Environment Group (AEG) is associated with each page, and is contained in the page's begin-end envelope in the data stream. The active environment group contains layout and formatting information that defines the measurement units and size of the page, and may contain resource information. Any objects that are required for page presentation and that are to be treated as resource objects must be mapped with a map structured field in the AEG. The scope of an active environment group is the scope of its containing page or overlay.


Field Summary
 
Fields inherited from class org.apache.fop.render.afp.modca.AbstractNamedAFPObject
name, nameBytes
 
Fields inherited from class org.apache.fop.render.afp.modca.AbstractAFPObject
log
 
Constructor Summary
ActiveEnvironmentGroup(int width, int height, int widthResolution, int heightResolution)
          Default constructor for the ActiveEnvironmentGroup.
ActiveEnvironmentGroup(java.lang.String name, int width, int height, int widthResolution, int heightResolution)
          Constructor for the ActiveEnvironmentGroup, this takes a name parameter which must be 8 characters long.
 
Method Summary
 void createFont(byte fontReference, AFPFont font, int size, int orientation)
          Method to create a map coded font object
 void createOverlay(java.lang.String name)
          Actually creates the MPO object.
 PageDescriptor getPageDescriptor()
          Accessor method to obtain the PageDescriptor object of the active environment group.
 PresentationTextDescriptor getPresentationTextDataDescriptor()
          Accessor method to obtain the PresentationTextDataDescriptor object of the active environment group.
 void setPosition(int x, int y, int rotation)
          Set the position of the object area
 void writeDataStream(java.io.OutputStream os)
          Accessor method to write the AFP datastream for the active environment group.
 
Methods inherited from class org.apache.fop.render.afp.modca.AbstractAFPObject
writeObjectList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveEnvironmentGroup

public ActiveEnvironmentGroup(int width,
                              int height,
                              int widthResolution,
                              int heightResolution)
Default constructor for the ActiveEnvironmentGroup.

Parameters:
width - the page width
height - the page height
widthResolution - the page width resolution
heightResolution - the page height resolution

ActiveEnvironmentGroup

public ActiveEnvironmentGroup(java.lang.String name,
                              int width,
                              int height,
                              int widthResolution,
                              int heightResolution)
Constructor for the ActiveEnvironmentGroup, this takes a name parameter which must be 8 characters long.

Parameters:
name - the active environment group name
width - the page width
height - the page height
widthResolution - the page width resolution
heightResolution - the page height resolution
Method Detail

setPosition

public void setPosition(int x,
                        int y,
                        int rotation)
Set the position of the object area

Parameters:
x - the x offset
y - the y offset
rotation - the rotation

getPageDescriptor

public PageDescriptor getPageDescriptor()
Accessor method to obtain the PageDescriptor object of the active environment group.

Returns:
the page descriptor object

getPresentationTextDataDescriptor

public PresentationTextDescriptor getPresentationTextDataDescriptor()
Accessor method to obtain the PresentationTextDataDescriptor object of the active environment group.

Returns:
the presentation text descriptor

writeDataStream

public void writeDataStream(java.io.OutputStream os)
                     throws java.io.IOException
Accessor method to write the AFP datastream for the active environment group.

Specified by:
writeDataStream in class AbstractAFPObject
Parameters:
os - The stream to write to
Throws:
java.io.IOException - throws if an I/O exception of some sort has occurred

createFont

public void createFont(byte fontReference,
                       AFPFont font,
                       int size,
                       int orientation)
Method to create a map coded font object

Parameters:
fontReference - the font number used as the resource identifier
font - the font
size - the point size of the font
orientation - the orientation of the font (e.g. 0, 90, 180, 270)

createOverlay

public void createOverlay(java.lang.String name)
Actually creates the MPO object. Also creates the supporting object (an IPO)

Parameters:
name - the name of the overlay to be used

fop 0.95

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