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
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStaticPseudoInstance(String pseudoE) Add static pseudo instanceappendChild(Node newChild) cloneNode(boolean arg0) shortcompareDocumentPosition(Node other) voidcopyDefaultStyleDeclarations(CSSStylableElement stylableElement) Copy all default style declarations defined intostylableElement.voiddispose()Method called whenCSSEngine.dispose()is called.protected voidApply styles for the native widget.abstract StringgetAttribute(String arg0) getAttributeNode(String arg0) getAttributeNodeNS(String arg0, String arg1) getAttributeNS(String namespace, String attr) getDefaultStyleDeclaration(String pseudoE) Return the defaultCSSStyleDeclarationof the native widget.protected ElementgetElement(Object widget) getElementsByTagName(String arg0) getElementsByTagNameNS(String arg0, String arg1) getFeature(String feature, String version) abstract StringReturn the native widget wrapped (SWT widget, Swing Component...)shortString[]Return all static pseudo instances.getStyle()Return theCSSExtendedPropertiesof the native widget.getUserData(String key) booleanhasAttribute(String arg0) booleanhasAttributeNS(String namespace, String attr) booleanbooleanvoidMethod called after theCSSStylableElementwas linked to the native widget.insertBefore(Node newChild, Node refChild) booleanisDefaultNamespace(String namespaceURI) booleanisEqualNode(Node arg) booleanReturn true ifsis pseudo instance (ex :focus) and false otherwise.booleanisSameNode(Node other) booleanReturn true ifsis static pseudo instance (ex :CTabFolder:selected) and false otherwise.booleanisSupported(String arg0, String arg1) lookupNamespaceURI(String prefix) lookupPrefix(String namespaceURI) voidvoidonStylesApplied(NodeList nodes) Call-back method called when styles are applied to the all children nodes of the native widgetvoidremoveAttribute(String arg0) removeAttributeNode(Attr arg0) voidremoveAttributeNS(String arg0, String arg1) removeChild(Node arg0) replaceChild(Node arg0, Node arg1) voidsetAttribute(String arg0, String arg1) setAttributeNode(Attr arg0) setAttributeNodeNS(Attr arg0) voidsetAttributeNS(String arg0, String arg1, String arg2) voidsetDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration declaration) Set the defaultCSSStyleDeclarationof the native widget.voidsetIdAttribute(String name, boolean isId) voidsetIdAttributeNode(Attr idAttr, boolean isId) voidsetIdAttributeNS(String namespaceURI, String localName, boolean isId) voidsetNodeValue(String arg0) voidvoidsetTextContent(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, waitMethods inherited from interface org.eclipse.e4.ui.css.core.dom.CSSStylableElement
getCSSClass, getCSSId, getCSSStyleMethods 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:CSSStylableElementReturn true ifsis 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:
isStaticPseudoInstancein interfaceCSSStylableElement
-
copyDefaultStyleDeclarations
Description copied from interface:CSSStylableElementCopy all default style declarations defined intostylableElement.- Specified by:
copyDefaultStyleDeclarationsin interfaceCSSStylableElement
-
getLocalName
- Specified by:
getLocalNamein interfaceNode
-
getAttribute
- Specified by:
getAttributein interfaceElement
-
getAttributeNS
- Specified by:
getAttributeNSin interfaceElement- Throws:
DOMException
-
getAttributeNode
- Specified by:
getAttributeNodein interfaceElement
-
getAttributeNodeNS
- Specified by:
getAttributeNodeNSin interfaceElement- Throws:
DOMException
-
getElementsByTagName
- Specified by:
getElementsByTagNamein interfaceElement
-
getElementsByTagNameNS
- Specified by:
getElementsByTagNameNSin interfaceElement- Throws:
DOMException
-
hasAttribute
- Specified by:
hasAttributein interfaceElement
-
hasAttributeNS
- Specified by:
hasAttributeNSin interfaceElement- Throws:
DOMException
-
removeAttribute
- Specified by:
removeAttributein interfaceElement- Throws:
DOMException
-
removeAttributeNS
- Specified by:
removeAttributeNSin interfaceElement- Throws:
DOMException
-
removeAttributeNode
- Specified by:
removeAttributeNodein interfaceElement- Throws:
DOMException
-
setAttribute
- Specified by:
setAttributein interfaceElement- Throws:
DOMException
-
setAttributeNS
- Specified by:
setAttributeNSin interfaceElement- Throws:
DOMException
-
setAttributeNode
- Specified by:
setAttributeNodein interfaceElement- Throws:
DOMException
-
setAttributeNodeNS
- Specified by:
setAttributeNodeNSin interfaceElement- Throws:
DOMException
-
appendChild
- Specified by:
appendChildin interfaceNode- Throws:
DOMException
-
cloneNode
-
getAttributes
- Specified by:
getAttributesin interfaceNode
-
getFirstChild
- Specified by:
getFirstChildin interfaceNode
-
getLastChild
- Specified by:
getLastChildin interfaceNode
-
getTagName
- Specified by:
getTagNamein interfaceElement
-
getNextSibling
- Specified by:
getNextSiblingin interfaceNode
-
getNodeName
- Specified by:
getNodeNamein interfaceNode
-
getNodeType
public short getNodeType()- Specified by:
getNodeTypein interfaceNode
-
getNodeValue
- Specified by:
getNodeValuein interfaceNode- Throws:
DOMException
-
getOwnerDocument
- Specified by:
getOwnerDocumentin interfaceNode
-
getPrefix
-
getPreviousSibling
- Specified by:
getPreviousSiblingin interfaceNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributesin interfaceNode
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodesin interfaceNode
-
insertBefore
- Specified by:
insertBeforein interfaceNode- Throws:
DOMException
-
isSupported
- Specified by:
isSupportedin interfaceNode
-
normalize
public void normalize() -
removeChild
- Specified by:
removeChildin interfaceNode- Throws:
DOMException
-
replaceChild
- Specified by:
replaceChildin interfaceNode- Throws:
DOMException
-
setNodeValue
- Specified by:
setNodeValuein interfaceNode- Throws:
DOMException
-
setPrefix
- Specified by:
setPrefixin interfaceNode- Throws:
DOMException
-
setIdAttribute
- Specified by:
setIdAttributein interfaceElement- Throws:
DOMException
-
setIdAttributeNS
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException - Specified by:
setIdAttributeNSin interfaceElement- Throws:
DOMException
-
setIdAttributeNode
- Specified by:
setIdAttributeNodein interfaceElement- Throws:
DOMException
-
compareDocumentPosition
- Specified by:
compareDocumentPositionin interfaceNode- Throws:
DOMException
-
getBaseURI
- Specified by:
getBaseURIin interfaceNode
-
getFeature
- Specified by:
getFeaturein interfaceNode
-
getTextContent
- Specified by:
getTextContentin interfaceNode- Throws:
DOMException
-
getUserData
- Specified by:
getUserDatain interfaceNode
-
isDefaultNamespace
- Specified by:
isDefaultNamespacein interfaceNode
-
isEqualNode
- Specified by:
isEqualNodein interfaceNode
-
isSameNode
- Specified by:
isSameNodein interfaceNode
-
lookupNamespaceURI
- Specified by:
lookupNamespaceURIin interfaceNode
-
lookupPrefix
- Specified by:
lookupPrefixin interfaceNode
-
setTextContent
- Specified by:
setTextContentin interfaceNode- Throws:
DOMException
-
getNativeWidget
Description copied from interface:CSSStylableElementReturn the native widget wrapped (SWT widget, Swing Component...)- Specified by:
getNativeWidgetin interfaceCSSStylableElement
-
setUserData
- Specified by:
setUserDatain interfaceNode
-
getSchemaTypeInfo
- Specified by:
getSchemaTypeInfoin interfaceElement
-
getDefaultStyleDeclaration
Description copied from interface:CSSStylableElementReturn the defaultCSSStyleDeclarationof the native widget.- Specified by:
getDefaultStyleDeclarationin interfaceCSSStylableElement
-
setDefaultStyleDeclaration
Description copied from interface:CSSStylableElementSet the defaultCSSStyleDeclarationof the native widget.- Specified by:
setDefaultStyleDeclarationin interfaceCSSStylableElement
-
onStylesApplied
Description copied from interface:CSSStylableElementCall-back method called when styles are applied to the all children nodes of the native widget- Specified by:
onStylesAppliedin interfaceCSSStylableElement
-
getElement
-
getStyle
Description copied from interface:CSSStylableElementReturn theCSSExtendedPropertiesof the native widget.- Specified by:
getStylein interfaceCSSStylableElement
-
getStaticPseudoInstances
Description copied from interface:CSSStylableElementReturn 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:
getStaticPseudoInstancesin interfaceCSSStylableElement
-
isPseudoInstanceOf
Description copied from interface:CSSStylableElementReturn true ifsis pseudo instance (ex :focus) and false otherwise.- Specified by:
isPseudoInstanceOfin interfaceCSSStylableElement
-
initialize
public void initialize()Description copied from interface:CSSStylableElementMethod called after theCSSStylableElementwas linked to the native widget. You can add UI listener into this method.- Specified by:
initializein interfaceCSSStylableElement
-
dispose
public void dispose()Description copied from interface:CSSStylableElementMethod called whenCSSEngine.dispose()is called. You can remove UI listener into this method.- Specified by:
disposein interfaceCSSStylableElement
-
doApplyStyles
protected void doApplyStyles()Apply styles for the native widget.
-