X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2FLocalReaderGroup.java;h=c5755460f15a77afd56c9f9117f59159b1f41c00;hb=71d72f342e245b8d3d1e65f1fcd6f0a285da2eb7;hp=991aaee713eb357666bead680a20969621af21ce;hpb=4310bae9326894d9a9f5c7d34e552437e1156ddb;p=nikiroo-utils.git diff --git a/src/be/nikiroo/fanfix/reader/LocalReaderGroup.java b/src/be/nikiroo/fanfix/reader/LocalReaderGroup.java index 991aaee..c575546 100644 --- a/src/be/nikiroo/fanfix/reader/LocalReaderGroup.java +++ b/src/be/nikiroo/fanfix/reader/LocalReaderGroup.java @@ -27,6 +27,7 @@ public class LocalReaderGroup extends JPanel { private List stories; private List books; private JPanel pane; + private boolean words; // words or authors (secondary info on books) /** * Create a new {@link LocalReaderGroup}. @@ -62,8 +63,8 @@ public class LocalReaderGroup extends JPanel { JLabel label = new JLabel(); label.setText(String.format("" - + "
" + "%s" - + "" + "", title)); + + "
" + + "%s" + "" + "", title)); label.setHorizontalAlignment(JLabel.CENTER); add(label, BorderLayout.NORTH); } @@ -78,7 +79,7 @@ public class LocalReaderGroup extends JPanel { */ public void setActionListener(BookActionListener action) { this.action = action; - refreshBooks(stories); + refreshBooks(stories, words); } /** @@ -86,9 +87,12 @@ public class LocalReaderGroup extends JPanel { * * @param stories * the stories + * @param seeWordcount + * TRUE to see word counts, FALSE to see authors */ - public void refreshBooks(List stories) { + public void refreshBooks(List stories, boolean seeWordcount) { this.stories = stories; + this.words = seeWordcount; books = new ArrayList(); invalidate(); @@ -98,7 +102,7 @@ public class LocalReaderGroup extends JPanel { if (stories != null) { for (MetaData meta : stories) { LocalReaderBook book = new LocalReaderBook(meta, - reader.isCached(meta.getLuid())); + reader.isCached(meta.getLuid()), seeWordcount); if (backgroundColor != null) { book.setBackground(backgroundColor); }