| org.netbeans.modules.visualweb.api.designer.cssengine.CssEngineService
All known Subclasses: org.netbeans.modules.visualweb.designer.cssengine.CssEngineServiceImpl,
CssEngineService | public interface CssEngineService (Code) | | Interface to the CSS engine services.
Important note: Do not provide implementation of this interface, use the provider to access it!
author: Peter Zavadsky |
Inner Class :public interface CssSyntaxErrorInfo | |
Method Summary | |
public void | addTransientStyleSheetNodeForDocument(Document document, Node styleSheetNode) Adding a node which represents style sheet node for specified Document ,
into the corresponding css engine, if there is one. | public void | clearComputedStylesForElement(Element element) Clears computed styles for specified Element if there is corresponding css engine. | public void | clearEngineStyleLookupCount() | public void | clearTransientStyleSheetNodesForDocument(Document document) Clears the stylesheet nodes for the specified document, from the corresponding css engine,
if there is one. | public void | createCssEngineForDocument(Document document, URL url) Creates a css engine for specified Document and stores it internally. | public Element | createPreviewElementForDocument(Document document, URL base, String styles) Creates a 'preview' element. | public void | flushStyleSheetCache() | public String | getAllComputedStylesForElement(Element element) | public String | getAllRulesForElement(Element element) | public String | getAllStylesForElement(Element element) | public URL | getBackgroundImageUrlForElement(Element element, URL baseUrl) Returns URL of background image relative to the specified base URL . | public CssValue | getComputedValueForElement(Element element, int propIndex) XXX FIXME Get rid of this method, it uses batik classes, which is not acceptable.
Gets computed value for specified Element index if the corresponding css engine exists. | public String[] | getCssIdentifiers(String propertyName) | public String[] | getCssProperties() | public Collection | getCssStyleClassesForDocument(Document document) Gets collection of style classes for specific document, if there is corresponding css engine available
otherwise it returns an empty collection. | public int | getEngineStyleLookupCount() | public String | getStringFromStyleMapForDocument(Document document, Map<String, String> styleMap) Given a Map of style properties, serialize the set and compress
properties into shorthands, when possible. | public Map | getStyleMapFromStringForDocument(Document document, String style) Parse the given style declaration and return a map of properties
stored in it. | public Element | getStyleParentForElement(Element element) | public String[] | getStyleResourcesForElement(Element element, String rules, Document doc, URL docUrl, int[] indexesToMatch) Gets url strings. | public ResourceData[] | getStyleResourcesForRules(String rules, Document doc, URL docUrl, URL base, int[] indexesToMatch) Gets style resources data. | public ResourceData[] | getStyleResourcesForUrl(URL url, Document doc, URL docUrl, int[] indexesToMatch) Gets style resources data. | public String | getUpdatedLocalStyleValuesForElement(Element element, StyleData[] stylesToSet, StyleData[] stylesToRemove) Gets the local styles string for a specified Element if there is corresponding css engine. | public int | getXhtmlPropertyIndex(String property) | public boolean | isDefaultStyleValueForElement(Element element, String pseudo, int propIndex) Returns true if the value is default,
for a specified Element if there is corresponsing css engine. | public boolean | isInheritedStyleValueForElement(Element element, int propIndex) Returns true if was inherited, as opposed to referenced directly by some rule.
for a specified Element if there is corresponsing css engine. | public boolean | isInlineStyleValue(Element element, int propIndex) Returns true if the given CSS property for the given element
is set by an inline property setting. | public CssSyntaxErrorInfo[] | parseCss(javax.swing.text.Document document) Parse the given document, gets the info about syntax errors. | public StyleSheet | parseStyleSheetForDocument(Document document, String rules, URL uri, String media, Object location) XXX FIXME Get rid of this method, it uses batik classes, which is not acceptable. | public StyleSheet | parseStyleSheetForDocument(Document document, URL uri, String media, Object location) XXX FIXME Get rid of this method, it uses batik classes, which is not acceptable. | public void | refreshStylesForDocument(Document document) Refreshes all styles for specified Document if corresponding css engine exists. | public void | removeCssEngineForDocument(Document document) Removes the css engine for specified Document if there was one created before. | public void | reuseCssEngineForDocument(Document document, Document originalDocument) Reuses the css engine instance for the specified document if there already
exist one for the originalDocument instance. | public void | setNullErrorHandlerForDocument(Document document) Sets null error handler for specified Document if there is corresponding css engine. | public void | setSilentErrorHandlerForDocument(Document document) Sets silent error handler for specified Document if there is corresponding css engine. | public void | setStyleAttributeForElement(Element element, String value) Sets style attribute in specified Element if there is corresponding css engine. | public void | setStyleParentForElement(Element element, Element styleParent) | public void | uncomputeValueForElement(Element element, int propIndex) If the given property for an element has been computed, remove
its computed state so that it gets recomputed for the next
getComputedStyle call, for specified Document if corresponding
css engine exists.
XXX TODO it sounds horrible, revise. |
addTransientStyleSheetNodeForDocument | public void addTransientStyleSheetNodeForDocument(Document document, Node styleSheetNode)(Code) | | Adding a node which represents style sheet node for specified Document ,
into the corresponding css engine, if there is one.
|
clearComputedStylesForElement | public void clearComputedStylesForElement(Element element)(Code) | | Clears computed styles for specified Element if there is corresponding css engine.
|
clearEngineStyleLookupCount | public void clearEngineStyleLookupCount()(Code) | | |
clearTransientStyleSheetNodesForDocument | public void clearTransientStyleSheetNodesForDocument(Document document)(Code) | | Clears the stylesheet nodes for the specified document, from the corresponding css engine,
if there is one.
|
createCssEngineForDocument | public void createCssEngineForDocument(Document document, URL url)(Code) | | Creates a css engine for specified Document and stores it internally.
|
createPreviewElementForDocument | public Element createPreviewElementForDocument(Document document, URL base, String styles)(Code) | | Creates a 'preview' element.
|
flushStyleSheetCache | public void flushStyleSheetCache()(Code) | | |
getAllComputedStylesForElement | public String getAllComputedStylesForElement(Element element)(Code) | | |
getBackgroundImageUrlForElement | public URL getBackgroundImageUrlForElement(Element element, URL baseUrl)(Code) | | Returns URL of background image relative to the specified base URL .
|
getComputedValueForElement | public CssValue getComputedValueForElement(Element element, int propIndex)(Code) | | XXX FIXME Get rid of this method, it uses batik classes, which is not acceptable.
Gets computed value for specified Element index if the corresponding css engine exists.
|
getCssStyleClassesForDocument | public Collection getCssStyleClassesForDocument(Document document)(Code) | | Gets collection of style classes for specific document, if there is corresponding css engine available
otherwise it returns an empty collection.
|
getEngineStyleLookupCount | public int getEngineStyleLookupCount()(Code) | | |
getStringFromStyleMapForDocument | public String getStringFromStyleMapForDocument(Document document, Map<String, String> styleMap)(Code) | | Given a Map of style properties, serialize the set and compress
properties into shorthands, when possible. See styleToMap.
If there is no css engine created, it returns an empty map.
|
getStyleMapFromStringForDocument | public Map getStyleMapFromStringForDocument(Document document, 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.
If there is no css engine created, it returns an empty map.
|
getUpdatedLocalStyleValuesForElement | public String getUpdatedLocalStyleValuesForElement(Element element, StyleData[] stylesToSet, StyleData[] stylesToRemove) throws Exception(Code) | | Gets the local styles string for a specified Element if there is corresponding css engine.
First any style settings in the set parameter array are applied, then any properties
pointed to by the remove array are applied.
The new style string |
getXhtmlPropertyIndex | public int getXhtmlPropertyIndex(String property)(Code) | | |
isDefaultStyleValueForElement | public boolean isDefaultStyleValueForElement(Element element, String pseudo, int propIndex)(Code) | | Returns true if the value is default,
for a specified Element if there is corresponsing css engine.
|
isInheritedStyleValueForElement | public boolean isInheritedStyleValueForElement(Element element, int propIndex)(Code) | | Returns true if was inherited, as opposed to referenced directly by some rule.
for a specified Element if there is corresponsing css engine.
|
isInlineStyleValue | public boolean isInlineStyleValue(Element element, int propIndex)(Code) | | Returns true if the given CSS property for the given element
is set by an inline property setting.
TODO move to some other non css engine interface
|
parseCss | public CssSyntaxErrorInfo[] parseCss(javax.swing.text.Document document)(Code) | | Parse the given document, gets the info about syntax errors.
Parameters: document - The document to be parsed |
parseStyleSheetForDocument | public StyleSheet parseStyleSheetForDocument(Document document, String rules, URL uri, String media, Object location)(Code) | | XXX FIXME Get rid of this method, it uses batik classes, which is not acceptable.
|
parseStyleSheetForDocument | public StyleSheet parseStyleSheetForDocument(Document document, URL uri, String media, Object location)(Code) | | XXX FIXME Get rid of this method, it uses batik classes, which is not acceptable.
|
refreshStylesForDocument | public void refreshStylesForDocument(Document document)(Code) | | Refreshes all styles for specified Document if corresponding css engine exists.
|
removeCssEngineForDocument | public void removeCssEngineForDocument(Document document)(Code) | | Removes the css engine for specified Document if there was one created before.
|
reuseCssEngineForDocument | public void reuseCssEngineForDocument(Document document, Document originalDocument)(Code) | | Reuses the css engine instance for the specified document if there already
exist one for the originalDocument instance.
|
setNullErrorHandlerForDocument | public void setNullErrorHandlerForDocument(Document document)(Code) | | Sets null error handler for specified Document if there is corresponding css engine.
|
setSilentErrorHandlerForDocument | public void setSilentErrorHandlerForDocument(Document document)(Code) | | Sets silent error handler for specified Document if there is corresponding css engine.
|
setStyleAttributeForElement | public void setStyleAttributeForElement(Element element, String value)(Code) | | Sets style attribute in specified Element if there is corresponding css engine.
|
setStyleParentForElement | public void setStyleParentForElement(Element element, Element styleParent)(Code) | | |
uncomputeValueForElement | public void uncomputeValueForElement(Element element, int propIndex)(Code) | | If the given property for an element has been computed, remove
its computed state so that it gets recomputed for the next
getComputedStyle call, for specified Document if corresponding
css engine exists.
XXX TODO it sounds horrible, revise.
|
|
|