Interface ITreerow

All Superinterfaces:
IChildable<ITreerow,ITreecell<IAnyGroup>>, IComponent<ITreerow>, IHtmlBasedComponent<ITreerow>, ITreeitemComposite<ITreerow>, IXulElement<ITreerow>

Immutable Treerow component
Author:
jumperchen
See Also:
  • Treerow
  • Field Details

    • DEFAULT

      static final ITreerow DEFAULT
      Constant for default attributes of this immutable component.
  • Method Details

    • getWidgetClass

      default String getWidgetClass()
      Returns the client widget class.

      Default: "zul.sel.Treerow"

      Specified by:
      getWidgetClass in interface IComponent<ITreerow>
    • getImage

      @Nullable default String getImage()
      Returns the image of the first ITreecell it contains, or null if no such treecell.
    • withImage

      ITreerow withImage(@Nullable String image)
      Returns a copy of this immutable component with the specified image.

      Sets the image of the first ITreecell it contains.

      Note: if no any treecell exists, this method creates one automatically.

      Parameters:
      image - The image of the first ITreecell it contains.

      Default: null.

      Returns:
      A modified copy of the this object
    • getLabel

      @Nullable default String getLabel()
      Returns the label of the first ITreecell it contains, or null if no such treecell.
    • withLabel

      ITreerow withLabel(@Nullable String label)
      Returns a copy of this immutable component with the specified label.

      Sets the label of the first ITreecell it contains.

      Note: if no any treecell exists, this method creates one automatically.

      Parameters:
      label - The label of the first ITreecell it contains.

      Default: null.

      Returns:
      A modified copy of the this object
    • of

      static ITreerow of(String label)
      Returns the instance with a ITreecell holding the given label.
      Parameters:
      label - The label of the first ITreecell
    • of

      static ITreerow of(String label, String image)
      Returns the instance with a ITreecell holding the given label and image.
      Parameters:
      label - The label of the first ITreecell
      image - The image of the first ITreecell
    • of

      static ITreerow of(ITreecell<IAnyGroup>... children)
      Returns the instance with the given treecells.
      Parameters:
      children - The tree cells of the component
    • of

      static ITreerow of(Iterable<? extends ITreecell<IAnyGroup>> children)
      Returns the instance with the given treecells.
      Parameters:
      children - The tree cells of the component
    • ofImage

      static ITreerow ofImage(String image)
      Returns the instance with a ITreecell holding the given image.
      Parameters:
      image - The image of the first ITreecell