Package org.eclipse.e4.ui.css.core.dom
Interface CSSStylableElement
- All Known Implementing Classes:
ButtonElement
,ColorDefinitionElement
,CompositeElement
,ControlElement
,CTabFolderElement
,CTabItemElement
,EclipsePreferencesElement
,ElementAdapter
,FontDefinitionElement
,ItemElement
,LinkElement
,ScaleElement
,ShellElement
,SWTHTMLElement
,TableElement
,TableItemElement
,TextElement
,ThemeDefinitionElement
,ThemesExtensionElement
,ToolBarElement
,ToolItemElement
,TreeElement
,WidgetElement
CSS stylable element interface to wrap native widget.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copyDefaultStyleDeclarations
(CSSStylableElement stylableElement) Copy all default style declarations defined intostylableElement
.void
dispose()
Method called whenCSSEngine.dispose()
is called.Return the class of the native widget.getCSSId()
Return the id of the native widget.Return the inline style of the native widget.getDefaultStyleDeclaration
(String pseudoE) Return the defaultCSSStyleDeclaration
of the native widget.Return the native widget wrapped (SWT widget, Swing Component...)String[]
Return all static pseudo instances.getStyle()
Return theCSSExtendedProperties
of the native widget.void
Method called after theCSSStylableElement
was linked to the native widget.boolean
Return true ifs
is pseudo instance (ex :focus) and false otherwise.boolean
Return true ifs
is static pseudo instance (ex :CTabFolder:selected) and false otherwise.void
onStylesApplied
(NodeList nodes) Call-back method called when styles are applied to the all children nodes of the native widgetvoid
setDefaultStyleDeclaration
(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration) Set the defaultCSSStyleDeclaration
of the native widget.Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Method Details
-
getNativeWidget
Object getNativeWidget()Return the native widget wrapped (SWT widget, Swing Component...) -
getCSSId
String getCSSId()Return the id of the native widget. This method is used to manage CSS style like this input#MyId{....}. -
getCSSClass
String getCSSClass()Return the class of the native widget. This method is used to manage CSS style like this .blueClass {...}. -
getCSSStyle
String getCSSStyle()Return the inline style of the native widget. -
getDefaultStyleDeclaration
Return the defaultCSSStyleDeclaration
of the native widget. -
copyDefaultStyleDeclarations
Copy all default style declarations defined intostylableElement
. -
setDefaultStyleDeclaration
Set the defaultCSSStyleDeclaration
of the native widget. -
isPseudoInstanceOf
Return true ifs
is pseudo instance (ex :focus) and false otherwise. -
getStaticPseudoInstances
String[] getStaticPseudoInstances()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. -
isStaticPseudoInstance
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. -
onStylesApplied
Call-back method called when styles are applied to the all children nodes of the native widget -
getStyle
CSSExtendedProperties getStyle()Return theCSSExtendedProperties
of the native widget. -
initialize
void initialize()Method called after theCSSStylableElement
was linked to the native widget. You can add UI listener into this method. -
dispose
void dispose()Method called whenCSSEngine.dispose()
is called. You can remove UI listener into this method.
-