Search in sources :

Example 6 with Range

use of com.google.gwt.view.client.Range in project blogwt by billy1380.

the class ResourceController method onRangeChanged.

/* (non-Javadoc)
	 * 
	 * @see
	 * com.google.gwt.view.client.AbstractDataProvider#onRangeChanged(com.google
	 * .gwt.view.client.HasData) */
@Override
protected void onRangeChanged(HasData<Resource> display) {
    Range range = display.getVisibleRange();
    pager.start(Integer.valueOf(range.getStart())).count(Integer.valueOf(range.getLength()));
    fetchResources();
}
Also used : Range(com.google.gwt.view.client.Range)

Example 7 with Range

use of com.google.gwt.view.client.Range in project blogwt by billy1380.

the class RoleController method onRangeChanged.

/* (non-Javadoc)
	 * 
	 * @see
	 * com.google.gwt.view.client.AbstractDataProvider#onRangeChanged(com.google
	 * .gwt.view.client.HasData) */
@Override
protected void onRangeChanged(HasData<Role> display) {
    Range range = display.getVisibleRange();
    pager.start(Integer.valueOf(range.getStart())).count(Integer.valueOf(range.getLength()));
    fetchRoles();
}
Also used : Range(com.google.gwt.view.client.Range)

Example 8 with Range

use of com.google.gwt.view.client.Range in project rstudio by rstudio.

the class HistoryPresenter method refreshHistory.

private void refreshHistory() {
    strategy_.refreshCount();
    view_.getDataDisplay().setVisibleRangeAndClearData(new Range(0, 100), true);
}
Also used : Range(com.google.gwt.view.client.Range)

Example 9 with Range

use of com.google.gwt.view.client.Range in project rstudio by rstudio.

the class Pager method setPageStart.

@Override
public void setPageStart(int index) {
    HasRows display = getDisplay();
    if (display != null) {
        Range range = display.getVisibleRange();
        int pageSize = range.getLength();
        index = Math.max(0, index);
        if (index != range.getStart()) {
            display.setVisibleRange(index, pageSize);
        }
    }
}
Also used : HasRows(com.google.gwt.view.client.HasRows) Range(com.google.gwt.view.client.Range)

Example 10 with Range

use of com.google.gwt.view.client.Range in project blogwt by billy1380.

the class MetaNotificationController method onRangeChanged.

/* (non-Javadoc)
	 * 
	 * @see
	 * com.google.gwt.view.client.AbstractDataProvider#onRangeChanged(com.google
	 * .gwt.view.client.HasData) */
@Override
protected void onRangeChanged(HasData<MetaNotification> display) {
    Range range = display.getVisibleRange();
    pager.start(Integer.valueOf(range.getStart())).count(Integer.valueOf(range.getLength()));
    fetchMetaNotifications();
}
Also used : Range(com.google.gwt.view.client.Range)

Aggregations

Range (com.google.gwt.view.client.Range)12 HasRows (com.google.gwt.view.client.HasRows)2 NumberFormat (com.google.gwt.i18n.client.NumberFormat)1 AbstractHasData (com.google.gwt.user.cellview.client.AbstractHasData)1 RpcObjectList (org.rstudio.core.client.jsonrpc.RpcObjectList)1 ServerError (org.rstudio.studio.client.server.ServerError)1