Package org.apache.fop.afp.goca
Class GraphicsData
- All Implemented Interfaces:
Completable,Startable,Streamable,StructuredData
A GOCA graphics data
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject
AbstractAFPObject.Category, AbstractAFPObject.Type -
Field Summary
FieldsFields inherited from class org.apache.fop.afp.goca.AbstractGraphicsDrawingOrderContainer
objectsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObject(StructuredData object) Adds a given graphics object to this containervoidaddSegment(GraphicsChainedSegment segment) Adds the given segment to this graphics dataReturns a new segment nameintReturns the current data lengthCreates a new graphics segment.newSegment(boolean appended, boolean prologPresent) Creates a new graphics segment.Removes the current segment from this graphics datavoidsetSegmentedData(boolean segmented) Sets the indicator that this instance is a part of a series of segmented data chunks.toString()voidDataStream objects must implement the writeToStream() method to write its data to the given OutputStreamMethods inherited from class org.apache.fop.afp.goca.AbstractGraphicsDrawingOrderContainer
addAll, isComplete, isStarted, removeLast, setComplete, setStarted, writeContent, writeStartMethods inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject
copySF, getName, getNameBytes, getNameLength, setNameMethods 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
writeEndMethods inherited from class org.apache.fop.afp.modca.AbstractAFPObject
copySF, truncate, writeChunksToStream, writeObjects
-
Field Details
-
MAX_DATA_LEN
public static final int MAX_DATA_LENthe maximum graphics data length- See Also:
-
-
Constructor Details
-
GraphicsData
public GraphicsData()Main constructor
-
-
Method Details
-
getDataLength
public int getDataLength()Returns the current data length- Specified by:
getDataLengthin interfaceStructuredData- Overrides:
getDataLengthin classAbstractGraphicsDrawingOrderContainer- Returns:
- the current data length of this container including all enclosed objects (and their containers)
-
setSegmentedData
public void setSegmentedData(boolean segmented) Sets the indicator that this instance is a part of a series of segmented data chunks. This indirectly sets the SegFlag on the SFI header.- Parameters:
segmented- true if this data object is not the last of the series
-
createSegmentName
Returns a new segment name- Returns:
- a new segment name
-
newSegment
Creates a new graphics segment.- Returns:
- a newly created graphics segment
-
newSegment
Creates a new graphics segment.- Parameters:
appended- true if this segment is appended to the previous oneprologPresent- true if started with a prolog- Returns:
- a newly created graphics segment
-
addObject
Adds a given graphics object to this container- Overrides:
addObjectin classAbstractGraphicsDrawingOrderContainer- Parameters:
object- the structured data object
-
removeCurrentSegment
Removes the current segment from this graphics data- Returns:
- the current segment from this graphics data
-
writeToStream
DataStream objects must implement the writeToStream() method to write its data to the given OutputStream- Specified by:
writeToStreamin interfaceStreamable- Overrides:
writeToStreamin classAbstractStructuredObject- Parameters:
os- the outputsteam stream- Throws:
IOException- an I/O exception of some sort has occurred.
-
toString
- Overrides:
toStringin classAbstractNamedAFPObject
-
addSegment
Adds the given segment to this graphics data- Parameters:
segment- a graphics chained segment
-