Codota Logo
HasRows.setVisibleRange
Code IndexAdd Codota to your IDE (free)

How to use
setVisibleRange
method
in
com.google.gwt.view.client.HasRows

Best Java code snippets using com.google.gwt.view.client.HasRows.setVisibleRange (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: kaaproject/kaa

 @Override
 public void setPageStart(int index) {
  if (getDisplay() != null) {
   Range range = getDisplay().getVisibleRange();
   int pageSize = range.getLength();
   index = Math.max(0, index);
   if (index != range.getStart()) {
    getDisplay().setVisibleRange(index, pageSize);
   }
  }
 }
};
origin: com.google.gwt/gwt-servlet

 public void onClick(ClickEvent event) {
  // Display should be non-null, but we check defensively.
  HasRows display = getDisplay();
  if (display != null) {
   Range range = display.getVisibleRange();
   int pageSize = Math.max(range.getLength() - increment, increment);
   display.setVisibleRange(range.getStart(), pageSize);
  }
 }
});
origin: com.google.gwt/gwt-servlet

/**
 * Set the page size of the display.
 *
 * @param pageSize the new page size
 * @see #getPageSize()
 */
protected void setPageSize(int pageSize) {
 if (display != null) {
  Range range = display.getVisibleRange();
  int pageStart = range.getStart();
  if (isRangeLimited && display.isRowCountExact()) {
   pageStart = Math.min(pageStart, display.getRowCount() - pageSize);
  }
  pageStart = Math.max(0, pageStart);
  display.setVisibleRange(pageStart, pageSize);
 }
}
origin: com.google.gwt/gwt-servlet

/**
 * Go to a specific page.
 *
 * @param index the page index
 * @see #getPage()
 */
protected void setPage(int index) {
 if (display != null
   && (!isRangeLimited || !display.isRowCountExact() || hasPage(index))) {
  // We don't use the local version of setPageStart because it would
  // constrain the index, but the user probably wants to use absolute page
  // indexes.
  int pageSize = getPageSize();
  display.setVisibleRange(pageSize * index, pageSize);
 }
}
origin: com.google.gwt/gwt-servlet

/**
 * Set the page start index.
 *
 * @param index the index
 * @see #getPageStart()
 */
protected void setPageStart(int index) {
 if (display != null) {
  Range range = display.getVisibleRange();
  int pageSize = range.getLength();
  if (isRangeLimited && display.isRowCountExact()) {
   index = Math.min(index, display.getRowCount() - pageSize);
  }
  index = Math.max(0, index);
  if (index != range.getStart()) {
   display.setVisibleRange(index, pageSize);
  }
 }
}
origin: com.google.gwt/gwt-servlet

 public void onClick(ClickEvent event) {
  // Display should be non-null, but we check defensively.
  HasRows display = getDisplay();
  if (display != null) {
   Range range = display.getVisibleRange();
   int pageSize = Math.min(range.getLength() + increment,
     display.getRowCount()
       + (display.isRowCountExact() ? 0 : increment));
   display.setVisibleRange(range.getStart(), pageSize);
  }
 }
});
origin: com.vaadin.external.gwt/gwt-user

 public void onClick(ClickEvent event) {
  // Display should be non-null, but we check defensively.
  HasRows display = getDisplay();
  if (display != null) {
   Range range = display.getVisibleRange();
   int pageSize = Math.max(range.getLength() - increment, increment);
   display.setVisibleRange(range.getStart(), pageSize);
  }
 }
});
origin: net.wetheinter/gwt-user

 public void onClick(ClickEvent event) {
  // Display should be non-null, but we check defensively.
  HasRows display = getDisplay();
  if (display != null) {
   Range range = display.getVisibleRange();
   int pageSize = Math.max(range.getLength() - increment, increment);
   display.setVisibleRange(range.getStart(), pageSize);
  }
 }
});
origin: com.vaadin.external.gwt/gwt-user

/**
 * Set the page size of the display.
 *
 * @param pageSize the new page size
 * @see #getPageSize()
 */
protected void setPageSize(int pageSize) {
 if (display != null) {
  Range range = display.getVisibleRange();
  int pageStart = range.getStart();
  if (isRangeLimited && display.isRowCountExact()) {
   pageStart = Math.min(pageStart, display.getRowCount() - pageSize);
  }
  pageStart = Math.max(0, pageStart);
  display.setVisibleRange(pageStart, pageSize);
 }
}
origin: net.wetheinter/gwt-user

/**
 * Set the page size of the display.
 *
 * @param pageSize the new page size
 * @see #getPageSize()
 */
protected void setPageSize(int pageSize) {
 if (display != null) {
  Range range = display.getVisibleRange();
  int pageStart = range.getStart();
  if (isRangeLimited && display.isRowCountExact()) {
   pageStart = Math.min(pageStart, display.getRowCount() - pageSize);
  }
  pageStart = Math.max(0, pageStart);
  display.setVisibleRange(pageStart, pageSize);
 }
}
origin: com.vaadin.external.gwt/gwt-user

/**
 * Set the page start index.
 *
 * @param index the index
 * @see #getPageStart()
 */
protected void setPageStart(int index) {
 if (display != null) {
  Range range = display.getVisibleRange();
  int pageSize = range.getLength();
  if (isRangeLimited && display.isRowCountExact()) {
   index = Math.min(index, display.getRowCount() - pageSize);
  }
  index = Math.max(0, index);
  if (index != range.getStart()) {
   display.setVisibleRange(index, pageSize);
  }
 }
}
origin: net.wetheinter/gwt-user

/**
 * Go to a specific page.
 *
 * @param index the page index
 * @see #getPage()
 */
protected void setPage(int index) {
 if (display != null
   && (!isRangeLimited || !display.isRowCountExact() || hasPage(index))) {
  // We don't use the local version of setPageStart because it would
  // constrain the index, but the user probably wants to use absolute page
  // indexes.
  int pageSize = getPageSize();
  display.setVisibleRange(pageSize * index, pageSize);
 }
}
origin: com.vaadin.external.gwt/gwt-user

/**
 * Go to a specific page.
 *
 * @param index the page index
 * @see #getPage()
 */
protected void setPage(int index) {
 if (display != null
   && (!isRangeLimited || !display.isRowCountExact() || hasPage(index))) {
  // We don't use the local version of setPageStart because it would
  // constrain the index, but the user probably wants to use absolute page
  // indexes.
  int pageSize = getPageSize();
  display.setVisibleRange(pageSize * index, pageSize);
 }
}
origin: net.wetheinter/gwt-user

/**
 * Set the page start index.
 *
 * @param index the index
 * @see #getPageStart()
 */
protected void setPageStart(int index) {
 if (display != null) {
  Range range = display.getVisibleRange();
  int pageSize = range.getLength();
  if (isRangeLimited && display.isRowCountExact()) {
   index = Math.min(index, display.getRowCount() - pageSize);
  }
  index = Math.max(0, index);
  if (index != range.getStart()) {
   display.setVisibleRange(index, pageSize);
  }
 }
}
origin: com.vaadin.external.gwt/gwt-user

 public void onClick(ClickEvent event) {
  // Display should be non-null, but we check defensively.
  HasRows display = getDisplay();
  if (display != null) {
   Range range = display.getVisibleRange();
   int pageSize = Math.min(range.getLength() + increment,
     display.getRowCount()
       + (display.isRowCountExact() ? 0 : increment));
   display.setVisibleRange(range.getStart(), pageSize);
  }
 }
});
origin: net.wetheinter/gwt-user

 public void onClick(ClickEvent event) {
  // Display should be non-null, but we check defensively.
  HasRows display = getDisplay();
  if (display != null) {
   Range range = display.getVisibleRange();
   int pageSize = Math.min(range.getLength() + increment,
     display.getRowCount()
       + (display.isRowCountExact() ? 0 : increment));
   display.setVisibleRange(range.getStart(), pageSize);
  }
 }
});
origin: org.jboss.ballroom/widgets

@Override
public void setPageStart(int index) {
  HasRows display = getDisplay();
  if (display != null) {
    Range range = display.getVisibleRange();
    int pageSize = range.getLength();
    if ((!isRangeLimited() || display.getRowCount() <= pageSize) && display.isRowCountExact()) {
      index = Math.min(index, display.getRowCount() - pageSize);
    }
    index = Math.max(0, index);
    if (index != range.getStart()) {
      display.setVisibleRange(index, pageSize);
    }
  }
}
origin: org.uberfire/uberfire-widgets-table

@Override
public void setPageStart(int index) {
  if (getDisplay() != null) {
    Range range = getDisplay().getVisibleRange();
    int displayPageSize = range.getLength();
    if (!isRangeLimited() && getDisplay().isRowCountExact()) {
      index = Math.min(index,
               getDisplay().getRowCount() - displayPageSize);
    }
    index = Math.max(0,
             index);
    if (index != range.getStart()) {
      getDisplay().setVisibleRange(index,
                     displayPageSize);
    }
  }
}
origin: kiegroup/appformer

@Override
public void setPageStart(int index) {
  if (getDisplay() != null) {
    Range range = getDisplay().getVisibleRange();
    int displayPageSize = range.getLength();
    if (!isRangeLimited() && getDisplay().isRowCountExact()) {
      index = Math.min(index,
               getDisplay().getRowCount() - displayPageSize);
    }
    index = Math.max(0,
             index);
    if (index != range.getStart()) {
      getDisplay().setVisibleRange(index,
                     displayPageSize);
    }
  }
}
origin: org.kie.guvnor/guvnor-commons-ui

@Override
public void setPageStart( int index ) {
  if ( getDisplay() != null ) {
    Range range = getDisplay().getVisibleRange();
    int displayPageSize = getPageSize();
    if ( isRangeLimited()
        && getDisplay().isRowCountExact() ) {
      displayPageSize = Math.min( getPageSize(),
                    getDisplay().getRowCount()
                        - index );
    }
    index = Math.max( 0,
             index );
    if ( index != range.getStart() ) {
      getDisplay().setVisibleRange( index,
                     displayPageSize );
    }
  }
}
com.google.gwt.view.clientHasRowssetVisibleRange

Javadoc

Set the visible range or rows. This method defers to #setVisibleRange(Range).

Popular methods of HasRows

  • getVisibleRange
    Get the range of visible rows.
  • getRowCount
    Get the total count of all rows.
  • isRowCountExact
    Check if the total row count is exact, or an estimate.
  • setRowCount
    Set the total count of all rows, specifying whether the count is exact or an estimate.
  • addRangeChangeHandler
    Add a RangeChangeEvent.Handler.
  • addRowCountChangeHandler
    Add a RowCountChangeEvent.Handler.
  • fireEvent

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Kernel (java.awt.image)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • JTable (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now