fop 0.95

org.apache.fop.render.afp.modca
Class PresentationTextObject

java.lang.Object
  extended by org.apache.fop.render.afp.modca.AbstractAFPObject
      extended by org.apache.fop.render.afp.modca.AbstractNamedAFPObject
          extended by org.apache.fop.render.afp.modca.PresentationTextObject

public class PresentationTextObject
extends AbstractNamedAFPObject

The Presentation Text object is the data object used in document processing environments for representing text which has been prepared for presentation. Text, as used here, means an ordered string of characters, such as graphic symbols, numbers, and letters, that are suitable for the specific purpose of representing coherent information. Text which has been prepared for presentation has been reduced to a primitive form through explicit specification of the characters and their placement in the presentation space. Control sequences which designate specific control functions may be embedded within the text. These functions extend the primitive form by applying specific characteristics to the text when it is presented. The collection of the graphic characters and control codes is called Presentation Text, and the object that contains the Presentation Text is called the PresentationText object.


Field Summary
 
Fields inherited from class org.apache.fop.render.afp.modca.AbstractNamedAFPObject
name, nameBytes
 
Fields inherited from class org.apache.fop.render.afp.modca.AbstractAFPObject
log
 
Constructor Summary
PresentationTextObject()
          Default constructor for the PresentationTextObject
PresentationTextObject(java.lang.String name)
          Construct a new PresentationTextObject for the specified name argument, the name should be an 8 character identifier.
 
Method Summary
 void createLineData(int x1, int y1, int x2, int y2, int thickness, java.awt.Color col)
          Drawing of lines using the starting and ending coordinates, thickness.
 void createLineData(int x1, int y1, int x2, int y2, int thickness, int orientation, java.awt.Color col)
          Drawing of lines using the starting and ending coordinates, thickness and orientation arguments.
 void createTextData(int fontNumber, int x, int y, java.awt.Color col, int vsci, int ica, byte[] data)
          Create the presentation text data for the byte array of data.
 void createTextData(int fontNumber, int x, int y, int orientation, java.awt.Color col, int vsci, int ica, byte[] data)
          Create the presentation text data for the byte array of data.
 void endControlSequence()
          A control sequence is a sequence of bytes that specifies a control function.
 java.lang.String getName()
          Returns the name of this presentation text object
 void writeDataStream(java.io.OutputStream os)
          Accessor method to write the AFP datastream for the PresentationTextObject.
 
Methods inherited from class org.apache.fop.render.afp.modca.AbstractAFPObject
writeObjectList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresentationTextObject

public PresentationTextObject()
Default constructor for the PresentationTextObject


PresentationTextObject

public PresentationTextObject(java.lang.String name)
Construct a new PresentationTextObject for the specified name argument, the name should be an 8 character identifier.

Parameters:
name - the name of this presentation object
Method Detail

createTextData

public void createTextData(int fontNumber,
                           int x,
                           int y,
                           java.awt.Color col,
                           int vsci,
                           int ica,
                           byte[] data)
Create the presentation text data for the byte array of data.

Parameters:
fontNumber - The font resource identifier.
x - The x coordinate for the text data.
y - The y coordinate for the text data.
col - The text color.
vsci - The variable space character increment.
ica - The inter character increment.
data - The text data to be created.

createTextData

public void createTextData(int fontNumber,
                           int x,
                           int y,
                           int orientation,
                           java.awt.Color col,
                           int vsci,
                           int ica,
                           byte[] data)
Create the presentation text data for the byte array of data.

Parameters:
fontNumber - The font resource identifier.
x - The x coordinate for the text data.
y - The y coordinate for the text data.
orientation - The orientation of the text data.
col - The text color.
vsci - The variable space character increment.
ica - The inter character adjustment.
data - The text data to be created.

createLineData

public void createLineData(int x1,
                           int y1,
                           int x2,
                           int y2,
                           int thickness,
                           java.awt.Color col)
Drawing of lines using the starting and ending coordinates, thickness.

Parameters:
x1 - The first x coordinate of the line.
y1 - The first y coordinate of the line.
x2 - The second x coordinate of the line.
y2 - The second y coordinate of the line.
thickness - The thickness of the line.
col - The text color.

createLineData

public void createLineData(int x1,
                           int y1,
                           int x2,
                           int y2,
                           int thickness,
                           int orientation,
                           java.awt.Color col)
Drawing of lines using the starting and ending coordinates, thickness and orientation arguments.

Parameters:
x1 - The first x coordinate of the line.
y1 - The first y coordinate of the line.
x2 - The second x coordinate of the line.
y2 - The second y coordinate of the line.
thickness - The thickness of the line.
orientation - The orientation of the line.
col - The text color.

writeDataStream

public void writeDataStream(java.io.OutputStream os)
                     throws java.io.IOException
Accessor method to write the AFP datastream for the PresentationTextObject.

Specified by:
writeDataStream in class AbstractAFPObject
Parameters:
os - The stream to write to
Throws:
java.io.IOException - thrown if an I/O exception of some sort has occurred

getName

public java.lang.String getName()
Returns the name of this presentation text object

Returns:
the name of this presentation text object

endControlSequence

public void endControlSequence()
A control sequence is a sequence of bytes that specifies a control function. A control sequence consists of a control sequence introducer and zero or more parameters. The control sequence can extend multiple presentation text data objects, but must eventually be terminated. This method terminates the control sequence.


fop 0.95

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.