From: Niki Roo Date: Tue, 16 Apr 2019 17:19:45 +0000 (+0200) Subject: GUI search X-Git-Url: http://git.nikiroo.be/?a=commitdiff_plain;h=a12b668f37bdaf852ca2377739fd73b610f928c8;p=fanfix-jexer.git GUI search --- diff --git a/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java b/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java index 17bf43c..a002389 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); } diff --git a/src/be/nikiroo/fanfix/reader/ui/GuiReaderSearch.java b/src/be/nikiroo/fanfix/reader/ui/GuiReaderSearch.java index 6bc5fc6..229b5db 100644 --- a/src/be/nikiroo/fanfix/reader/ui/GuiReaderSearch.java +++ b/src/be/nikiroo/fanfix/reader/ui/GuiReaderSearch.java @@ -147,7 +147,8 @@ public class GuiReaderSearch extends JFrame { if (supportType != this.supportType) { this.supportType = supportType; comboSupportTypes.setSelectedItem(supportType); - // TODO: reset all + books.clear(); + // TODO: reset all tags } }