*/
public void setActionListener(BookActionListener action) {
this.action = action;
+ refreshBooks();
+ }
+
+ /**
+ * Clear all the books in this {@link GuiReaderGroup}.
+ */
+ public void clear() {
+ refreshBooks(new ArrayList<GuiReaderBookInfo>());
+ }
+
+ /**
+ * Refresh the list of {@link GuiReaderBook}s displayed in the control.
+ *
+ * @param infos
+ * the new list of infos
+ */
+ public void refreshBooks() {
+ refreshBooks(infos, words);
+ }
+
+ /**
+ * Refresh the list of {@link GuiReaderBook}s displayed in the control.
+ *
+ * @param infos
+ * the new list of infos
+ */
+ public void refreshBooks(List<GuiReaderBookInfo> infos) {
refreshBooks(infos, words);
}
* @param index
* the index of the book to select, can be outside the bounds
* (either all the items will be unselected or the first or last
- * book will then be selected, see <tt>forceRange>/tt>)
+ * book will then be selected, see <tt>forceRange></tt>)
* @param forceRange
* TRUE to constraint the index to the first/last element, FALSE
* to unselect when outside the range