Interface CSSStylableElement

All Superinterfaces:
Element, Node
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

public interface CSSStylableElement extends Element
CSS stylable element interface to wrap native widget.
  • 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

      CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE)
      Return the default CSSStyleDeclaration of the native widget.
    • copyDefaultStyleDeclarations

      void copyDefaultStyleDeclarations(CSSStylableElement stylableElement)
      Copy all default style declarations defined into stylableElement.
    • setDefaultStyleDeclaration

      void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration defaultStyleDeclaration)
      Set the default CSSStyleDeclaration of the native widget.
    • isPseudoInstanceOf

      boolean isPseudoInstanceOf(String s)
      Return true if s 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

      boolean isStaticPseudoInstance(String s)
      Return true if s 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

      void onStylesApplied(NodeList nodes)
      Call-back method called when styles are applied to the all children nodes of the native widget
    • getStyle

      Return the CSSExtendedProperties of the native widget.
    • initialize

      void initialize()
      Method called after the CSSStylableElement was linked to the native widget. You can add UI listener into this method.
    • dispose

      void dispose()
      Method called when CSSEngine.dispose() is called. You can remove UI listener into this method.