org.jfree.layouting.layouter.model
Class LayoutElement
- Serializable
public class LayoutElement
Represents a DOM element. The tree is only backward-traversable; non-element
nodes are not traversable at all.
All nodes hold a reference to their parent and all elements also hold a
reference to their preceeding silbling nodes. This structure guarantees a
minimal memory footprint, as nodes automaticly get garbage collected as soon
as they have been fully processed. Manual cleaning is not needed.
This theory vanishes as soon as we enter the 'pinned' mode. In that mode,
each element holds strong references to all of its childs. These childs do
not go out of context unless the first pinned element does.
getCounterValue
public int getCounterValue(String counterName)
Returns the value for the given counter. If no counter exists under that
name, this method returns 0.
- 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.
isAlternateOpen
public boolean isAlternateOpen()
isContentsConsumed
public boolean isContentsConsumed()
isCounterDefined
public boolean isCounterDefined(String counterName)
openAlternate
public void openAlternate()
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.
setContentsConsumed
public void setContentsConsumed(boolean contentsConsumed)
setString
public void setString(String name,
String value,
boolean define)
Sets a named string.
name
- the namevalue
- the valuedefine
- if set to true, this defines a new nesting context.