fi.hut.tml.xsmiles.mlfc.css
Class CSSImpl

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.css.CSSImpl
All Implemented Interfaces:
XSmilesStyleSheet

public class CSSImpl
extends java.lang.Object
implements XSmilesStyleSheet

This class is the interface to MLFCs for 1. reading the style of a single element. 2. Adding new stylesheet references (both author + user agent)

Author:
Mikko Honkala, Alessandro Cogliati

Field Summary
protected  Selectors cssSelectors
           
 
Constructor Summary
CSSImpl()
           
CSSImpl(MediaQueryEvaluator mqe, org.w3c.dom.Document doc)
           
 
Method Summary
 void addXMLDefaultStyleSheet(java.net.URL defaultUrl)
          Add a new default (User Agent) stylesheet
 void addXMLStyleSheet(java.lang.String stylesheetText, java.net.URL baseURL)
          Add a new author stylesheet
 void addXMLStyleSheet(java.net.URL stylesheetUrl)
          Add a new author stylesheet
protected  void createCSSSelectors(org.w3c.dom.Document doc)
           
 Selectors getCSSSelectors()
           
 org.w3c.dom.css.CSSStyleDeclaration getParsedStyle(StylableElement elem)
          get parsed and combined style for an element
 org.w3c.dom.css.CSSStyleDeclaration getParsedStyle(StylableElement elem, java.lang.String pseudoelement)
          This method is the main entry point for the MLFCs.
protected  void matchRules(org.w3c.dom.css.CSSStyleSheet ss, StylableElement elem, java.lang.String pseudoelement, XSmilesCSSStyleDeclarationImpl style)
           
 void prepareStyleSheet(org.w3c.dom.css.CSSStyleSheet ss)
          prepare a parsed stylesheet (add mediaqueryevaluator + do sorting)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cssSelectors

protected Selectors cssSelectors
Constructor Detail

CSSImpl

public CSSImpl(MediaQueryEvaluator mqe,
               org.w3c.dom.Document doc)

CSSImpl

public CSSImpl()
Method Detail

getParsedStyle

public org.w3c.dom.css.CSSStyleDeclaration getParsedStyle(StylableElement elem)
Description copied from interface: XSmilesStyleSheet
get parsed and combined style for an element

Specified by:
getParsedStyle in interface XSmilesStyleSheet

createCSSSelectors

protected void createCSSSelectors(org.w3c.dom.Document doc)

getCSSSelectors

public Selectors getCSSSelectors()
Specified by:
getCSSSelectors in interface XSmilesStyleSheet

getParsedStyle

public org.w3c.dom.css.CSSStyleDeclaration getParsedStyle(StylableElement elem,
                                                          java.lang.String pseudoelement)
This method is the main entry point for the MLFCs. It gets the style for a single element.


matchRules

protected void matchRules(org.w3c.dom.css.CSSStyleSheet ss,
                          StylableElement elem,
                          java.lang.String pseudoelement,
                          XSmilesCSSStyleDeclarationImpl style)

prepareStyleSheet

public void prepareStyleSheet(org.w3c.dom.css.CSSStyleSheet ss)
Description copied from interface: XSmilesStyleSheet
prepare a parsed stylesheet (add mediaqueryevaluator + do sorting)

Specified by:
prepareStyleSheet in interface XSmilesStyleSheet

addXMLDefaultStyleSheet

public void addXMLDefaultStyleSheet(java.net.URL defaultUrl)
Add a new default (User Agent) stylesheet

Specified by:
addXMLDefaultStyleSheet in interface XSmilesStyleSheet

addXMLStyleSheet

public void addXMLStyleSheet(java.net.URL stylesheetUrl)
Add a new author stylesheet

Specified by:
addXMLStyleSheet in interface XSmilesStyleSheet

addXMLStyleSheet

public void addXMLStyleSheet(java.lang.String stylesheetText,
                             java.net.URL baseURL)
Add a new author stylesheet

Specified by:
addXMLStyleSheet in interface XSmilesStyleSheet


X-Smiles 1.2