All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fluorumlabs.disconnect.vaadin.elements.GridTreeToggleElement Maven / Gradle / Ivy

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 nameDescription
toggleThe tree toggle icon
* The following state attributes are available for styling: * * * * * * * * * *
AttributeDescriptionPart name
expandedWhen present, the toggle is expanded:host
leafWhen 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 propertyDescriptionDefault
--vaadin-grid-tree-toggle-level-offsetVisual offset step for each tree * sublevel1em
*/ @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); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy