本文整理了Java中com.vaadin.ui.Grid.scrollTo()
方法的一些代码示例,展示了Grid.scrollTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grid.scrollTo()
方法的具体详情如下:
包路径:com.vaadin.ui.Grid
类名称:Grid
方法名:scrollTo
[英]Scrolls to a certain item, using ScrollDestination#ANY.
If the item has an open details row, its size will also be taken into account.
[中]使用ScrollDestination#ANY滚动到某个项目。
如果项目有一个“打开的详细信息”行,则还将考虑其大小。
代码示例来源:origin: com.vaadin/vaadin-server
/**
* Scrolls to a certain item, using {@link ScrollDestination#ANY}.
* <p>
* If the item has an open details row, its size will also be taken into
* account.
*
* @param row
* zero based index of the item to scroll to in the current view.
* @throws IllegalArgumentException
* if the provided row is outside the item range
*/
public void scrollTo(int row) throws IllegalArgumentException {
scrollTo(row, ScrollDestination.ANY);
}
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin
@Override
public void scrollToIndex(int index) {
getGrid().scrollTo(index);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void onUploadStarted(final FileUploadProgress fileUploadProgress) {
updateUploadProgressInfoRowObject(fileUploadProgress);
if (isWindowNotAlreadyAttached()) {
maximizeWindow();
}
grid.scrollTo(fileUploadProgress.getFileUploadId());
}
代码示例来源:origin: eclipse/hawkbit
private void onUploadStarted(final FileUploadProgress fileUploadProgress) {
updateUploadProgressInfoRowObject(fileUploadProgress);
if (isWindowNotAlreadyAttached()) {
maximizeWindow();
}
grid.scrollTo(fileUploadProgress.getFileUploadId());
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void scrollTo(E item, ScrollDestination destination) {
Preconditions.checkNotNullArgument(item);
Preconditions.checkNotNullArgument(destination);
DataGridItems<E> dataGridItems = getDataGridItemsNN();
if (!dataGridItems.containsItem(item)) {
throw new IllegalArgumentException("Unable to find item in DataGrid");
}
int rowIndex = dataGridItems.indexOfItem(item);
component.scrollTo(rowIndex, WebWrapperUtils.convertToGridScrollDestination(destination));
}
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin
@Override
public void scrollToItem(T item) {
if (!isBuffered()) {
throw new NotBufferedException("The item listing is not in buffered mode");
}
int index = requireDataSource().indexOfItem(item);
if (index > -1) {
getGrid().scrollTo(index);
}
}
代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin
@Override
public void scrollToItem(T item) {
ObjectUtils.argumentNotNull(item, "Item must be not null");
switch (getRenderingMode()) {
case GRID: {
Object id = requireDataSource().getId(item);
if (id != null) {
getGrid().scrollTo(id);
}
}
break;
case TABLE: {
Object id = requireDataSource().getId(item);
if (id != null) {
getTable().setCurrentPageFirstItemId(id);
}
}
break;
default:
break;
}
}
内容来源于网络,如有侵权,请联系作者删除!