Class DefsElement

java.lang.Object
com.vaadin.flow.dom.Node<com.vaadin.flow.dom.Element>
com.vaadin.flow.dom.Element
org.vaadin.firitin.element.svg.SvgElement
org.vaadin.firitin.element.svg.DefsElement
All Implemented Interfaces:
Serializable

public class DefsElement extends SvgElement
A typed Java API for the SVG <defs> element.

The <defs> element is used to store graphical objects that will be used at a later time. Objects created inside a <defs> element are not rendered directly. To display them, you have to reference them using a <use> element or reference them from presentation attributes (e.g., as a gradient fill).

Common uses include:

  • Gradient definitions
  • Pattern definitions
  • Clip paths
  • Masks
  • Reusable symbols
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class SvgElement

    SvgElement.PreserveAspectRatio
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    add(SvgElement... definitions)
    Adds definition elements to this defs container.

    Methods inherited from class com.vaadin.flow.dom.Element

    addAttachListener, addDetachListener, addEventListener, addPropertyChangeListener, addPropertyChangeListener, as, attachShadow, bindAttribute, bindProperty, bindText, callJsFunction, callJsFunction, createText, executeJs, executeJs, get, get, getAttribute, getAttributeNames, getChild, getChildCount, getChildren, getClassList, getComponent, getParent, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyBean, getPropertyBean, getPropertyNames, getPropertyRaw, getSelf, getShadowRoot, getTag, getText, getTextRecursively, getThemeList, hasAttribute, hasProperty, isEnabled, isTextNode, isVisible, removeAttribute, removeFromParent, removeFromTree, removeFromTree, removeProperty, scrollIntoView, scrollIntoView, setAttribute, setAttribute, setAttribute, setEnabled, setProperty, setProperty, setProperty, setPropertyBean, setPropertyJson, setPropertyList, setPropertyMap, setText, setVisible, toString

    Methods inherited from class com.vaadin.flow.dom.Node

    accept, appendChild, appendChild, appendVirtualChild, appendVirtualChild, ensureChildHasParent, equals, getNode, getParentNode, getStateProvider, hashCode, indexOfChild, insertChild, insertChild, isVirtualChild, removeAllChildren, removeChild, removeChild, removeChild, removeVirtualChild, removeVirtualChild, setChild

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DefsElement

      public DefsElement()
  • Method Details

    • add

      public DefsElement add(SvgElement... definitions)
      Adds definition elements to this defs container.
      Parameters:
      definitions - the elements to add as definitions
      Returns:
      this element for method chaining