ice.pilots.html4
Class CSSBuilder
java.lang.Object
ice.pilots.html4.CSSBuilder
- All Implemented Interfaces:
- ice.pilots.html4.CSSLexCallback
- public class CSSBuilder
- extends Object
- implements ice.pilots.html4.CSSLexCallback
This class is used to build a CSSStyleSheet from a given Reader or Url.
The code would be something like this:
DStyleSheet ss = new DStyleSheet();
CSSBuilder b = new CSSBuilder(doc);
b.build(ss,myUrl);
doc.addStyleSheet(ss);
|
Method Summary |
void |
atRule(char[] buf,
int offset,
int length)
|
void |
attributeSelector(char[] buf,
int offset,
int length)
|
void |
build(DStyleSheet ss,
Reader r,
String baseUrl)
Build a StyleSheet by loading a parsing the data from a Reader and
using baseUrl for resolving relative urls. |
void |
build(DStyleSheet ss,
String url)
Build a StyleSheet by loading a parsing the data from a url. |
void |
classSelector(char[] buf,
int offset,
int length)
|
void |
declaration(char[] buf,
int propOffset,
int propLength,
int valueOffset,
int valueLength)
|
void |
endBlock()
|
void |
endDeclBlock()
|
void |
endSelector()
|
void |
endStylesheet()
|
void |
idSelector(char[] buf,
int offset,
int length)
|
void |
pseudoSelector(char[] buf,
int offset,
int length)
|
void |
resetSelector()
|
void |
selectorCombinator(char c)
|
void |
startBlock()
|
void |
startDeclBlock()
|
void |
startSelector()
|
void |
startStylesheet()
|
void |
typeSelector(char[] buf,
int offset,
int length,
int prefixLength)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSSBuilder
public CSSBuilder(DDocument doc)
build
public void build(DStyleSheet ss,
String url)
throws IOException
- Build a StyleSheet by loading a parsing the data from a url.
- Throws:
IOException
build
public void build(DStyleSheet ss,
Reader r,
String baseUrl)
throws IOException
- Build a StyleSheet by loading a parsing the data from a Reader and
using baseUrl for resolving relative urls.
- Throws:
IOException
startStylesheet
public void startStylesheet()
- Specified by:
startStylesheet in interface ice.pilots.html4.CSSLexCallback
endStylesheet
public void endStylesheet()
- Specified by:
endStylesheet in interface ice.pilots.html4.CSSLexCallback
atRule
public void atRule(char[] buf,
int offset,
int length)
- Specified by:
atRule in interface ice.pilots.html4.CSSLexCallback
startBlock
public void startBlock()
- Specified by:
startBlock in interface ice.pilots.html4.CSSLexCallback
endBlock
public void endBlock()
- Specified by:
endBlock in interface ice.pilots.html4.CSSLexCallback
startSelector
public void startSelector()
- Specified by:
startSelector in interface ice.pilots.html4.CSSLexCallback
endSelector
public void endSelector()
- Specified by:
endSelector in interface ice.pilots.html4.CSSLexCallback
selectorCombinator
public void selectorCombinator(char c)
- Specified by:
selectorCombinator in interface ice.pilots.html4.CSSLexCallback
typeSelector
public void typeSelector(char[] buf,
int offset,
int length,
int prefixLength)
- Specified by:
typeSelector in interface ice.pilots.html4.CSSLexCallback
attributeSelector
public void attributeSelector(char[] buf,
int offset,
int length)
- Specified by:
attributeSelector in interface ice.pilots.html4.CSSLexCallback
classSelector
public void classSelector(char[] buf,
int offset,
int length)
- Specified by:
classSelector in interface ice.pilots.html4.CSSLexCallback
pseudoSelector
public void pseudoSelector(char[] buf,
int offset,
int length)
- Specified by:
pseudoSelector in interface ice.pilots.html4.CSSLexCallback
idSelector
public void idSelector(char[] buf,
int offset,
int length)
- Specified by:
idSelector in interface ice.pilots.html4.CSSLexCallback
startDeclBlock
public void startDeclBlock()
- Specified by:
startDeclBlock in interface ice.pilots.html4.CSSLexCallback
endDeclBlock
public void endDeclBlock()
- Specified by:
endDeclBlock in interface ice.pilots.html4.CSSLexCallback
resetSelector
public void resetSelector()
- Specified by:
resetSelector in interface ice.pilots.html4.CSSLexCallback
declaration
public void declaration(char[] buf,
int propOffset,
int propLength,
int valueOffset,
int valueLength)
- Specified by:
declaration in interface ice.pilots.html4.CSSLexCallback