Package org.apache.fop.afp.modca
Class ActiveEnvironmentGroup
- All Implemented Interfaces:
Streamable
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classstatic classNested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject
AbstractAFPObject.Category, AbstractAFPObject.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Factorythe resource managerprivate MapCodedFontprivate final List<AbstractStructuredObject> The collection of MapCodedFont objectsprivate Listthe collection of MapPageSegments objectsprivate MapDataResourceprivate ObjectAreaDescriptorthe Object Area Descriptor for the active environment groupprivate ObjectAreaPositionthe Object Area Position for the active environment groupprivate PageDescriptorthe PageDescriptor for the active environment groupprivate PresentationTextDescriptorthe PresentationTextDescriptor for the active environment groupFields inherited from class org.apache.fop.afp.modca.AbstractEnvironmentGroup
mapDataResources, mapPageOverlaysFields inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject
nameFields inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject
tripletsFields inherited from class org.apache.fop.afp.modca.AbstractAFPObject
LOG, SF_CLASS, SF_HEADER_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionActiveEnvironmentGroup(Factory factory, String name, int width, int height, int widthRes, int heightRes) Constructor for the ActiveEnvironmentGroup, this takes a name parameter which must be 8 characters long. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapPageSegment(String name) Add map page segment.voidcreateFont(int fontRef, AFPFont font, int size, int orientation) Method to create a map coded font objectprivate MapPageSegmentAccessor method to obtain the PageDescriptor object of the active environment group.Accessor method to obtain the PresentationTextDataDescriptor object of the active environment group.private MapPageSegmentvoidsetObjectAreaPosition(int x, int y, int rotation) Set the position of the object areastatic voidsetupTruetypeMDR(AbstractTripletStructuredObject mdr, boolean res) voidHelper method to write the contents of the Object.protected voidwriteEnd(OutputStream os) Helper method to write the end of the Object.protected voidHelper method to write the start of the Object.Methods inherited from class org.apache.fop.afp.modca.AbstractEnvironmentGroup
createOverlay, getLastElementMethods inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject
copySF, getName, getNameBytes, getNameLength, setName, toStringMethods inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject
addTriplet, addTriplets, getFullyQualifiedName, getTripletDataLength, getTriplets, hasTriplet, hasTriplets, setComment, setFullyQualifiedName, setFullyQualifiedName, setObjectClassification, writeTripletsMethods inherited from class org.apache.fop.afp.modca.AbstractStructuredObject
writeToStreamMethods inherited from class org.apache.fop.afp.modca.AbstractAFPObject
copySF, truncate, writeChunksToStream, writeObjects
-
Field Details
-
mapCodedFonts
The collection of MapCodedFont objects -
mapPageSegments
the collection of MapPageSegments objects -
objectAreaDescriptor
the Object Area Descriptor for the active environment group -
objectAreaPosition
the Object Area Position for the active environment group -
presentationTextDataDescriptor
the PresentationTextDescriptor for the active environment group -
pageDescriptor
the PageDescriptor for the active environment group -
factory
the resource manager -
mdr
-
mapCodedFont
-
-
Constructor Details
-
ActiveEnvironmentGroup
public ActiveEnvironmentGroup(Factory factory, String name, int width, int height, int widthRes, int heightRes) Constructor for the ActiveEnvironmentGroup, this takes a name parameter which must be 8 characters long.- Parameters:
factory- the object factoryname- the active environment group namewidth- the page widthheight- the page heightwidthRes- the page width resolutionheightRes- the page height resolution
-
-
Method Details
-
setObjectAreaPosition
public void setObjectAreaPosition(int x, int y, int rotation) Set the position of the object area- Parameters:
x- the x offsety- the y offsetrotation- the rotation
-
getPageDescriptor
Accessor method to obtain the PageDescriptor object of the active environment group.- Returns:
- the page descriptor object
-
getPresentationTextDataDescriptor
Accessor method to obtain the PresentationTextDataDescriptor object of the active environment group.- Returns:
- the presentation text descriptor
-
writeContent
Helper method to write the contents of the Object.- Overrides:
writeContentin classAbstractEnvironmentGroup- Parameters:
os- The stream to write to- Throws:
IOException- throws an I/O exception if one occurred
-
writeStart
Helper method to write the start of the Object.- Overrides:
writeStartin classAbstractStructuredObject- Parameters:
os- The stream to write to- Throws:
IOException- throws an I/O exception if one occurred
-
writeEnd
Helper method to write the end of the Object.- Overrides:
writeEndin classAbstractStructuredObject- Parameters:
os- The stream to write to- Throws:
IOException- an I/O exception if one occurred
-
createFont
Method to create a map coded font object- Parameters:
fontRef- the font number used as the resource identifierfont- the fontsize- the point size of the fontorientation- the orientation of the font (e.g. 0, 90, 180, 270)
-
setupTruetypeMDR
-
addMapPageSegment
Add map page segment.- Parameters:
name- of segment to add
-
getCurrentMapPageSegment
-
needMapPageSegment
-