git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
When cover not found, check next to .info
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
fanfix
/
reader
/
LocalReaderGroup.java
diff --git
a/src/be/nikiroo/fanfix/reader/LocalReaderGroup.java
b/src/be/nikiroo/fanfix/reader/LocalReaderGroup.java
index 991aaee713eb357666bead680a20969621af21ce..c5755460f15a77afd56c9f9117f59159b1f41c00 100644
(file)
--- 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<MetaData> stories;
private List<LocalReaderBook> books;
private JPanel pane;
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}.
/**
* Create a new {@link LocalReaderGroup}.
@@
-62,8
+63,8
@@
public class LocalReaderGroup extends JPanel {
JLabel label = new JLabel();
label.setText(String.format("<html>"
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);
}
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;
*/
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 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.stories = stories;
+ this.words = seeWordcount;
books = new ArrayList<LocalReaderBook>();
invalidate();
books = new ArrayList<LocalReaderBook>();
invalidate();
@@
-98,7
+102,7
@@
public class LocalReaderGroup extends JPanel {
if (stories != null) {
for (MetaData meta : stories) {
LocalReaderBook book = new LocalReaderBook(meta,
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);
}
if (backgroundColor != null) {
book.setBackground(backgroundColor);
}