|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.inet.html.parser.CssParser
public class CssParser
The JWebEngine CSS2 parser. Defined by http://www.w3.org/TR/1998/REC-CSS2/syndata.html
Constructor Summary | |
---|---|
CssParser(PushReader reader,
Styles styles,
boolean ignoreUnknown)
This constructor can be used to parse styles directly to a given styles-table. |
|
CssParser(PushReader reader,
Styles styles,
java.lang.Object sourceID,
java.net.URL baseURL,
boolean ignoreUnknown,
boolean avoidDuplicates)
Constructor is used for the includes STYLE tag. |
|
CssParser(java.lang.String style,
Styles styles,
java.net.URL baseURL,
boolean ignoreUnknown,
boolean avoidDuplicates)
This constructor is uses for the HTML attribute "style". |
|
CssParser(java.net.URL url,
java.lang.Object sourceID,
Styles styles,
java.lang.String charset,
boolean ignoreUnknown)
This constructor is using for external stylscheets. |
|
CssParser(java.net.URL url,
Styles styles,
boolean ignoreUnknown,
java.lang.Object sourceID)
This constructor is using for default.css. |
Method Summary | |
---|---|
void |
parse()
Parses the new styles |
void |
parseStyle(javax.swing.text.MutableAttributeSet attrs)
Parse the value of the HTML attribute "style". |
java.lang.Object |
parseWithID()
Parses the new styles |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CssParser(java.net.URL url, Styles styles, boolean ignoreUnknown, java.lang.Object sourceID) throws java.io.IOException
url
- the URL of the stylesheet filestyles
- the container for theignoreUnknown
- set to true, to completely ignore unknown attributessourceID
- an object to identify the source of this style sheet
java.io.IOException
- if an I/O exception occurs.public CssParser(PushReader reader, Styles styles, boolean ignoreUnknown)
reader
- the reader to get the data fromstyles
- the container for the parsed stylesignoreUnknown
- set to true, if unknown styles should be ignoredpublic CssParser(java.net.URL url, java.lang.Object sourceID, Styles styles, java.lang.String charset, boolean ignoreUnknown) throws java.io.IOException
url
- the URL of the stylesheet filesourceID
- the identifier of an external CSS sourcestyles
- the container for the parsed stylescharset
- the encoding of the fileignoreUnknown
- set to true, to completely ignore unknown attributes
java.io.IOException
- if an I/O exception occurs.public CssParser(java.lang.String style, Styles styles, java.net.URL baseURL, boolean ignoreUnknown, boolean avoidDuplicates)
style
- the value of the style attributestyles
- the primary stylesheet of the current documentbaseURL
- the baseURL for solving of relative URLsignoreUnknown
- set to true, if unknown styles should be ignoredavoidDuplicates
- set to true, if this stylesheet is inserted an duplicates should be avoidedpublic CssParser(PushReader reader, Styles styles, java.lang.Object sourceID, java.net.URL baseURL, boolean ignoreUnknown, boolean avoidDuplicates)
reader
- the reader of the html document. the pointer is on the starting position of the STYLE datastyles
- the primary stylesheet of the current documentsourceID
- TODObaseURL
- the baseURL for solving of relative URLsignoreUnknown
- set to true, if unknown styles should be ignoredavoidDuplicates
- set to true, if this stylesheet is inserted an duplicates should be avoidedMethod Detail |
---|
public void parse() throws java.io.IOException
java.io.IOException
- thrown on stream read errorspublic java.lang.Object parseWithID() throws java.io.IOException
java.io.IOException
- thrown on stream read errorspublic void parseStyle(javax.swing.text.MutableAttributeSet attrs) throws java.io.IOException
attrs
- the attribute set to parse to
java.io.IOException
- thrown on stream read errors
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |