本文整理了Java中com.vaadin.ui.Grid.addColumnResizeListener()
方法的一些代码示例,展示了Grid.addColumnResizeListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grid.addColumnResizeListener()
方法的具体详情如下:
包路径:com.vaadin.ui.Grid
类名称:Grid
方法名:addColumnResizeListener
[英]Registers a new column resize listener.
[中]注册一个新的列调整侦听器。
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public Subscription addColumnResizeListener(Consumer<ColumnResizeEvent> listener) {
if (columnResizeListenerRegistration == null) {
columnResizeListenerRegistration =
component.addColumnResizeListener(this::onColumnResize);
}
getEventHub().subscribe(ColumnResizeEvent.class, listener);
return () -> removeColumnResizeListener(listener);
}
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin
/**
* Adds a {@link PropertyResizeListener} that gets notified when a property column is resized.
* @param listener Listener to add (not null)
* @return the listener registration
*/
public Registration addPropertyResizeListener(final PropertyResizeListener<P> listener) {
ObjectUtils.argumentNotNull(listener, "Listener must be not null");
return getGrid()
.addColumnResizeListener(e -> listener.onPropertyResized(getColumnProperty(e.getColumn().getId()),
(int) e.getColumn().getWidth(), e.isUserOriginated()));
}
代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin
/**
* Adds a {@link PropertyResizeListener} that gets notified when a property column is resized.
* @param listener Listener to add (not null)
*/
@SuppressWarnings("unchecked")
public void addPropertyResizeListener(final PropertyResizeListener<P> listener) {
ObjectUtils.argumentNotNull(listener, "Listener must be not null");
switch (getRenderingMode()) {
case GRID:
getGrid().addColumnResizeListener(e -> listener.onPropertyResized((P) e.getColumn().getPropertyId(),
(int) e.getColumn().getWidth(), e.isUserOriginated()));
break;
case TABLE:
getTable().addColumnResizeListener(
e -> listener.onPropertyResized((P) e.getPropertyId(), e.getCurrentWidth(), true));
break;
default:
break;
}
}
内容来源于网络,如有侵权,请联系作者删除!