Exemplo n.º 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;
 }
Exemplo n.º 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);
   }
 }
Exemplo n.º 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);
   }
 }
Exemplo n.º 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);
    }
  }
Exemplo n.º 5
0
 /** Reload grid, starting from the specified page. */
 private void gotoPage() {
   if (currentPageNr > 0 && resultSetController != null)
     resultSetController.loadPage(currentPageNr);
 }