Class DefaultStyleResolver
- java.lang.Object
-
- org.jfree.layouting.layouter.style.resolver.AbstractStyleResolver
-
- org.jfree.layouting.layouter.style.resolver.DefaultStyleResolver
-
- All Implemented Interfaces:
StyleResolver
,StatefullComponent
public class DefaultStyleResolver extends AbstractStyleResolver
A cascading style resolver. This resolver follows the cascading rules as outlined by the Cascading Stylesheet Standard.- Author:
- Thomas Morgner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jfree.layouting.layouter.style.resolver.AbstractStyleResolver
AbstractStyleResolver.AbstractStyleResolverState
-
-
Constructor Summary
Constructors Constructor Description DefaultStyleResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StyleResolver
deriveInstance()
void
initialize(LayoutProcess layoutProcess)
boolean
isPseudoElementStyleResolvable(LayoutElement element, java.lang.String pseudo)
Performs tests, whether there is a pseudo-element definition for the given element.protected void
resolveOutOfContext(LayoutElement element)
LayoutStyle
resolvePageStyle(CSSValue pageName, PseudoPage[] pseudoPages, PageAreaType pageArea)
void
resolveStyle(LayoutElement element)
Resolves the style.State
saveState()
-
Methods inherited from class org.jfree.layouting.layouter.style.resolver.AbstractStyleResolver
containsAttrFunction, copyStyleInformation, createAnonymousContext, fillState, getDocumentContext, getInitialStyle, getKeys, getLayoutProcess, getNamespaces, loadInitialStyle, resolveValue
-
-
-
-
Method Detail
-
initialize
public void initialize(LayoutProcess layoutProcess)
- Specified by:
initialize
in interfaceStyleResolver
- Overrides:
initialize
in classAbstractStyleResolver
-
resolveOutOfContext
protected void resolveOutOfContext(LayoutElement element)
- Specified by:
resolveOutOfContext
in classAbstractStyleResolver
-
isPseudoElementStyleResolvable
public boolean isPseudoElementStyleResolvable(LayoutElement element, java.lang.String pseudo)
Performs tests, whether there is a pseudo-element definition for the given element. The element itself can be a pseudo-element as well.- Parameters:
element
-pseudo
-- Returns:
-
resolveStyle
public void resolveStyle(LayoutElement element)
Resolves the style. This is guaranteed to be called in the order of the document elements traversing the document tree using the 'deepest-node-first' strategy. (8% just for the first class calls (not counting the calls comming from resolveAnonymous (which is another 6%))- Parameters:
element
- the elemen that should be resolved.
-
deriveInstance
public StyleResolver deriveInstance()
-
saveState
public State saveState() throws StateException
- Throws:
StateException
-
resolvePageStyle
public LayoutStyle resolvePageStyle(CSSValue pageName, PseudoPage[] pseudoPages, PageAreaType pageArea)
-
-