本文整理了Java中com.google.gwt.view.client.Range.<init>
方法的一些代码示例,展示了Range.<init>
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Range.<init>
方法的具体详情如下:
包路径:com.google.gwt.view.client.Range
类名称:Range
方法名:<init>
[英]Used by RPC.
[中]由RPC使用。
代码示例来源:origin: kaaproject/kaa
/**
* Updates endpoint profile data.
*/
public void update() {
reset();
dataGrid.getDataGrid().setVisibleRangeAndClearData(
new Range(0, dataGrid.getPageSize()), true);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Update the range of replaced data.
*
* @param start the start index
* @param end the end index
*/
public void replaceRange(int start, int end) {
replacedRanges.add(new Range(start, end - start));
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public final void setVisibleRange(int start, int length) {
setVisibleRange(new Range(start, length));
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public final void setVisibleRange(int start, int length) {
setVisibleRange(new Range(start, length));
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Return the range of data being displayed.
*/
@Override
public Range getVisibleRange() {
return new Range(getPageStart(), getPageSize());
}
代码示例来源:origin: com.google.gwt/gwt-servlet
if (rangeStart0 != -1) {
int rangeLength0 = rangeEnd0 - rangeStart0;
toRet.add(new Range(rangeStart0, rangeLength0));
toRet.add(new Range(rangeStart1, rangeLength1));
代码示例来源:origin: com.google.gwt/gwt-servlet
setRangeSelection(selectionModel, display, new Range(lastSelectedIndex,
start - lastSelectedIndex), !shiftAdditive, false);
} else if (lastSelectedIndex > end) {
setRangeSelection(selectionModel, display, new Range(end + 1,
lastSelectedIndex - end), !shiftAdditive, false);
} else {
setRangeSelection(selectionModel, display, new Range(start, end - start
+ 1), shiftAdditive, clearOthers);
} else {
代码示例来源:origin: com.google.gwt/gwt-servlet
setVisibleRange(new Range(newPageStart, newPageSize), false, false);
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Update the range of replaced data.
*
* @param start the start index
* @param end the end index
*/
public void replaceRange(int start, int end) {
replacedRanges.add(new Range(start, end - start));
}
}
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material-table
@Override
public void setVisibleRange(int start, int length) {
setVisibleRange(new Range(start, length));
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Return the range of data being displayed.
*/
@Override
public Range getVisibleRange() {
return new Range(getPageStart(), getPageSize());
}
代码示例来源:origin: org.dashbuilder/dashbuilder-renderer-default
@Test
public void testCurrentPageForNextPageWithTotalCount(){
final HasData display = mock(HasData.class);
when(table.getRowCount()).thenReturn(11);
when(display.getVisibleRange()).thenReturn(new Range(10, 10));
assertEquals(1, tableDisplayerView.tableProvider.getCurrentPageRows(display).size());
}
代码示例来源:origin: org.dashbuilder/dashbuilder-renderer-default
@Test
public void testCurrentPageForNextPageWithoutRows(){
final HasData display = mock(HasData.class);
when(table.getRowCount()).thenReturn(0);
when(display.getVisibleRange()).thenReturn(new Range(10, 10));
assertEquals(0, tableDisplayerView.tableProvider.getCurrentPageRows(display).size());
}
代码示例来源:origin: org.dashbuilder/dashbuilder-renderer-default
@Test
public void testCurrentPage(){
final HasData display = mock(HasData.class);
when(table.getRowCount()).thenReturn(5);
when(display.getVisibleRange()).thenReturn(new Range(0, 10));
assertEquals(5, tableDisplayerView.tableProvider.getCurrentPageRows(display).size());
}
}
代码示例来源:origin: kiegroup/appformer
@Test
public void testCurrentPageForNextPageWithoutRows(){
final HasData display = mock(HasData.class);
when(table.getRowCount()).thenReturn(0);
when(display.getVisibleRange()).thenReturn(new Range(10, 10));
assertEquals(0, tableDisplayerView.tableProvider.getCurrentPageRows(display).size());
}
代码示例来源:origin: kiegroup/jbpm-wb
@Test
public void testRefreshGrid() {
Range range = new Range(0,
5);
when(viewMock.getListGrid()).thenReturn(extendedPagedTable);
when(extendedPagedTable.getVisibleRange()).thenReturn(range);
testListPresenter.refreshGrid();
verify(extendedPagedTable).setVisibleRangeAndClearData(range,
true);
}
}
代码示例来源:origin: org.jbpm/jbpm-wb-common-client
@Test
public void testRefreshGrid() {
Range range = new Range(0,
5);
when(viewMock.getListGrid()).thenReturn(extendedPagedTable);
when(extendedPagedTable.getVisibleRange()).thenReturn(range);
testListPresenter.refreshGrid();
verify(extendedPagedTable).setVisibleRangeAndClearData(range,
true);
}
}
代码示例来源:origin: org.jbpm/jbpm-wb-common-client
@Before
public void setupMocks() {
testListPresenter = spy(AbstractScreenListPresenter.class);
when(testListPresenter.getListView()).thenReturn(viewMock);
when(viewMock.getListGrid()).thenReturn(extendedPagedTable);
when(next.getVisibleRange()).thenReturn(new Range(1,
1));
testListPresenter.initDataProvider();
testListPresenter.getDataProvider().addDataDisplay(next);
}
代码示例来源:origin: org.jbpm/jbpm-console-ng-executor-service-client
@Test
public void getDataTest() {
presenter.setAddingDefaultFilters(false);
presenter.getData(new Range(0, 5));
verify(dataSetQueryHelper).setLastSortOrder(SortOrder.ASCENDING);
verify(viewMock).hideBusyIndicator();
}
代码示例来源:origin: org.jbpm/jbpm-console-ng-process-runtime-client
@Test
public void domainSpecificColumnsWithPagination() {
presenter = new MyDataSetProcessInstanceWithVariablesListPresenter(viewMock, dataSetQueryHelperMock, dataSetQueryHelperDomainSpecificMock);
presenter.setDataSetQueryHelperMock(dataSetQueryHelperMock);
presenter.setFilterSettingsMock(filterSettingsMock);
presenter.setDataSetQueryHelperDomainSpecificMock(dataSetQueryHelperDomainSpecificMock);
//Get the first page of process instances selected
Range range = new Range(0, 10);
presenter.getData(range);
}
内容来源于网络,如有侵权,请联系作者删除!