com.github.fluorumlabs.disconnect.vaadin.CrudGrid Maven / Gradle / Ivy
Show all versions of disconnect-vaadin Show documentation
package com.github.fluorumlabs.disconnect.vaadin;
import com.github.fluorumlabs.disconnect.core.annotations.WebComponent;
import com.github.fluorumlabs.disconnect.vaadin.elements.CrudGridElement;
import com.github.fluorumlabs.disconnect.vaadin.mixins.*;
import com.github.fluorumlabs.disconnect.zero.component.*;
import js.lang.Any;
/**
* <vaadin-crud-grid>
is a <vaadin-grid>
which automatically configures all its
* columns based
* on the JSON structure of the first item received.
*
* You cannot manually configure columns but you can still style the grid as it's described in
* <vaadin-grid>
* Documentation
*/
@WebComponent
public class CrudGrid- extends AbstractComponent
>
implements HasIncludedMixin, CrudGrid- >,
HasThemableMixin
, CrudGrid- >,
HasA11yMixin
, CrudGrid- >,
HasActiveItemMixin
- , CrudGrid
- >,
HasArrayDataProviderMixin
- , CrudGrid
- >,
HasColumnResizingMixin
- , CrudGrid
- >,
HasDataProviderMixin
- , CrudGrid
- >,
HasDynamicColumnsMixin
, CrudGrid- >,
HasFilterMixin
, CrudGrid- >,
HasRowDetailsMixin
- , CrudGrid
- >,
HasScrollMixin
, CrudGrid- >,
HasSelectionMixin
- , CrudGrid
- >,
HasSortMixin
, CrudGrid- >,
HasKeyboardNavigationMixin
, CrudGrid- >,
HasColumnReorderingMixin
- , CrudGrid
- >,
HasEventContextMixin
- , CrudGrid
- >,
HasStylingMixin
- , CrudGrid
- >,
HasDragAndDropMixin
- , CrudGrid
- >,
HasSlots
>,
HasStyle, CrudGrid- >, HasComponents
, CrudGrid- , Component>> {
public CrudGrid() {
super(CrudGridElement.TAGNAME());
}
/**
* Disable filtering in the generated columns.
*/
public boolean noFilter() {
return getNode().isNoFilter();
}
/**
* Disable filtering in the generated columns.
*/
public CrudGrid
- noFilter(boolean noFilter) {
getNode().setNoFilter(noFilter);
return this;
}
/**
* Disable sorting in the generated columns.
*/
public boolean noSort() {
return getNode().isNoSort();
}
/**
* Disable sorting in the generated columns.
*/
public CrudGrid
- noSort(boolean noSort) {
getNode().setNoSort(noSort);
return this;
}
/**
* Do not add headers to columns.
*/
public boolean noHead() {
return getNode().isNoHead();
}
/**
* Do not add headers to columns.
*/
public CrudGrid
- noHead(boolean noHead) {
getNode().setNoHead(noHead);
return this;
}
/**
* If true, the grid's height is defined by the number of its rows.
*/
public boolean heightByRows() {
return getNode().isHeightByRows();
}
/**
* If true, the grid's height is defined by the number of its rows.
*/
public CrudGrid
- heightByRows(boolean heightByRows) {
getNode().setHeightByRows(heightByRows);
return this;
}
/**
* Updates the
width
of all columns which have autoWidth
set to true
.
*/
public void recalculateColumnWidths() {
getNode().recalculateColumnWidths();
}
/**
* Manually invoke existing renderers for all the columns
* (header, footer and body cells) and opened row details.
*/
public void render() {
getNode().render();
}
/**
* Updates the computed metrics and positioning of internal grid parts
* (row/details cell positioning etc). Needs to be invoked whenever the sizing of grid
* content changes asynchronously to ensure consistent appearance (e.g. when a
* contained image whose bounds aren't known beforehand finishes loading).
*/
public void notifyResize() {
getNode().notifyResize();
}
public HasSlots.Container nodistributeSlot() {
return slotted("nodistribute");
}
}