Package org.apache.fop.afp.modca
Class PresentationTextData
java.lang.Object
org.apache.fop.afp.modca.AbstractAFPObject
org.apache.fop.afp.modca.PresentationTextData
- All Implemented Interfaces:
PtocaConstants
,Streamable
Presentation text data contains the graphic characters and the control
sequences necessary to position the characters within the object space. The
data consists of: - graphic characters to be presented - control sequences
that position them - modal control sequences that adjust the positions by
small amounts - other functions causing text to be presented with differences
in appearance.
The graphic characters are expected to conform to a coded font representation so that they can be translated from the code point in the object data to the character in the coded font. The units of measure for linear displacements are derived from the PresentationTextDescriptor or from the hierarchical defaults.
In addition to graphic character code points, Presentation Text data can contain embedded control sequences. These are strings of two or more bytes which signal an alternate mode of processing for the content of the current Presentation Text data.
The content for this object can be created using PtocaBuilder
.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject
AbstractAFPObject.Category, AbstractAFPObject.Type
-
Field Summary
Fields inherited from class org.apache.fop.afp.modca.AbstractAFPObject
LOG, SF_CLASS, SF_HEADER_LENGTH
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for the PresentationTextData.PresentationTextData
(boolean controlInd) Constructor for the PresentationTextData, the boolean flag indicate whether the control sequence prefix should be set to indicate the start of a new control sequence. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of data bytes still available in this object until it is full and a new one has to be started.protected OutputStream
Returns the output stream the content data is written to.void
DataStream objects must implement the writeToStream() method to write its data to the given OutputStreamMethods inherited from class org.apache.fop.afp.modca.AbstractAFPObject
copySF, copySF, truncate, writeChunksToStream, writeObjects
-
Constructor Details
-
PresentationTextData
public PresentationTextData()Default constructor for the PresentationTextData. -
PresentationTextData
public PresentationTextData(boolean controlInd) Constructor for the PresentationTextData, the boolean flag indicate whether the control sequence prefix should be set to indicate the start of a new control sequence.- Parameters:
controlInd
- The control sequence indicator.
-
-
Method Details
-
getBytesAvailable
public int getBytesAvailable()Returns the number of data bytes still available in this object until it is full and a new one has to be started.- Returns:
- the number of data bytes available
-
getOutputStream
Returns the output stream the content data is written to.- Returns:
- the output stream
-
writeToStream
DataStream objects must implement the writeToStream() method to write its data to the given OutputStream- Specified by:
writeToStream
in interfaceStreamable
- Parameters:
os
- the outputsteam stream- Throws:
IOException
- an I/O exception of some sort has occurred.
-