Menu
pushmode.elements

Class FEFuncAElement

PushMode » API Reference » pushmode.elements

  • All Implemented Interfaces:
    Cloneable


    public final class FEFuncAElement
    extends AnySvgElement
    Element <feFuncA>.
    • Constructor Detail

      • FEFuncAElement

        public FEFuncAElement()
        Creates new empty <feFuncA> element.
      • FEFuncAElement

        public FEFuncAElement(FEFuncAElement other)
        Creates new <feFuncA> element as a deep mutable clone of another element.
        Parameters:
        other - Element to clone.
        Throws:
        NullPointerException - The parameter is null.
    • Method Detail

      • tagname

        public String tagname()
        Description copied from class: DomElement
        Element's tag name. This is lowercase tag name of the element, e.g. div. Tag name cannot be changed. It is determined by derived class, which overrides this method.
        Specified by:
        tagname in class DomElement
        Returns:
        Element's tag name.
      • clone

        public FEFuncAElement clone()
        Description copied from class: DomElement
        Creates mutable deep clone of this element. All child nodes are cloned recursively. The clone is completely independent of this element.
        Specified by:
        clone in class AnySvgElement
        Returns:
        Deep mutable clone.
      • key

        public FEFuncAElement key(Object key)
        Description copied from class: DomElement
        Sets element's pairing key. Any object implementing Object.equals(Object) and Object.hashCode() can be used as a key. Key, if set, must be unique among siblings in the DOM tree. Once set, the key is available from DomElement.key(). If the key is set to null, DomElement.key() will return DomElement.id().
        While DomElement.id() is sent to the browser, is a String, and it should be unique in the document, DomElement.key() is used only server-side, can be of any type, and it only needs to be unique among sibling elements.
        Key is used in hierarchical DOM diff to pair corresponding elements in cases where some DOM nodes have been inserted or removed from parent's child list. If DomElement.key() is null, DOM diff uses element position to pair elements in compared DOM trees, which might result in unnecessarily big diffs if an element is inserted at the beginning of a long list. Absence of key thus doesn't impact functionality, only performance. And even then it matters only if siblings are inserted or removed.
        Overrides:
        key in class AnySvgElement
        Parameters:
        key - New element key. Any object implementing Object.equals(Object) and Object.hashCode() can be used as a key. Key, if set, must be unique among siblings in the DOM tree. If this parameter is null, DomElement.key() will return DomElement.id().
        Returns:
        this
      • id

        public FEFuncAElement id(String id)
        Description copied from class: DomElement
        Sets element's ID. Element ID is serialized as an id attribute in HTML. It must therefore fulfill criteria for proper element ID in HTML, which most importantly means the ID should be unique in the document. Element ID has a special meaning in PushMode. Listeners require the element to have an ID. Listeners on ID-less elements are ignored. Once set, the ID is available from DomElement.id() method. ID is the default value of DomElement.key().
        Overrides:
        id in class AnySvgElement
        Parameters:
        id - New element ID.
        Returns:
        this
      • clazz

        public FEFuncAElement clazz(String clazz)
        Description copied from class: DomElement
        Sets class attribute. If the attribute is already set, this method appends new value to the old value separated by space.
        Overrides:
        clazz in class AnySvgElement
        Parameters:
        clazz - Text to set/append to the class attribute. This method has no effect if the parameter is null.
        Returns:
        this
      • data

        public FEFuncAElement data(String key,
                                   String value)
        Description copied from class: DomElement
        Sets data-* attribute.
        Overrides:
        data in class AnySvgElement
        Parameters:
        key - Name of the attribute if formed from its key and 'data-' prefix, e.g. key hello will set attribute data-hello. This method has no effect if the parameter is null.
        value - Text to write to the data-[key] attribute. This method has no effect if the parameter is null.
        Returns:
        this
      • style

        public FEFuncAElement style(String style)
        Description copied from class: DomElement
        Sets style attribute. If the attribute is already set, this method appends new value to the old value separated by semicolon.
        Overrides:
        style in class AnySvgElement
        Parameters:
        style - Text to set/append to the style attribute. This method has no effect if the parameter is null.
        Returns:
        this
      • add

        public <C extends DomContentFEFuncAElement add(C... children)
        Description copied from class: DomElement
        Adds all nodes in an array to this element.
        Overrides:
        add in class AnySvgElement
        Parameters:
        children - Array of child nodes to add. This method has no effect if the parameter is null. Array items that are null are skipped.
        Returns:
        this
        See Also:
        DomElement.add(DomContent)
      • text

        public FEFuncAElement text(String text)
        Description copied from class: DomElement
        Adds literal text to this element The text is first wrapped in DomText. If the text is null or empty, this method has no effect.
        Overrides:
        text in class AnySvgElement
        Parameters:
        text - Text to add. This method has no effect if the text is null or empty.
        Returns:
        this
        See Also:
        DomElement.add(DomContent)
      • freeze

        public FEFuncAElement freeze()
        Description copied from class: DomElement
        Creates frozen deep clone of this element. Mutating methods throw IllegalStateException when executed on frozen element. Frozen elements can be safely shared by all threads. Freezing is recursive. Frozen elements therefore cannot contain mutable nodes.
        Freezing applies several transformations to the cloned element, so that these transformations don't have to be performed repeatedly during rendering. All DomFragment descendants are recursively inlined into their respective parents, so that the frozen element contains no DomFragment descendants. Freezing the element causes all consecutive text nodes to be concatenated into single node. If the resulting text node is empty, it is removed. Listeners are discarded on this and descendant elements with null DomElement.id(). All internal arrays are compacted, so that the frozen DOM tree takes up minimum amount of memory. None of these transformations modifies the original element in any way.
        Overrides:
        freeze in class AnySvgElement
        Returns:
        Deep frozen clone. Returns this if this element is already frozen.