| java.lang.Object org.apache.batik.css.engine.CSSEngine org.netbeans.modules.visualweb.designer.cssengine.XhtmlCssEngine
XhtmlCssEngine | class XhtmlCssEngine extends CSSEngine (Code) | | This class plugs in CSS support for XHTML
author: Tor Norbye author: Carl Quinn |
Method Summary | |
protected void | applyNonCSSPresentationalHints(CSSStylableElement e, StyleMap map) | public void | clearComputedStyles(Element element) Remove precomputed styles for the given element - compute them
over again. | String | computeFileName(Object location) | int | computeLineNumber(Object location, int lineno) | static XhtmlCssEngine | create(Document doc, URL url, CssUserAgentInfo userAgentInfo) | protected void | displayError(DOMException e, Object location, int lineno, int column) | protected void | displayMissingStyleSheet(String uri) | protected void | findStyleSheetNodes() | URL | getDocumentUrl() | Value | getLinkColor() | public static int | getXhtmlPropertyIndex(String name) Returns the property index, or -1. | public static int | getXhtmlShorthandIndex(String name) Returns the shorthand property index, or -1. | public static boolean | hasNoUnits(String s) Return true if the string parameter contains a number without any units at the end. | public String | mapToStyle(Map<String, String> map) Given a Map of style properties, serialize the set and compress
properties into shorthands, when possible. | public boolean | mediaMatch(SACMediaList ml) | public void | precomputeAllStyles(CSSStylableElement elt) Initialize all values for a given element (this is otherwise done
lazily) on a getComputedStyle call for a particular property). | public void | refreshStyles() | public void | setErrorHandler(ErrorHandler handler) Set the error handler to be used in the case of parse errors. | public void | setStyleAttributeValue(Element elt, String value) XXX Only a fallback for the original suspicious pattern. | public Map<String, String> | styleToMap(String style) Parse the given style declaration and return a map of properties
stored in it. | protected String | toMinimalStyleString(StyleMap map) Try to create a minimal (as short as possible) style string
from this map, by using shorthands when possible. | protected void | warnCircularReference(URL uri, Object location) |
SILENT_ERROR_HANDLER | final public static ErrorHandler SILENT_ERROR_HANDLER(Code) | | Error Handler which does nothing
|
XHTML_SHORTHAND_MANAGERS | final public static ShorthandManager[] XHTML_SHORTHAND_MANAGERS(Code) | | The shorthand managers for XHTML.
|
XHTML_VALUE_MANAGERS | final public static ValueManager[] XHTML_VALUE_MANAGERS(Code) | | The value managers for XHTML - KEEP IN SYNC WITH PROPERTY INDICES IN XhtmlCss.java
|
applyNonCSSPresentationalHints | protected void applyNonCSSPresentationalHints(CSSStylableElement e, StyleMap map)(Code) | | Scan attributes for an element and transcribe deprecated
style-type attributes into real style properties
|
clearComputedStyles | public void clearComputedStyles(Element element)(Code) | | Remove precomputed styles for the given element - compute them
over again.
|
computeLineNumber | int computeLineNumber(Object location, int lineno)(Code) | | |
displayMissingStyleSheet | protected void displayMissingStyleSheet(String uri)(Code) | | |
findStyleSheetNodes | protected void findStyleSheetNodes()(Code) | | |
getLinkColor | Value getLinkColor()(Code) | | Get the Link Color to use in this document
|
getXhtmlPropertyIndex | public static int getXhtmlPropertyIndex(String name)(Code) | | Returns the property index, or -1.
|
getXhtmlShorthandIndex | public static int getXhtmlShorthandIndex(String name)(Code) | | Returns the shorthand property index, or -1.
|
hasNoUnits | public static boolean hasNoUnits(String s)(Code) | | Return true if the string parameter contains a number without any units at the end. For this
purpose a unit will be considered any alphabetical characters or non space character.
|
mapToStyle | public String mapToStyle(Map<String, String> map)(Code) | | Given a Map of style properties, serialize the set and compress
properties into shorthands, when possible. See styleToMap.
|
precomputeAllStyles | public void precomputeAllStyles(CSSStylableElement elt)(Code) | | Initialize all values for a given element (this is otherwise done
lazily) on a getComputedStyle call for a particular property).
|
refreshStyles | public void refreshStyles()(Code) | | Refresh all styles
|
setErrorHandler | public void setErrorHandler(ErrorHandler handler)(Code) | | Set the error handler to be used in the case of parse errors.
If not set, the default handler will be used, which emits warnings
in the output window.
|
setStyleAttributeValue | public void setStyleAttributeValue(Element elt, String value)(Code) | | XXX Only a fallback for the original suspicious pattern.
|
styleToMap | public Map<String, String> styleToMap(String style)(Code) | | Parse the given style declaration and return a map of properties
stored in it. The Map will have String keys which correspond to
property names, and String values which correspond to CSS
raw text for the values.
|
toMinimalStyleString | protected String toMinimalStyleString(StyleMap map)(Code) | | Try to create a minimal (as short as possible) style string
from this map, by using shorthands when possible.
This will for example compress border-color-left/right/bottom/top
into border-color: one two three four, and so on.
|
warnCircularReference | protected void warnCircularReference(URL uri, Object location)(Code) | | |
Methods inherited from org.apache.batik.css.engine.CSSEngine | public void addCSSEngineListener(CSSEngineListener l)(Code)(Java Doc) protected void addMatchingRules(List rules, StyleSheet ss, Element elt, String pseudo)(Code)(Java Doc) protected void addRules(Element elt, String pseudo, StyleMap sm, List rules, short origin)(Code)(Java Doc) public void addTransientStyleSheetNode(CSSStyleSheetNode elt)(Code)(Java Doc) protected void applyNonCSSPresentationalHint(CSSStylableElement elt, StyleMap map, int idx, String value)(Code)(Java Doc) protected void applyNonCSSPresentationalHint(CSSStylableElement elt, StyleMap map, int idx, Value v)(Code)(Java Doc) protected void applyNonCSSPresentationalHints(CSSStylableElement elt, StyleMap map)(Code)(Java Doc) public void clearTransientStyleSheetNodes()(Code)(Java Doc) protected void displayError(DOMException e, Object location, int lineno, int column)(Code)(Java Doc) protected void displayMissingStyleSheet(String uri)(Code)(Java Doc) public void dispose()(Code)(Java Doc) protected void disposeStyleMaps(Node node)(Code)(Java Doc) protected void findSelectorAttributes(Set attrs, StyleSheet ss)(Code)(Java Doc) protected void findStyleSheetNodes()(Code)(Java Doc) protected void findStyleSheetNodes(Node n)(Code)(Java Doc) protected void firePropertiesChangedEvent(Element target, int[] props)(Code)(Java Doc) public URL getCSSBaseURI()(Code)(Java Doc) public CSSContext getCSSContext()(Code)(Java Doc) public CSSEngineUserAgent getCSSEngineUserAgent()(Code)(Java Doc) public StyleMap getCascadedStyleMap(CSSStylableElement elt, String pseudo)(Code)(Java Doc) public int getColorIndex()(Code)(Java Doc) public Value getComputedStyle(CSSStylableElement elt, String pseudo, int propidx)(Code)(Java Doc) public Document getDocument()(Code)(Java Doc) public String getExpandingShorthandProperty()(Code)(Java Doc) public List getFontFaces()(Code)(Java Doc) public int getFontSizeIndex()(Code)(Java Doc) public static CSSImportedElementRoot getImportedChild(Node node)(Code)(Java Doc) public int getLineHeightIndex()(Code)(Java Doc) public static Node getLogicalParentNode(Node parent)(Code)(Java Doc) public String getMatchingRules(Element elt, boolean includeAgentRules)(Code)(Java Doc) public int getNumberOfProperties()(Code)(Java Doc) public static CSSStylableElement getParentCSSStylableElement(Element elt)(Code)(Java Doc) public static Element getParentElement(Element elt)(Code)(Java Doc) public int getPropertyIndex(String name)(Code)(Java Doc) public String getPropertyName(int idx)(Code)(Java Doc) public int getShorthandIndex(String name)(Code)(Java Doc) public Collection getStyleClasses()(Code)(Java Doc) public List<WeakReference<CSSStyleSheetNode>> getStyleSheetNodes()(Code)(Java Doc) public String getUpdatedLocalStyleValues(CSSStylableElement elt, StyleSetting[] stylesToSet, StyleSetting[] stylesToRemove) throws Exception(Code)(Java Doc) public ValueManager[] getValueManagers()(Code)(Java Doc) public void importCascadedStyleMaps(Element src, CSSEngine srceng, Element dest)(Code)(Java Doc) protected void inlineStyleAttributeUpdated(CSSStylableElement elt, StyleMap style, MutationEvent evt)(Code)(Java Doc) protected void invalidateProperties(Node node, int[] properties, boolean[] updated, boolean recascade)(Code)(Java Doc) public boolean isDefaultValue(CSSStylableElement elt, String pseudo, int propidx)(Code)(Java Doc) public boolean isInheritedValue(CSSStylableElement elt, int propidx)(Code)(Java Doc) protected boolean mediaMatch(SACMediaList ml)(Code)(Java Doc) protected void nonCSSPresentationalHintUpdated(CSSStylableElement elt, StyleMap style, String property, MutationEvent evt)(Code)(Java Doc) public Value parsePropertyValue(CSSStylableElement elt, String prop, String value)(Code)(Java Doc) public StyleDeclaration parseStyleDeclaration(CSSStylableElement elt, String value)(Code)(Java Doc) public StyleSheet parseStyleSheet(URL uri, String media, Object location) throws DOMException(Code)(Java Doc) public StyleSheet parseStyleSheet(InputSource is, URL uri, String media, Object location) throws DOMException(Code)(Java Doc) public void parseStyleSheet(StyleSheet ss, URL uri, Object location) throws DOMException(Code)(Java Doc) public StyleSheet parseStyleSheet(String rules, URL uri, String media, Object location) throws DOMException(Code)(Java Doc) public void parseStyleSheet(StyleSheet ss, String rules, URL uri, Object location) throws DOMException(Code)(Java Doc) protected void parseStyleSheet(StyleSheet ss, InputSource is, URL uri, Object location) throws IOException(Code)(Java Doc) protected void propagateChanges(Node node, int[] props, boolean recascade)(Code)(Java Doc) protected void putAuthorProperty(StyleMap dest, int idx, Value sval, boolean imp, short origin)(Code)(Java Doc) public void removeCSSEngineListener(CSSEngineListener l)(Code)(Java Doc) public void setAlternateStyleSheet(String str)(Code)(Java Doc) protected void setAttributeValue(Element elt, String name, String value)(Code)(Java Doc) public void setCSSEngineUserAgent(CSSEngineUserAgent userAgent)(Code)(Java Doc) public void setMainProperties(CSSStylableElement elt, MainPropertyReceiver dst, String pname, String value, boolean important)(Code)(Java Doc) public void setMedia(String str)(Code)(Java Doc) public void setUserAgentStyleSheet(StyleSheet ss)(Code)(Java Doc) public void setUserStyleSheet(StyleSheet ss)(Code)(Java Doc) protected void sortRules(List rules, Element elt, String pseudo)(Code)(Java Doc) protected String toMinimalStyleString(StyleMap map)(Code)(Java Doc) protected void warnCircularReference(URL uri, Object location)(Code)(Java Doc)
|
|
|