public class IFContext extends Object implements PageIndexContext
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 |
---|---|
Object |
getForeignAttribute(org.apache.xmlgraphics.util.QName qName)
Returns a foreign attribute.
|
Map |
getForeignAttributes()
Returns the currently applicable foreign attributes.
|
Locale |
getLanguage()
Returns the currently applicable language.
|
String |
getLocation()
Returns the location of the object enclosing the current content.
|
int |
getPageIndex()
Obtain current page index.
|
int |
getPageNumber() |
String |
getRegionType() |
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(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(Locale lang)
Sets the currently applicable language.
|
void |
setLocation(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 |
setRegionType(int type) |
void |
setRegionType(String type) |
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 Map getForeignAttributes()
public Object getForeignAttribute(org.apache.xmlgraphics.util.QName qName)
qName
- the qualified name of the foreign attributepublic void setForeignAttributes(Map foreignAttributes)
foreignAttributes
- a Map<QName, Object> or null to resetpublic void resetForeignAttributes()
public void setLanguage(Locale lang)
lang
- the languagepublic Locale getLanguage()
public void setStructureTreeElement(StructureTreeElement structureTreeElement)
structureTreeElement
- the structure tree elementpublic void resetStructureTreeElement()
public StructureTreeElement getStructureTreeElement()
setStructureTreeElement(StructureTreeElement)
public void setLocation(String location)
public 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()
getPageIndex
in interface PageIndexContext
public int getPageNumber()
public void setPageNumber(int pageNumber)
public String getRegionType()
public void setRegionType(String type)
public void setRegionType(int type)
Copyright © 2025 Apache Software Foundation. All rights reserved.