1
0
Fork 0
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:
Nikolay Pultsin 2011-01-12 00:47:17 +00:00
parent e8cdee8255
commit acdfd1fdc9
7 changed files with 79 additions and 18 deletions

View file

@ -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;
}
}