public class IFContext
extends java.lang.Object
Foreign attributes are usually specific to a particular output format implementation. Most implementations will just ignore all foreign attributes for most elements. That's why the main IF interfaces are not burdened with this.
Constructor and Description |
---|
IFContext(FOUserAgent ua)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getForeignAttribute(org.apache.xmlgraphics.util.QName qName)
Returns a foreign attribute.
|
java.util.Map |
getForeignAttributes()
Returns the currently applicable foreign attributes.
|
java.util.Locale |
getLanguage()
Returns the currently applicable language.
|
java.lang.String |
getLocation()
Returns the location of the object enclosing the current content.
|
int |
getPageIndex()
Obtain current page index.
|
int |
getPageNumber() |
StructureTreeElement |
getStructureTreeElement()
Returns the current structure tree element.
|
FOUserAgent |
getUserAgent()
Returns the associated user agent.
|
boolean |
isHyphenated()
Returns
true if the last text in the currently processed text area is hyphenated. |
void |
resetForeignAttributes()
Resets the foreign attributes to "no foreign attributes".
|
void |
resetStructureTreeElement()
Resets the current structure tree element.
|
void |
setForeignAttributes(java.util.Map foreignAttributes)
Sets the currently applicable foreign attributes.
|
void |
setHyphenated(boolean hyphenated)
Records that the last text in the currently processed text area is hyphenated.
|
void |
setLanguage(java.util.Locale lang)
Sets the currently applicable language.
|
void |
setLocation(java.lang.String location)
Sets the location of the object enclosing the current content.
|
void |
setPageIndex(int pageIndex)
Record current page index.
|
void |
setPageNumber(int pageNumber) |
void |
setStructureTreeElement(StructureTreeElement structureTreeElement)
Sets the structure tree element to which the subsequently painted marks
will correspond.
|
void |
setUserAgent(FOUserAgent ua)
Set the user agent.
|
public IFContext(FOUserAgent ua)
ua
- the user agentpublic void setUserAgent(FOUserAgent ua)
ua
- the user agentpublic FOUserAgent getUserAgent()
public java.util.Map getForeignAttributes()
public java.lang.Object getForeignAttribute(org.apache.xmlgraphics.util.QName qName)
qName
- the qualified name of the foreign attributepublic void setForeignAttributes(java.util.Map foreignAttributes)
foreignAttributes
- a Mappublic void resetForeignAttributes()
public void setLanguage(java.util.Locale lang)
lang
- the languagepublic java.util.Locale getLanguage()
public void setStructureTreeElement(StructureTreeElement structureTreeElement)
structureTreeElement
- the structure tree elementpublic void resetStructureTreeElement()
public StructureTreeElement getStructureTreeElement()
setStructureTreeElement(StructureTreeElement)
public void setLocation(java.lang.String location)
public java.lang.String getLocation()
null
if that information is not availablepublic void setHyphenated(boolean hyphenated)
public boolean isHyphenated()
true
if the last text in the currently processed text area is hyphenated.public void setPageIndex(int pageIndex)
pageIndex
- a zero based page index or -1 (no page)public int getPageIndex()
public int getPageNumber()
public void setPageNumber(int pageNumber)
Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.