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