com.github.fluorumlabs.disconnect.vaadin.elements.GridTreeToggleElement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of disconnect-vaadin Show documentation
Show all versions of disconnect-vaadin Show documentation
Vaadin components bindings for Disconnect Zero
The newest version!
package com.github.fluorumlabs.disconnect.vaadin.elements;
import com.github.fluorumlabs.disconnect.core.annotations.Import;
import com.github.fluorumlabs.disconnect.core.annotations.NpmPackage;
import com.github.fluorumlabs.disconnect.vaadin.Vaadin;
import com.github.fluorumlabs.disconnect.vaadin.elements.mixins.ThemableMixin;
import js.web.dom.HTMLElement;
import org.teavm.jso.JSProperty;
/**
* <vaadin-grid-tree-toggle>
is a helper element for the <vaadin-grid>
* that provides toggle and level display functionality for the item tree.
*
* Example:
* <vaadin-grid-column>
* <template class="header">Package name</template>
* <template>
* <vaadin-grid-tree-toggle
* leaf="[[!item.hasChildren]]"
* expanded="{{expanded}}"
* level="[[level]]">
* [[item.name]]
* </vaadin-grid-tree-toggle>
* </template>
* </vaadin-grid-column>
*
* Styling
* The following shadow DOM parts are available for styling:
*
*
*
* Part name Description
*
*
* toggle
The tree toggle icon
*
*
* The following state attributes are available for styling:
*
*
*
* Attribute Description Part name
*
*
* expanded
When present, the toggle is expanded :host
* leaf
When present, the toggle is not expandable, i. e., the current item is a
* leaf :host
*
*
* The following custom CSS properties are available on
* the <vaadin-grid-tree-toggle>
element:
*
*
*
* Custom CSS property Description Default
*
*
* --vaadin-grid-tree-toggle-level-offset
Visual offset step for each tree
* sublevel 1em
*
*
*/
@NpmPackage(
name = "@vaadin/vaadin",
version = Vaadin.VERSION
)
@Import(
module = "@vaadin/vaadin-grid/theme/lumo/vaadin-grid-tree-toggle.js"
)
public interface GridTreeToggleElement extends HTMLElement, ThemableMixin {
static String TAGNAME() {
return "vaadin-grid-tree-toggle";
}
/**
* Current level of the tree represented with a horizontal offset
* of the toggle button.
*/
@JSProperty
double getLevel();
/**
* Current level of the tree represented with a horizontal offset
* of the toggle button.
*/
@JSProperty
void setLevel(double level);
/**
* Hides the toggle icon and disables toggling a tree sublevel.
*/
@JSProperty
boolean isLeaf();
/**
* Hides the toggle icon and disables toggling a tree sublevel.
*/
@JSProperty
void setLeaf(boolean leaf);
/**
* Sublevel toggle state.
*/
@JSProperty
boolean isExpanded();
/**
* Sublevel toggle state.
*/
@JSProperty
void setExpanded(boolean expanded);
}