mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
Autjor/Series/Tag selection in library
This commit is contained in:
parent
e8cdee8255
commit
acdfd1fdc9
7 changed files with 79 additions and 18 deletions
|
@ -22,25 +22,26 @@ package org.geometerplus.fbreader.library;
|
|||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||
|
||||
public class AuthorTree extends LibraryTree {
|
||||
private final Author myAuthor;
|
||||
public final Author Author;
|
||||
|
||||
AuthorTree(LibraryTree parent, Author author) {
|
||||
super(parent);
|
||||
myAuthor = author;
|
||||
Author = author;
|
||||
}
|
||||
|
||||
SeriesTree createSeriesSubTree(String series) {
|
||||
return new SeriesTree(this, series);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return
|
||||
(myAuthor != null) ?
|
||||
myAuthor.DisplayName :
|
||||
(Author != null) ?
|
||||
Author.DisplayName :
|
||||
ZLResource.resource("library").getResource("unknownAuthor").getValue();
|
||||
}
|
||||
|
||||
protected String getSortKey() {
|
||||
return (myAuthor != null) ? myAuthor.SortKey : null;
|
||||
return (Author != null) ? Author.SortKey : null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue