public class FOText extends FONode implements java.lang.CharSequence
FONode.FONodeIterator, FONode.GatherContextInfoFunction
Constructor and Description |
---|
FOText(FONode parent)
Creates a new FO text node.
|
Modifier and Type | Method and Description |
---|---|
void |
bind(PropertyList pList)
Bind the given
PropertyList to this node
Does nothing by default. |
protected void |
characters(char[] data,
int start,
int length,
PropertyList list,
org.xml.sax.Locator locator)
Adds characters.
|
char |
charAt(int position) |
CharIterator |
charIterator()
Return a
CharIterator over all characters in this node |
FONode |
clone(FONode parent,
boolean removeChildren)
Performs a shallow cloning operation, sets the clone's parent,
and optionally cleans the list of child nodes
|
protected void |
createBlockPointers(Block ancestorBlock)
This method is run as part of the ancestor Block's flushText(), to
create xref pointers to the previous FOText objects within the same Block
|
protected void |
endOfNode()
Primarily used for making final content model validation checks
and/or informing the
FOEventHandler that the end of this FO
has been reached. |
void |
finalizeNode()
Finalize this node.
|
protected java.lang.String |
gatherContextInfo()
Gathers context information for the getContextInfo() method.
|
Block |
getAncestorBlock() |
Length |
getBaseLineShift() |
char[] |
getCharArray()
Return the array of characters for this instance.
|
java.awt.Color |
getColor() |
CommonFont |
getCommonFont() |
CommonHyphenation |
getCommonHyphenation() |
KeepProperty |
getKeepTogether() |
Property |
getLetterSpacing() |
SpaceProperty |
getLineHeight() |
java.lang.String |
getLocalName()
Returns the local name (i.e.
|
FOText |
getNextFOTextThisBlock() |
java.lang.String |
getNormalNamespacePrefix()
Returns the normally used namespace prefix for this node
|
FOText |
getPrevFOTextThisBlock() |
CommonTextDecoration |
getTextDecoration() |
int |
getWhitespaceTreatment() |
Property |
getWordSpacing() |
int |
getWrapOption() |
int |
length() |
void |
resetBuffer()
Resets the backing
java.nio.CharBuffer |
java.lang.CharSequence |
subSequence(int start,
int end) |
java.lang.String |
toString() |
boolean |
willCreateArea()
Check if this text node will create an area.
|
addCharacters, addChildNode, attachSiblings, canHaveMarkers, clone, createPropertyList, decorateWithContextInfo, errorText, getBuilderContext, getChildNodes, getChildNodes, getContentHandlerFactory, getContextInfo, getContextInfoAlt, getExtensionAttachment, getFOEventHandler, getFOValidationEventProducer, getLocator, getLocatorString, getLogger, getName, getName, getNameId, getNamespaceURI, getNodeString, getParent, getRoot, getUserAgent, inMarker, invalidChildError, invalidChildError, missingChildElementError, missingChildElementError, missingPropertyError, nodesOutOfOrderError, nodesOutOfOrderError, processNode, removeChild, setLocator, startOfNode, tooManyNodesError, tooManyNodesError, tooManyNodesError, validateChildNode, validateChildNode, warningText
public FOText(FONode parent)
parent
- FONode that is the parent of this objectprotected void characters(char[] data, int start, int length, PropertyList list, org.xml.sax.Locator locator) throws FOPException
#PCDATA
content.characters
in class FONode
data
- array of characters containing text to be addedstart
- starting array element to addlength
- number of elements to addlist
- currently applicable PropertyListlocator
- location in the XSL-FO source file.FOPException
- if there's a problem during processingpublic char[] getCharArray()
public FONode clone(FONode parent, boolean removeChildren) throws FOPException
clone
in class FONode
parent
- the intended parent of the cloneremoveChildren
- if true, clean the list of child nodesFOPException
- if there's a problem while cloning the nodepublic void bind(PropertyList pList) throws FOPException
PropertyList
to this node
Does nothing by default. Subclasses should override this method
in case they want to use the properties available on the
PropertyList
.bind
in class FONode
pList
- the PropertyList
FOPException
- if there was an error when
processing the PropertyList
protected void endOfNode() throws FOPException
FOEventHandler
that the end of this FO
has been reached.
The default implementation simply calls FONode.finalizeNode()
, without
sending any event to the FOEventHandler
.
super.endOfNode(); // invoke finalizeNode()
getFOEventHandler().endXXX(); // send endOfNode() notification
endOfNode
in class FONode
FOPException
- if there's a problem during processingpublic void finalizeNode()
FOEventHandler
.
The method is called by the default FONode.endOfNode()
implementation.finalizeNode
in class FONode
public boolean willCreateArea()
public CharIterator charIterator()
FONode
CharIterator
over all characters in this nodecharIterator
in class FONode
protected void createBlockPointers(Block ancestorBlock)
ancestorBlock
- the ancestor fo:blockpublic FOText getPrevFOTextThisBlock()
public FOText getNextFOTextThisBlock()
public Block getAncestorBlock()
public CommonFont getCommonFont()
public CommonHyphenation getCommonHyphenation()
public java.awt.Color getColor()
public KeepProperty getKeepTogether()
public Property getLetterSpacing()
public SpaceProperty getLineHeight()
public int getWhitespaceTreatment()
public Property getWordSpacing()
public int getWrapOption()
public CommonTextDecoration getTextDecoration()
public Length getBaseLineShift()
public java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in class java.lang.Object
public java.lang.String getLocalName()
getLocalName
in class FONode
public java.lang.String getNormalNamespacePrefix()
getNormalNamespacePrefix
in class FONode
protected java.lang.String gatherContextInfo()
gatherContextInfo
in class FONode
public char charAt(int position)
charAt
in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface java.lang.CharSequence
public int length()
length
in interface java.lang.CharSequence
public void resetBuffer()
java.nio.CharBuffer
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.