X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2Fui%2FGuiReaderGroup.java;h=7275498ff3d9c6079907886c07d092ae80adad1e;hb=dc3b0033126c7f8158499b8ae9759a22f29d78ac;hp=17bf43cbb455a66bb357e68ddb53f0d97d426ebb;hpb=b02c7819a6dcc0d62a0e9135d439f9352f5c80ce;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java b/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java index 17bf43c..7275498 100644 --- a/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java +++ b/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java @@ -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()); + } + + /** + * 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 infos) { refreshBooks(infos, words); } @@ -335,7 +362,7 @@ public class GuiReaderGroup extends JPanel { * @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 forceRange>/tt>) + * book will then be selected, see forceRange>) * @param forceRange * TRUE to constraint the index to the first/last element, FALSE * to unselect when outside the range