Interface AuthorPseudoClassController

All Known Subinterfaces:
AuthorDocumentController

@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface AuthorPseudoClassController
Controls setting and resetting pseudo classes.
Since:
23
  • Method Details

    • setPseudoClass

      void setPseudoClass(String pseudoClass, AuthorElement element)

      Sets a pseudo class in the specified element.

      This change *IS NOT* subject to undo/redo.

      What is good for: You can use a non standard (custom) pseudo class to impose a style change on a specific element. For instance you can have CSS styles matching a custom pseudo-class, like the one below:

         section:access-control-user {
            display:block;
         } 
         section {
            display:none;
         } 
       

      By setting the pseudoClass "access-control-user", the element section will become visible.

      Another example:

         *:caret-visited {
            color:red;
         } 
       
      You could create an AuthorCaretListener that sets the caret-visited pseudo class to the element at the caret location. The effect will be that all the elements traversed by the caret become red.

      Parameters:
      pseudoClass - Name of the pseudo class being set.
      element - The AuthorElement whose attribute is changing.
      Since:
      15.2
    • removePseudoClass

      void removePseudoClass(String pseudoClass, AuthorElement element)
      Removes a pseudo class from the given element. This change *IS NOT* subject to undo/redo.
      Parameters:
      pseudoClass - Name of the pseudo class being set.
      element - The AuthorElement whose attribute will be removed.
      Since:
      15.2