GUI search
[fanfix.git] / src / be / nikiroo / fanfix / reader / ui / GuiReaderGroup.java
index 17bf43cbb455a66bb357e68ddb53f0d97d426ebb..a0023898bb5cadd31dc91be00e9e6c47727e2aea 100644 (file)
@@ -197,6 +197,33 @@ public class GuiReaderGroup extends JPanel {
         */
        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);
        }