*/
public void setSearchInProgress(Boolean isSearchInProgress);
+ /**
+ * Action performed when previous page (<<) button is pressed pressed.
+ */
public void prevPageAction();
+ /**
+ * Action performed when next page (>>) button is pressed pressed.
+ */
public void nextPageAction();
+ /**
+ * Checks if the current service's search result is paginate-able
+ *
+ * @return true means the service provides paginated results
+ */
public boolean isPaginationEnabled();
+
+ /**
+ * Updates the 'enabled' state for the previous page button
+ *
+ * @param isEnabled
+ */
+ public void setPrevPageButtonEnabled(boolean isEnabled);
+
+ /**
+ * Updates the 'enabled' state for the next page button
+ *
+ * @param isEnabled
+ */
+ public void setNextPageButtonEnabled(boolean isEnabled);
}
}
@Override
+ public void setPrevPageButtonEnabled(boolean isEnabled)
+ {
+ btn_prev_page.setEnabled(isEnabled);
+ }
+
+ @Override
+ public void setNextPageButtonEnabled(boolean isEnabled)
+ {
+ btn_next_page.setEnabled(isEnabled);
+ }
+
+ @Override
public void setErrorMessage(String message)
{
errorWarning.append(message);
// System.out.println("resultSet count : " + resultSetCount);
// System.out.println("offSet : " + offSet);
// System.out.println("page limit : " + pageLimit);
- btn_prev_page.setEnabled(false);
- btn_next_page.setEnabled(false);
+ setPrevPageButtonEnabled(false);
+ setNextPageButtonEnabled(false);
if (resultSetCount >= pageLimit)
{
- btn_next_page.setEnabled(true);
+ setNextPageButtonEnabled(true);
}
if (offSet >= pageLimit)
{
- btn_prev_page.setEnabled(true);
+ setPrevPageButtonEnabled(true);
}
}