|
|||||||||
| Home >> All >> javax >> swing >> text >> [ html overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.swing.text.html
Class StyleSheet.CssParser

java.lang.Objectjavax.swing.text.html.StyleSheet.CssParser
- All Implemented Interfaces:
- CSSParser.CSSParserCallback
- Enclosing class:
- StyleSheet
- class StyleSheet.CssParser
- extends java.lang.Object
- implements CSSParser.CSSParserCallback
- extends java.lang.Object
The parser callback for the CSSParser.
| Field Summary | |
(package private) java.net.URL |
base
The base URL |
(package private) javax.swing.text.MutableAttributeSet |
declaration
The set of CSS declarations |
(package private) boolean |
isLink
True if the attributes are coming from a linked/imported style. |
(package private) CSSParser |
parser
The parser |
(package private) boolean |
parsingDeclaration
True if parsing a declaration, that is the Reader will not contain a selector. |
(package private) java.lang.String |
propertyName
Name of the current property. |
(package private) java.util.Vector |
selectors
A vector of all the selectors. |
(package private) java.util.Vector |
selectorTokens
A vector of all the selector tokens in a rule. |
| Constructor Summary | |
(package private) |
StyleSheet.CssParser()
Constructor |
| Method Summary | |
private void |
addSelector()
Adds the selector to the vector. |
void |
endRule()
Invoked when the end of a rule is encountered. |
void |
handleImport(java.lang.String s)
Invoked when a valid @import is encountered, will call importStyleSheet if a MalformedURLException is not thrown in creating the URL. |
void |
handleProperty(java.lang.String s)
Invoked when a property name is encountered. |
void |
handleSelector(java.lang.String s)
A selector has been encountered. |
void |
handleValue(java.lang.String s)
Invoked when a property value is encountered. |
void |
parse(java.net.URL base,
java.io.Reader r,
boolean parseDec,
boolean isLink)
Parse the given CSS stream |
javax.swing.text.AttributeSet |
parseDeclaration(java.io.Reader r)
Parses the passed in CSS declaration into an AttributeSet. |
javax.swing.text.AttributeSet |
parseDeclaration(java.lang.String s)
Parses the passed in CSS declaration into an AttributeSet. |
void |
startRule()
Invoked when the start of a rule is encountered. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
selectors
java.util.Vector selectors
- A vector of all the selectors.
Each element is an array of all the selector tokens
in a single rule.
selectorTokens
java.util.Vector selectorTokens
- A vector of all the selector tokens in a rule.
propertyName
java.lang.String propertyName
- Name of the current property.
declaration
javax.swing.text.MutableAttributeSet declaration
- The set of CSS declarations
parsingDeclaration
boolean parsingDeclaration
- True if parsing a declaration, that is the Reader will not
contain a selector.
isLink
boolean isLink
- True if the attributes are coming from a linked/imported style.
base
java.net.URL base
- The base URL
parser
CSSParser parser
- The parser
| Constructor Detail |
StyleSheet.CssParser
StyleSheet.CssParser()
- Constructor
| Method Detail |
parseDeclaration
public javax.swing.text.AttributeSet parseDeclaration(java.lang.String s)
- Parses the passed in CSS declaration into an AttributeSet.
parseDeclaration
public javax.swing.text.AttributeSet parseDeclaration(java.io.Reader r) throws java.io.IOException
- Parses the passed in CSS declaration into an AttributeSet.
parse
public void parse(java.net.URL base, java.io.Reader r, boolean parseDec, boolean isLink) throws java.io.IOException
- Parse the given CSS stream
handleImport
public void handleImport(java.lang.String s)
- Invoked when a valid @import is encountered,
will call importStyleSheet if a MalformedURLException
is not thrown in creating the URL.
- Specified by:
handleImportin interfaceCSSParser.CSSParserCallback
handleSelector
public void handleSelector(java.lang.String s)
- A selector has been encountered.
- Specified by:
handleSelectorin interfaceCSSParser.CSSParserCallback
startRule
public void startRule()
- Invoked when the start of a rule is encountered.
- Specified by:
startRulein interfaceCSSParser.CSSParserCallback
handleProperty
public void handleProperty(java.lang.String s)
- Invoked when a property name is encountered.
- Specified by:
handlePropertyin interfaceCSSParser.CSSParserCallback
handleValue
public void handleValue(java.lang.String s)
- Invoked when a property value is encountered.
- Specified by:
handleValuein interfaceCSSParser.CSSParserCallback
endRule
public void endRule()
- Invoked when the end of a rule is encountered.
- Specified by:
endRulein interfaceCSSParser.CSSParserCallback
addSelector
private void addSelector()
- Adds the selector to the vector.
|
|||||||||
| Home >> All >> javax >> swing >> text >> [ html overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
javax.swing.text.html.StyleSheet.CssParser