org.jfree.layouting.layouter.context

Interface DocumentContext

All Superinterfaces:
DocumentMetaNode
Known Implementing Classes:
DefaultDocumentContext

public interface DocumentContext
extends DocumentMetaNode

The document context holds general document-wide data. It does not hold any data, that is expected to change, the document context is meant to be as stateless as possible (after the context has been set up, of course).
Author:
Thomas Morgner

Field Summary

static String
BASE_RESOURCE_ATTR
static String
DATE_ATTR
static String
INITIAL_STYLE
static String
LOCALIZATION_ATTR
static String
RESOURCE_MANAGER_ATTR
static String
STRICT_STYLE_MODE
static String
STYLE_MATCHER_ATTR
static String
STYLE_RESOLVER_ATTR
static String
TITLE_ATTR

Method Summary

void
addMetaNode(DocumentMetaNode node)
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.
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
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 interface org.jfree.layouting.layouter.context.DocumentMetaNode

getMetaAttribute, setMetaAttribute

Field Details

BASE_RESOURCE_ATTR

public static final String BASE_RESOURCE_ATTR

DATE_ATTR

public static final String DATE_ATTR

INITIAL_STYLE

public static final String INITIAL_STYLE

LOCALIZATION_ATTR

public static final String LOCALIZATION_ATTR

RESOURCE_MANAGER_ATTR

public static final String RESOURCE_MANAGER_ATTR

STRICT_STYLE_MODE

public static final String STRICT_STYLE_MODE

STYLE_MATCHER_ATTR

public static final String STYLE_MATCHER_ATTR

STYLE_RESOLVER_ATTR

public static final String STYLE_RESOLVER_ATTR

TITLE_ATTR

public static final String TITLE_ATTR

Method Details

addMetaNode

public void addMetaNode(DocumentMetaNode node)

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.
Parameters:
name -
Returns:

getCounterStyle

public CounterStyle getCounterStyle(String counterName)
Looks up a global counter style. If not defined, this returns the default decimal style.
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)

getMetaNodeCount

public int getMetaNodeCount()

getNamespaces

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

getResourceManager

public ResourceManager getResourceManager()

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.
Parameters:
name -
Returns:

initialize

public void initialize()
This method is called once after the input-feed received all the document meta-data.

removeMetaNode

public void removeMetaNode(DocumentMetaNode node)

setCounterPolicy

public void setCounterPolicy(String name,
                             CSSValue policy)

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.
Parameters:
counterName -
style -

setStringPolicy

public void setStringPolicy(String name,
                            CSSValue policy)