Class DefaultLayoutContext
- java.lang.Object
-
- org.jfree.layouting.layouter.context.DefaultLayoutContext
-
- All Implemented Interfaces:
java.lang.Cloneable
,LayoutContext
,LayoutStyle
public class DefaultLayoutContext extends java.lang.Object implements LayoutContext, java.lang.Cloneable
Creation-Date: 14.12.2005, 13:42:06- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description DefaultLayoutContext(ContextId contextId, java.lang.String namespace, java.lang.String tagName, java.lang.String pseudoElement, AttributeMap attributeMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
boolean
copyFrom(LayoutStyle style)
LayoutContext
derive()
LayoutContext
detach(java.util.Map counters, java.util.Map strings)
void
dispose()
AttributeMap
getAttributes()
May never be null.BackgroundSpecification
getBackgroundSpecification()
ContentSpecification
getContentSpecification()
ContextId
getContextId()
java.util.Map
getCounters()
FontSpecification
getFontSpecification()
java.util.Locale
getLanguage()
Returns the language definition of this layout context.ListSpecification
getListSpecification()
java.lang.String
getNamespace()
May be null.java.lang.String
getPseudoElement()
An element can be exactly one pseudo-element type.java.util.Map
getStrings()
LayoutStyle
getStyle()
java.lang.String
getTagName()
May be null.CSSValue
getValue(StyleKey key)
boolean
isPseudoElement()
void
setValue(StyleKey key, CSSValue value)
-
-
-
Constructor Detail
-
DefaultLayoutContext
public DefaultLayoutContext(ContextId contextId, java.lang.String namespace, java.lang.String tagName, java.lang.String pseudoElement, AttributeMap attributeMap)
-
-
Method Detail
-
getPseudoElement
public java.lang.String getPseudoElement()
Description copied from interface:LayoutContext
An element can be exactly one pseudo-element type. It is not possible for an element to fullfill two roles, an element is either a 'before' or a 'marker', but can as well be a 'before' of an 'marker' (where the marker element would be the parent).- Specified by:
getPseudoElement
in interfaceLayoutContext
- Returns:
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:LayoutContext
May be null.- Specified by:
getNamespace
in interfaceLayoutContext
- Returns:
-
getTagName
public java.lang.String getTagName()
Description copied from interface:LayoutContext
May be null.- Specified by:
getTagName
in interfaceLayoutContext
- Returns:
-
getAttributes
public AttributeMap getAttributes()
Description copied from interface:LayoutContext
May never be null.- Specified by:
getAttributes
in interfaceLayoutContext
- Returns:
-
getBackgroundSpecification
public BackgroundSpecification getBackgroundSpecification()
- Specified by:
getBackgroundSpecification
in interfaceLayoutContext
-
getFontSpecification
public FontSpecification getFontSpecification()
- Specified by:
getFontSpecification
in interfaceLayoutContext
-
getContentSpecification
public ContentSpecification getContentSpecification()
- Specified by:
getContentSpecification
in interfaceLayoutContext
-
getListSpecification
public ListSpecification getListSpecification()
- Specified by:
getListSpecification
in interfaceLayoutContext
-
setValue
public void setValue(StyleKey key, CSSValue value)
- Specified by:
setValue
in interfaceLayoutStyle
-
getValue
public CSSValue getValue(StyleKey key)
- Specified by:
getValue
in interfaceLayoutStyle
-
getStyle
public LayoutStyle getStyle()
-
getContextId
public ContextId getContextId()
- Specified by:
getContextId
in interfaceLayoutContext
-
getLanguage
public java.util.Locale getLanguage()
Returns the language definition of this layout context. If not set, it defaults to the parent's language. If the root's language is also not defined, then use the system default.- Specified by:
getLanguage
in interfaceLayoutContext
- Returns:
- the defined language, never null.
-
isPseudoElement
public boolean isPseudoElement()
- Specified by:
isPseudoElement
in interfaceLayoutContext
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
-
derive
public LayoutContext derive()
- Specified by:
derive
in interfaceLayoutContext
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceLayoutContext
-
copyFrom
public boolean copyFrom(LayoutStyle style)
- Specified by:
copyFrom
in interfaceLayoutStyle
-
getCounters
public java.util.Map getCounters()
- Specified by:
getCounters
in interfaceLayoutContext
-
getStrings
public java.util.Map getStrings()
- Specified by:
getStrings
in interfaceLayoutContext
-
detach
public LayoutContext detach(java.util.Map counters, java.util.Map strings)
- Specified by:
detach
in interfaceLayoutContext
-
-