org.jfree.layouting.layouter.context
Interface ElementContext
- DefaultElementContext, LogicalPageElementContext, PhysicalPageElementContext
public interface ElementContext
Creation-Date: 01.12.2005, 23:14:36
int | getCounterValue(String counterName) - Returns the value for the given counter.
|
String | getString(String name) - Retrieves the value for a given string.
|
void | incrementCounter(String name, int value) - Increments the counter with the given name.
|
boolean | isCounterDefined(String counterName) - Checks, whether a counter is defined in this or one of the parent contexts.
|
void | resetCounter(String name, int value) - Reseting an counter creates a new Counter-Instance.
|
void | setString(String name, String value, boolean define) - Sets a named string.
|
getCounterValue
public int getCounterValue(String counterName)
Returns the value for the given counter. If no counter exists under that
name, this method returns 0. This method always returns the current value
and ignores all page-policy definitions. Enforcing the page policy is up
to the page context.
- the value for the given counter.
getString
public String getString(String name)
Retrieves the value for a given string. The value returned always
represents the *actual* value, ignoring any possibly defined page-policies.
incrementCounter
public void incrementCounter(String name,
int value)
Increments the counter with the given name. If no counter is known under
that name, the root node will create one.
isCounterDefined
public boolean isCounterDefined(String counterName)
Checks, whether a counter is defined in this or one of the parent contexts.
A counter gets defined by the 'counter-reset' property.
counterName
- the counter name.
- true, if the counter is defined, false otherwise.
resetCounter
public void resetCounter(String name,
int value)
Reseting an counter creates a new Counter-Instance. Counters from parent
elements are not affected and remain unchanged. All further operations
issued by all sub-elements will now work with this counter.
setString
public void setString(String name,
String value,
boolean define)
Sets a named string.