mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
Network tree classes have been added
git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@1061 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
parent
1cddf78fa1
commit
282c132922
10 changed files with 254 additions and 76 deletions
|
@ -33,25 +33,21 @@ public class BookTree extends LibraryTree {
|
|||
return Book.getTitle();
|
||||
}
|
||||
|
||||
private String myAuthorsString;
|
||||
public String getSecondString() {
|
||||
public String getSummary() {
|
||||
if (!myShowAuthors) {
|
||||
return super.getSecondString();
|
||||
}
|
||||
if (myAuthorsString == null) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
int count = 0;
|
||||
for (Author author : Book.authors()) {
|
||||
if (count++ > 0) {
|
||||
builder.append(", ");
|
||||
}
|
||||
builder.append(author.DisplayName);
|
||||
if (count == 5) {
|
||||
break;
|
||||
}
|
||||
StringBuilder builder = new StringBuilder();
|
||||
int count = 0;
|
||||
for (Author author : Book.authors()) {
|
||||
if (count++ > 0) {
|
||||
builder.append(", ");
|
||||
}
|
||||
builder.append(author.DisplayName);
|
||||
if (count == 5) {
|
||||
break;
|
||||
}
|
||||
myAuthorsString = builder.toString();
|
||||
}
|
||||
return myAuthorsString;
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue