public class GraphicsCharacterString extends AbstractGraphicsCoord
AbstractAFPObject.Category, AbstractAFPObject.Type
Modifier and Type | Field and Description |
---|---|
protected static int |
MAX_STR_LEN
Up to 255 bytes of character data
|
protected java.lang.String |
str
the string to draw
|
coords, relative
log, SF_CLASS, SF_HEADER
Constructor and Description |
---|
GraphicsCharacterString(java.lang.String str)
Constructor (relative positioning)
|
GraphicsCharacterString(java.lang.String str,
int x,
int y)
Constructor (absolute positioning)
|
Modifier and Type | Method and Description |
---|---|
int |
getDataLength()
Returns the data length of this structured field
|
java.lang.String |
toString() |
void |
writeToStream(java.io.OutputStream os)
DataStream objects must implement the writeToStream()
method to write its data to the given OutputStream
|
addCoords, isRelative
getName
copyChunks, copySF, copySF, truncate, writeChunksToStream, writeObjects
protected static final int MAX_STR_LEN
protected final java.lang.String str
public GraphicsCharacterString(java.lang.String str, int x, int y)
str
- the character stringx
- the x coordinatey
- the y coordinatepublic GraphicsCharacterString(java.lang.String str)
str
- the character stringx
- the x coordinatey
- the y coordinatepublic int getDataLength()
getDataLength
in interface StructuredData
getDataLength
in class AbstractGraphicsCoord
public void writeToStream(java.io.OutputStream os) throws java.io.IOException
writeToStream
in interface Streamable
writeToStream
in class AbstractGraphicsCoord
os
- the outputsteam streamjava.io.IOException
- an I/O exception of some sort has occurred.public java.lang.String toString()
toString
in class AbstractGraphicsCoord
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.