本文整理了Java中com.vaadin.ui.Grid.addColumnReorderListener()
方法的一些代码示例,展示了Grid.addColumnReorderListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grid.addColumnReorderListener()
方法的具体详情如下:
包路径:com.vaadin.ui.Grid
类名称:Grid
方法名:addColumnReorderListener
[英]Registers a new column reorder listener.
[中]注册新的列重新排序侦听器。
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin
/**
* Adds a {@link PropertyReorderListener} that gets notified when property columns order changes.
* @param listener Listener to add (not null)
* @return the listener registration
*/
public Registration addPropertyReorderListener(final PropertyReorderListener<P> listener) {
ObjectUtils.argumentNotNull(listener, "Listener must be not null");
return getGrid().addColumnReorderListener(
e -> listener.onPropertyReordered(getPropertyColumns(), e.isUserOriginated()));
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
protected void initComponent(Grid<E> component) {
setSelectionMode(SelectionMode.SINGLE);
component.setColumnReorderingAllowed(true);
component.addItemClickListener(this::onItemClick);
component.addColumnReorderListener(this::onColumnReorder);
component.addSortListener(this::onSort);
component.setSizeUndefined();
component.setHeightMode(HeightMode.UNDEFINED);
component.setStyleGenerator(this::getGeneratedRowStyle);
//noinspection unchecked
((CubaEnhancedGrid<E>) component).setCubaEditorFieldFactory(createEditorFieldFactory());
}
代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin
/**
* Adds a {@link PropertyReorderListener} that gets notified when property columns order changes.
* @param listener Listener to add (not null)
*/
public void addPropertyReorderListener(final PropertyReorderListener<P> listener) {
ObjectUtils.argumentNotNull(listener, "Listener must be not null");
switch (getRenderingMode()) {
case GRID:
getGrid().addColumnReorderListener(
e -> listener.onPropertyReordered(getPropertyColumns(), e.isUserOriginated()));
break;
case TABLE:
getTable().addColumnReorderListener(e -> listener.onPropertyReordered(getPropertyColumns(), true));
break;
default:
break;
}
}
内容来源于网络,如有侵权,请联系作者删除!