Package org.eclipse.e4.ui.css.core.dom
Class ElementAdapter
java.lang.Object
org.eclipse.e4.ui.css.core.dom.ElementAdapter
- All Implemented Interfaces:
CSSStylableElement
,Element
,Node
- Direct Known Subclasses:
EclipsePreferencesElement
,ThemeDefinitionElement
,ThemesExtensionElement
,WidgetElement
Element
implementation.-
Field Summary
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStaticPseudoInstance
(String pseudoE) Add static pseudo instanceappendChild
(Node newChild) cloneNode
(boolean arg0) short
compareDocumentPosition
(Node other) void
copyDefaultStyleDeclarations
(CSSStylableElement stylableElement) Copy all default style declarations defined intostylableElement
.void
dispose()
Method called whenCSSEngine.dispose()
is called.protected void
Apply styles for the native widget.abstract String
getAttribute
(String arg0) getAttributeNode
(String arg0) getAttributeNodeNS
(String arg0, String arg1) getAttributeNS
(String namespace, String attr) getDefaultStyleDeclaration
(String pseudoE) Return the defaultCSSStyleDeclaration
of the native widget.protected Element
getElement
(Object widget) getElementsByTagName
(String arg0) getElementsByTagNameNS
(String arg0, String arg1) getFeature
(String feature, String version) abstract String
Return the native widget wrapped (SWT widget, Swing Component...)short
String[]
Return all static pseudo instances.getStyle()
Return theCSSExtendedProperties
of the native widget.getUserData
(String key) boolean
hasAttribute
(String arg0) boolean
hasAttributeNS
(String namespace, String attr) boolean
boolean
void
Method called after theCSSStylableElement
was linked to the native widget.insertBefore
(Node newChild, Node refChild) boolean
isDefaultNamespace
(String namespaceURI) boolean
isEqualNode
(Node arg) boolean
Return true ifs
is pseudo instance (ex :focus) and false otherwise.boolean
isSameNode
(Node other) boolean
Return true ifs
is static pseudo instance (ex :CTabFolder:selected) and false otherwise.boolean
isSupported
(String arg0, String arg1) lookupNamespaceURI
(String prefix) lookupPrefix
(String namespaceURI) void
void
onStylesApplied
(NodeList nodes) Call-back method called when styles are applied to the all children nodes of the native widgetvoid
removeAttribute
(String arg0) removeAttributeNode
(Attr arg0) void
removeAttributeNS
(String arg0, String arg1) removeChild
(Node arg0) replaceChild
(Node arg0, Node arg1) void
setAttribute
(String arg0, String arg1) setAttributeNode
(Attr arg0) setAttributeNodeNS
(Attr arg0) void
setAttributeNS
(String arg0, String arg1, String arg2) void
setDefaultStyleDeclaration
(String pseudoE, CSSStyleDeclaration declaration) Set the defaultCSSStyleDeclaration
of the native widget.void
setIdAttribute
(String name, boolean isId) void
setIdAttributeNode
(Attr idAttr, boolean isId) void
setIdAttributeNS
(String namespaceURI, String localName, boolean isId) void
setNodeValue
(String arg0) void
void
setTextContent
(String textContent) setUserData
(String key, Object data, UserDataHandler handler) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.e4.ui.css.core.dom.CSSStylableElement
getCSSClass, getCSSId, getCSSStyle
Methods inherited from interface org.w3c.dom.Node
getChildNodes, getNamespaceURI, getParentNode
-
Field Details
-
engine
-
-
Constructor Details
-
ElementAdapter
-
-
Method Details
-
addStaticPseudoInstance
Add static pseudo instance -
isStaticPseudoInstance
Description copied from interface:CSSStylableElement
Return true ifs
is static pseudo instance (ex :CTabFolder:selected) and false otherwise. Static pseudo instance is used for widget which define method which can update property (Color, BackgroundColor) for a special state (without manage listener like focus). For instance SWT CTabFolder#setSelectionBackground (Color color) is method which set background color when a CTabItem is selected.- Specified by:
isStaticPseudoInstance
in interfaceCSSStylableElement
-
copyDefaultStyleDeclarations
Description copied from interface:CSSStylableElement
Copy all default style declarations defined intostylableElement
.- Specified by:
copyDefaultStyleDeclarations
in interfaceCSSStylableElement
-
getLocalName
- Specified by:
getLocalName
in interfaceNode
-
getAttribute
- Specified by:
getAttribute
in interfaceElement
-
getAttributeNS
- Specified by:
getAttributeNS
in interfaceElement
- Throws:
DOMException
-
getAttributeNode
- Specified by:
getAttributeNode
in interfaceElement
-
getAttributeNodeNS
- Specified by:
getAttributeNodeNS
in interfaceElement
- Throws:
DOMException
-
getElementsByTagName
- Specified by:
getElementsByTagName
in interfaceElement
-
getElementsByTagNameNS
- Specified by:
getElementsByTagNameNS
in interfaceElement
- Throws:
DOMException
-
hasAttribute
- Specified by:
hasAttribute
in interfaceElement
-
hasAttributeNS
- Specified by:
hasAttributeNS
in interfaceElement
- Throws:
DOMException
-
removeAttribute
- Specified by:
removeAttribute
in interfaceElement
- Throws:
DOMException
-
removeAttributeNS
- Specified by:
removeAttributeNS
in interfaceElement
- Throws:
DOMException
-
removeAttributeNode
- Specified by:
removeAttributeNode
in interfaceElement
- Throws:
DOMException
-
setAttribute
- Specified by:
setAttribute
in interfaceElement
- Throws:
DOMException
-
setAttributeNS
- Specified by:
setAttributeNS
in interfaceElement
- Throws:
DOMException
-
setAttributeNode
- Specified by:
setAttributeNode
in interfaceElement
- Throws:
DOMException
-
setAttributeNodeNS
- Specified by:
setAttributeNodeNS
in interfaceElement
- Throws:
DOMException
-
appendChild
- Specified by:
appendChild
in interfaceNode
- Throws:
DOMException
-
cloneNode
-
getAttributes
- Specified by:
getAttributes
in interfaceNode
-
getFirstChild
- Specified by:
getFirstChild
in interfaceNode
-
getLastChild
- Specified by:
getLastChild
in interfaceNode
-
getTagName
- Specified by:
getTagName
in interfaceElement
-
getNextSibling
- Specified by:
getNextSibling
in interfaceNode
-
getNodeName
- Specified by:
getNodeName
in interfaceNode
-
getNodeType
public short getNodeType()- Specified by:
getNodeType
in interfaceNode
-
getNodeValue
- Specified by:
getNodeValue
in interfaceNode
- Throws:
DOMException
-
getOwnerDocument
- Specified by:
getOwnerDocument
in interfaceNode
-
getPrefix
-
getPreviousSibling
- Specified by:
getPreviousSibling
in interfaceNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributes
in interfaceNode
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodes
in interfaceNode
-
insertBefore
- Specified by:
insertBefore
in interfaceNode
- Throws:
DOMException
-
isSupported
- Specified by:
isSupported
in interfaceNode
-
normalize
public void normalize() -
removeChild
- Specified by:
removeChild
in interfaceNode
- Throws:
DOMException
-
replaceChild
- Specified by:
replaceChild
in interfaceNode
- Throws:
DOMException
-
setNodeValue
- Specified by:
setNodeValue
in interfaceNode
- Throws:
DOMException
-
setPrefix
- Specified by:
setPrefix
in interfaceNode
- Throws:
DOMException
-
setIdAttribute
- Specified by:
setIdAttribute
in interfaceElement
- Throws:
DOMException
-
setIdAttributeNS
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException - Specified by:
setIdAttributeNS
in interfaceElement
- Throws:
DOMException
-
setIdAttributeNode
- Specified by:
setIdAttributeNode
in interfaceElement
- Throws:
DOMException
-
compareDocumentPosition
- Specified by:
compareDocumentPosition
in interfaceNode
- Throws:
DOMException
-
getBaseURI
- Specified by:
getBaseURI
in interfaceNode
-
getFeature
- Specified by:
getFeature
in interfaceNode
-
getTextContent
- Specified by:
getTextContent
in interfaceNode
- Throws:
DOMException
-
getUserData
- Specified by:
getUserData
in interfaceNode
-
isDefaultNamespace
- Specified by:
isDefaultNamespace
in interfaceNode
-
isEqualNode
- Specified by:
isEqualNode
in interfaceNode
-
isSameNode
- Specified by:
isSameNode
in interfaceNode
-
lookupNamespaceURI
- Specified by:
lookupNamespaceURI
in interfaceNode
-
lookupPrefix
- Specified by:
lookupPrefix
in interfaceNode
-
setTextContent
- Specified by:
setTextContent
in interfaceNode
- Throws:
DOMException
-
getNativeWidget
Description copied from interface:CSSStylableElement
Return the native widget wrapped (SWT widget, Swing Component...)- Specified by:
getNativeWidget
in interfaceCSSStylableElement
-
setUserData
- Specified by:
setUserData
in interfaceNode
-
getSchemaTypeInfo
- Specified by:
getSchemaTypeInfo
in interfaceElement
-
getDefaultStyleDeclaration
Description copied from interface:CSSStylableElement
Return the defaultCSSStyleDeclaration
of the native widget.- Specified by:
getDefaultStyleDeclaration
in interfaceCSSStylableElement
-
setDefaultStyleDeclaration
Description copied from interface:CSSStylableElement
Set the defaultCSSStyleDeclaration
of the native widget.- Specified by:
setDefaultStyleDeclaration
in interfaceCSSStylableElement
-
onStylesApplied
Description copied from interface:CSSStylableElement
Call-back method called when styles are applied to the all children nodes of the native widget- Specified by:
onStylesApplied
in interfaceCSSStylableElement
-
getElement
-
getStyle
Description copied from interface:CSSStylableElement
Return theCSSExtendedProperties
of the native widget.- Specified by:
getStyle
in interfaceCSSStylableElement
-
getStaticPseudoInstances
Description copied from interface:CSSStylableElement
Return all static pseudo instances. Static pseudo instance is used for widget which define method which can update property (Color, BackgroundColor) for a special state (without manage listener like focus). For instance SWT CTabFolder#setSelectionBackground (Color color) is method which set background Color when a CTabItem is selected.- Specified by:
getStaticPseudoInstances
in interfaceCSSStylableElement
-
isPseudoInstanceOf
Description copied from interface:CSSStylableElement
Return true ifs
is pseudo instance (ex :focus) and false otherwise.- Specified by:
isPseudoInstanceOf
in interfaceCSSStylableElement
-
initialize
public void initialize()Description copied from interface:CSSStylableElement
Method called after theCSSStylableElement
was linked to the native widget. You can add UI listener into this method.- Specified by:
initialize
in interfaceCSSStylableElement
-
dispose
public void dispose()Description copied from interface:CSSStylableElement
Method called whenCSSEngine.dispose()
is called. You can remove UI listener into this method.- Specified by:
dispose
in interfaceCSSStylableElement
-
doApplyStyles
protected void doApplyStyles()Apply styles for the native widget.
-