org.jfree.layouting.layouter.context

Class DefaultDocumentContext

Implemented Interfaces:
DocumentContext, DocumentMetaNode

public class DefaultDocumentContext
extends DefaultDocumentMetaNode
implements DocumentContext

Creation-Date: 08.12.2005, 20:17:07
Author:
Thomas Morgner

Fields inherited from interface org.jfree.layouting.layouter.context.DocumentContext

BASE_RESOURCE_ATTR, DATE_ATTR, INITIAL_STYLE, LOCALIZATION_ATTR, RESOURCE_MANAGER_ATTR, STRICT_STYLE_MODE, STYLE_MATCHER_ATTR, STYLE_RESOLVER_ATTR, TITLE_ATTR

Constructor Summary

DefaultDocumentContext()

Method Summary

void
addMetaNode(DocumentMetaNode node)
void
closeQuote()
CSSValue
getCounterPolicy(String name)
Returns the counter policy for this counter.
CounterStyle
getCounterStyle(String counterName)
Looks up a global counter style.
DocumentMetaNode
getMetaNode(int index)
int
getMetaNodeCount()
NamespaceCollection
getNamespaces()
The namespace collection is not available until initialize() has been called by the input-feed.
int
getQuoteLevel()
ResourceManager
getResourceManager()
CSSValue
getStringPolicy(String name)
Returns the string policy for this named string.
void
initialize()
This method is called once after the input-feed received all the document meta-data.
void
openQuote()
void
removeMetaNode(DocumentMetaNode node)
void
setCounterPolicy(String name, CSSValue policy)
void
setCounterStyle(String counterName, CounterStyle style)
Defines a global counter style.
void
setStringPolicy(String name, CSSValue policy)

Methods inherited from class org.jfree.layouting.layouter.context.DefaultDocumentMetaNode

getMetaAttribute, setMetaAttribute

Constructor Details

DefaultDocumentContext

public DefaultDocumentContext()

Method Details

addMetaNode

public void addMetaNode(DocumentMetaNode node)
Specified by:
addMetaNode in interface DocumentContext

closeQuote

public void closeQuote()

getCounterPolicy

public CSSValue getCounterPolicy(String name)
Returns the counter policy for this counter. The is either one of the defined PagePolicy constants or null, if no policy is defined, in which case always the current value is used.
Specified by:
getCounterPolicy in interface DocumentContext
Parameters:
name -
Returns:

getCounterStyle

public CounterStyle getCounterStyle(String counterName)
Looks up a global counter style. If not defined, this returns the default decimal style.
Specified by:
getCounterStyle in interface DocumentContext
Parameters:
counterName - the name of the counter, for which we search the style.
Returns:
the defined style or the decimal style.

getMetaNode

public DocumentMetaNode getMetaNode(int index)
Specified by:
getMetaNode in interface DocumentContext

getMetaNodeCount

public int getMetaNodeCount()
Specified by:
getMetaNodeCount in interface DocumentContext

getNamespaces

public NamespaceCollection getNamespaces()
The namespace collection is not available until initialize() has been called by the input-feed.
Specified by:
getNamespaces in interface DocumentContext
Returns:

getQuoteLevel

public int getQuoteLevel()

getResourceManager

public ResourceManager getResourceManager()
Specified by:
getResourceManager in interface DocumentContext

getStringPolicy

public CSSValue getStringPolicy(String name)
Returns the string policy for this named string. The is either one of the defined PagePolicy constants or null, if no policy is defined, in which case always the current value is used.
Specified by:
getStringPolicy in interface DocumentContext
Parameters:
name -
Returns:

initialize

public void initialize()
This method is called once after the input-feed received all the document meta-data.
Specified by:
initialize in interface DocumentContext

openQuote

public void openQuote()

removeMetaNode

public void removeMetaNode(DocumentMetaNode node)
Specified by:
removeMetaNode in interface DocumentContext

setCounterPolicy

public void setCounterPolicy(String name,
                             CSSValue policy)
Specified by:
setCounterPolicy in interface DocumentContext

setCounterStyle

public void setCounterStyle(String counterName,
                            CounterStyle style)
Defines a global counter style. The style is stored by the counter's name, and if not defined in the counter-property, the counter style is looked up here. This offers a way to define a style for counters at one point, instead of having to copy the style definition for all counter instances.
Specified by:
setCounterStyle in interface DocumentContext
Parameters:
counterName -
style -

setStringPolicy

public void setStringPolicy(String name,
                            CSSValue policy)
Specified by:
setStringPolicy in interface DocumentContext