Package org.apache.fop.afp.modca
Class IncludeObject
- java.lang.Object
-
- All Implemented Interfaces:
Streamable
public class IncludeObject extends AbstractNamedAFPObject
An Include Object structured field references an object on a page or overlay. It optionally contains parameters that identify the object and that specify presentation parameters such as object position, size, orientation, mapping, and default color.Where the presentation parameters conflict with parameters specified in the object's environment group (OEG), the parameters in the Include Object structured field override. If the referenced object is a page segment, the IOB parameters override the corresponding environment group parameters on all data objects in the page segment.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject
AbstractAFPObject.Category, AbstractAFPObject.Type
-
-
Field Summary
Fields Modifier and Type Field Description private AxisOrientation
oaOrent
the orientation of the referenced objectprivate byte
objectType
the object type referenced (default is other)static byte
TYPE_BARCODE
the object referenced is of type barcodestatic byte
TYPE_GRAPHIC
the object referenced is of type graphicstatic byte
TYPE_IMAGE
the object referenced is of type imagestatic byte
TYPE_OTHER
the object referenced is of type otherstatic byte
TYPE_PAGE_SEGMENT
the object referenced is of type page segmentprivate int
xoaOset
the X-axis origin of the object areaprivate int
xocaOset
the X-axis origin defined in the objectprivate int
yoaOset
the Y-axis origin of the object areaprivate int
yocaOset
the Y-axis origin defined in the object-
Fields inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject
name
-
Fields inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject
triplets
-
Fields inherited from class org.apache.fop.afp.modca.AbstractAFPObject
LOG, SF_CLASS, SF_HEADER_LENGTH
-
-
Constructor Summary
Constructors Constructor Description IncludeObject(java.lang.String name)
Constructor for the include object with the specified name, the name must be a fixed length of eight characters and is the name of the referenced object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
getObjectTypeName()
void
setContentAreaOffset(int x, int y)
Sets the x and y offset of the content area to the object area used in conjunction with theMappingOptionTriplet.POSITION
andMappingOptionTriplet.POSITION_AND_TRIM
.void
setMappingOption(byte optionValue)
Sets the mapping optionvoid
setMeasurementUnits(int xRes, int yRes)
Sets the measurement units used to specify the units of measurevoid
setObjectAreaOffset(int x, int y)
Sets the x and y offset to the origin in the object areavoid
setObjectAreaOrientation(int orientation)
Sets the orientation to use for the Include Object.void
setObjectAreaSize(int x, int y)
Sets the extent of an object area in the X and Y directionsvoid
setObjectType(byte type)
Sets the data object typejava.lang.String
toString()
private static void
writeOsetTo(byte[] out, int offset, int oset)
void
writeToStream(java.io.OutputStream os)
DataStream objects must implement the writeToStream() method to write its data to the given OutputStream-
Methods inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject
copySF, getName, getNameBytes, getNameLength, setName
-
Methods inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject
addTriplet, addTriplets, getFullyQualifiedName, getTripletDataLength, getTriplets, hasTriplet, hasTriplets, setComment, setFullyQualifiedName, setFullyQualifiedName, setObjectClassification, writeTriplets
-
Methods inherited from class org.apache.fop.afp.modca.AbstractStructuredObject
writeContent, writeEnd, writeStart
-
Methods inherited from class org.apache.fop.afp.modca.AbstractAFPObject
copySF, truncate, writeChunksToStream, writeObjects
-
-
-
-
Field Detail
-
TYPE_PAGE_SEGMENT
public static final byte TYPE_PAGE_SEGMENT
the object referenced is of type page segment- See Also:
- Constant Field Values
-
TYPE_OTHER
public static final byte TYPE_OTHER
the object referenced is of type other- See Also:
- Constant Field Values
-
TYPE_GRAPHIC
public static final byte TYPE_GRAPHIC
the object referenced is of type graphic- See Also:
- Constant Field Values
-
TYPE_BARCODE
public static final byte TYPE_BARCODE
the object referenced is of type barcode- See Also:
- Constant Field Values
-
TYPE_IMAGE
public static final byte TYPE_IMAGE
the object referenced is of type image- See Also:
- Constant Field Values
-
objectType
private byte objectType
the object type referenced (default is other)
-
xoaOset
private int xoaOset
the X-axis origin of the object area
-
yoaOset
private int yoaOset
the Y-axis origin of the object area
-
oaOrent
private AxisOrientation oaOrent
the orientation of the referenced object
-
xocaOset
private int xocaOset
the X-axis origin defined in the object
-
yocaOset
private int yocaOset
the Y-axis origin defined in the object
-
-
Method Detail
-
setObjectAreaOrientation
public void setObjectAreaOrientation(int orientation)
Sets the orientation to use for the Include Object.- Parameters:
orientation
- The orientation (0,90, 180, 270)
-
setObjectAreaOffset
public void setObjectAreaOffset(int x, int y)
Sets the x and y offset to the origin in the object area- Parameters:
x
- the X-axis origin of the object areay
- the Y-axis origin of the object area
-
setContentAreaOffset
public void setContentAreaOffset(int x, int y)
Sets the x and y offset of the content area to the object area used in conjunction with theMappingOptionTriplet.POSITION
andMappingOptionTriplet.POSITION_AND_TRIM
.- Parameters:
x
- the X-axis origin defined in the objecty
- the Y-axis origin defined in the object
-
setObjectType
public void setObjectType(byte type)
Sets the data object type- Parameters:
type
- the data object type
-
writeToStream
public void writeToStream(java.io.OutputStream os) throws java.io.IOException
DataStream objects must implement the writeToStream() method to write its data to the given OutputStream- Specified by:
writeToStream
in interfaceStreamable
- Overrides:
writeToStream
in classAbstractStructuredObject
- Parameters:
os
- the outputsteam stream- Throws:
java.io.IOException
- an I/O exception of some sort has occurred.
-
writeOsetTo
private static void writeOsetTo(byte[] out, int offset, int oset)
-
getObjectTypeName
private java.lang.String getObjectTypeName()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractNamedAFPObject
-
setMappingOption
public void setMappingOption(byte optionValue)
Sets the mapping option- Parameters:
optionValue
- the mapping option value
-
setObjectAreaSize
public void setObjectAreaSize(int x, int y)
Sets the extent of an object area in the X and Y directions- Parameters:
x
- the x direction extenty
- the y direction extent
-
setMeasurementUnits
public void setMeasurementUnits(int xRes, int yRes)
Sets the measurement units used to specify the units of measure- Parameters:
xRes
- units per base on the x-axisyRes
- units per base on the y-axis
-
-