private List<MetaData> stories;
private List<LocalReaderBook> books;
private JPanel pane;
+ private boolean words; // words or authors (secondary info on books)
/**
* Create a new {@link LocalReaderGroup}.
JLabel label = new JLabel();
label.setText(String.format("<html>"
- + "<body style='text-align: center'><br>" + "%s"
- + "</body>" + "</html>", title));
+ + "<body style='text-align: center; color: gray;'><br><b>"
+ + "%s" + "</b></body>" + "</html>", title));
label.setHorizontalAlignment(JLabel.CENTER);
add(label, BorderLayout.NORTH);
}
*/
public void setActionListener(BookActionListener action) {
this.action = action;
- refreshBooks(stories);
+ refreshBooks(stories, words);
}
/**
*
* @param stories
* the stories
+ * @param seeWordcount
+ * TRUE to see word counts, FALSE to see authors
*/
- public void refreshBooks(List<MetaData> stories) {
+ public void refreshBooks(List<MetaData> stories, boolean seeWordcount) {
this.stories = stories;
+ this.words = seeWordcount;
books = new ArrayList<LocalReaderBook>();
invalidate();
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);
}