com.github.fluorumlabs.disconnect.vaadin.mixins.HasSelectionMixin 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.mixins;
import com.github.fluorumlabs.disconnect.vaadin.elements.mixins.SelectionMixin;
import com.github.fluorumlabs.disconnect.zero.component.Component;
import js.lang.Any;
import js.util.collections.Array;
import javax.annotation.Nullable;
public interface HasSelectionMixin- , T extends Component
>
extends Component {
/**
* An array that contains the selected items.
*/
@Nullable
default Array- selectedItems() {
return getNode().getSelectedItems();
}
/**
* An array that contains the selected items.
*/
default T selectedItems(ITEM... selectedItems) {
getNode().setSelectedItems(selectedItems);
return (T) this;
}
default T selectedItems(Array
- selectedItems) {
getNode().setSelectedItems(selectedItems);
return (T) this;
}
/**
* Selects the given item.
*
* @param item The item object
*/
default void selectItem(ITEM item) {
getNode().selectItem(item);
}
/**
* Deselects the given item if it is already selected.
*
* @param item The item object
*/
default void deselectItem(ITEM item) {
getNode().deselectItem(item);
}
}