Пример #1
0
 private boolean checkValidPage() {
   if (resultSetController != null
       && resultSetController.getTotalResultSetLength() != -1
       && resultSetController.getBlockSize() != -1
       && controlPageNr.getDouble().intValue()
           > resultSetController.getTotalResultSetLength() / resultSetController.getBlockSize()) {
     controlPageNr.setValue(new Integer(currentPageNr));
     return false;
   }
   return true;
 }
Пример #2
0
 public void prevPgButton_actionPerformed(ActionEvent e) {
   if (resultSetController != null) {
     for (int i = 0; i < beforeActionListeners.size(); i++)
       ((ActionListener) beforeActionListeners.get(i))
           .actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, PREV_PG_BUTTON));
     resultSetController.previousPage(this);
   }
 }
Пример #3
0
 public void firstButton_actionPerformed(ActionEvent e) {
   if (resultSetController != null) {
     for (int i = 0; i < beforeActionListeners.size(); i++)
       ((ActionListener) beforeActionListeners.get(i))
           .actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, FIRST_BUTTON));
     resultSetController.firstRow(this);
   }
 }
Пример #4
0
  public void nextButton_actionPerformed(ActionEvent e) {
    if (resultSetController != null) {
      for (int i = 0; i < beforeActionListeners.size(); i++)
        ((ActionListener) beforeActionListeners.get(i))
            .actionPerformed(
                new ActionEvent(this, ActionEvent.ACTION_PERFORMED, e.getActionCommand()));

      resultSetController.nextRow(this, e);
    }
  }
Пример #5
0
 /** Reload grid, starting from the specified page. */
 private void gotoPage() {
   if (currentPageNr > 0 && resultSetController != null)
     resultSetController.loadPage(currentPageNr);
 }