Package org.apache.fop.afp.goca
Class AbstractGraphicsDrawingOrderContainer
- java.lang.Object
-
- org.apache.fop.afp.modca.AbstractAFPObject
-
- org.apache.fop.afp.modca.AbstractStructuredObject
-
- org.apache.fop.afp.modca.AbstractTripletStructuredObject
-
- org.apache.fop.afp.modca.AbstractNamedAFPObject
-
- org.apache.fop.afp.goca.AbstractGraphicsDrawingOrderContainer
-
- All Implemented Interfaces:
Completable
,Startable
,Streamable
,StructuredData
- Direct Known Subclasses:
GraphicsChainedSegment
,GraphicsData
public abstract class AbstractGraphicsDrawingOrderContainer extends AbstractNamedAFPObject implements StructuredData, Completable, Startable
A base container of prepared structured AFP objects
-
-
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 boolean
complete
object is completeprotected java.util.List
objects
list of objects contained within this containerprivate boolean
started
object has started-
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 Modifier Constructor Description protected
AbstractGraphicsDrawingOrderContainer()
Default constructorprotected
AbstractGraphicsDrawingOrderContainer(java.lang.String name)
Named constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAll(AbstractGraphicsDrawingOrderContainer graphicsContainer)
Adds all the contents of a given graphics container to this containervoid
addObject(StructuredData object)
Adds a given graphics object to this containerint
getDataLength()
Returns the current data lengthprivate java.util.Collection
getObjects()
Returns all the objects in this containerboolean
isComplete()
Returns true if this object is completeboolean
isStarted()
Returns true if this object has startedStructuredData
removeLast()
Removes the last drawing order from this container and returns itvoid
setComplete(boolean complete)
Sets whether or not this object is complete or notvoid
setStarted(boolean started)
Sets whether or not this object has started or notprotected void
writeContent(java.io.OutputStream os)
Helper method to write the contents of the Object.protected void
writeStart(java.io.OutputStream os)
Helper method to write the start of the Object.-
Methods inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject
copySF, getName, getNameBytes, getNameLength, setName, toString
-
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
writeEnd, writeToStream
-
Methods inherited from class org.apache.fop.afp.modca.AbstractAFPObject
copySF, truncate, writeChunksToStream, writeObjects
-
-
-
-
Method Detail
-
writeStart
protected void writeStart(java.io.OutputStream os) throws java.io.IOException
Helper method to write the start of the Object.- Overrides:
writeStart
in classAbstractStructuredObject
- Parameters:
os
- The stream to write to- Throws:
java.io.IOException
- throws an I/O exception if one occurred
-
writeContent
protected void writeContent(java.io.OutputStream os) throws java.io.IOException
Helper method to write the contents of the Object.- Overrides:
writeContent
in classAbstractStructuredObject
- Parameters:
os
- The stream to write to- Throws:
java.io.IOException
- throws an I/O exception if one occurred
-
addObject
public void addObject(StructuredData object)
Adds a given graphics object to this container- Parameters:
object
- the structured data object
-
addAll
public void addAll(AbstractGraphicsDrawingOrderContainer graphicsContainer)
Adds all the contents of a given graphics container to this container- Parameters:
graphicsContainer
- a graphics container
-
getObjects
private java.util.Collection getObjects()
Returns all the objects in this container- Returns:
- all the objects in this container
-
removeLast
public StructuredData removeLast()
Removes the last drawing order from this container and returns it- Returns:
- the last drawing order from this container or null if empty
-
getDataLength
public int getDataLength()
Returns the current data length- Specified by:
getDataLength
in interfaceStructuredData
- Returns:
- the current data length of this container including all enclosed objects (and their containers)
-
setComplete
public void setComplete(boolean complete)
Sets whether or not this object is complete or not- Specified by:
setComplete
in interfaceCompletable
- Parameters:
complete
- true if this object is complete
-
isComplete
public boolean isComplete()
Returns true if this object is complete- Specified by:
isComplete
in interfaceCompletable
- Returns:
- true if this object is complete
-
isStarted
public boolean isStarted()
Returns true if this object has started
-
setStarted
public void setStarted(boolean started)
Sets whether or not this object has started or not- Specified by:
setStarted
in interfaceStartable
- Parameters:
started
- true if this object has started
-
-