本文整理匯總了Java中org.geometerplus.fbreader.tree.FBTree.Key方法的典型用法代碼示例。如果您正苦於以下問題:Java FBTree.Key方法的具體用法?Java FBTree.Key怎麽用?Java FBTree.Key使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.geometerplus.fbreader.tree.FBTree
的用法示例。
在下文中一共展示了FBTree.Key方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
protected void init(Intent intent) {
final FBTree.Key key = (FBTree.Key)intent.getSerializableExtra(TREE_KEY_KEY);
final FBTree.Key selectedKey = (FBTree.Key)intent.getSerializableExtra(SELECTED_TREE_KEY_KEY);
myCurrentTree = getTreeByKey(key);
// not myCurrentKey = key
// because key might be null
myCurrentKey = myCurrentTree.getUniqueKey();
final TreeAdapter adapter = getListAdapter();
adapter.replaceAll(myCurrentTree.subtrees(), false);
setTitle(myCurrentTree.getTreeTitle());
final FBTree selectedTree =
selectedKey != null ? getTreeByKey(selectedKey) : adapter.getFirstSelectedItem();
final int index = adapter.getIndex(selectedTree);
if (index != -1) {
setSelection(index);
getListView().post(new Runnable() {
public void run() {
setSelection(index);
}
});
}
myHistory = (ArrayList<FBTree.Key>)intent.getSerializableExtra(HISTORY_KEY);
if (myHistory == null) {
myHistory = new ArrayList<FBTree.Key>();
}
onCurrentTreeChanged();
}
示例2: init
import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
protected void init(Intent intent) {
final FBTree.Key key = (FBTree.Key)intent.getSerializableExtra(TREE_KEY_KEY);
final FBTree.Key selectedKey = (FBTree.Key)intent.getSerializableExtra(SELECTED_TREE_KEY_KEY);
myCurrentTree = getTreeByKey(key);
// not myCurrentKey = key
// because key might be null
myCurrentKey = myCurrentTree.getUniqueKey();
final TreeAdapter adapter = getListAdapter();
adapter.replaceAll(myCurrentTree.subTrees());
setTitle(myCurrentTree.getTreeTitle());
final FBTree selectedTree =
selectedKey != null ? getTreeByKey(selectedKey) : adapter.getFirstSelectedItem();
final int index = adapter.getIndex(selectedTree);
if (index != -1) {
setSelection(index);
getListView().post(new Runnable() {
public void run() {
setSelection(index);
}
});
}
myHistory = (ArrayList<FBTree.Key>)intent.getSerializableExtra(HISTORY_KEY);
if (myHistory == null) {
myHistory = new ArrayList<FBTree.Key>();
}
onCurrentTreeChanged();
}
示例3: getBitmap
import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
Bitmap getBitmap(FBTree.Key key) throws NullObjectException {
final Object bitmap = myBitmaps.get(key);
if (bitmap == NULL_BITMAP) {
throw new NullObjectException();
}
return (Bitmap)bitmap;
}
示例4: CoverHolder
import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
CoverHolder(CoverManager manager, ImageView coverView, FBTree.Key key) {
myManager = manager;
manager.setupCoverView(coverView);
CoverView = coverView;
Key = key;
myManager.Cache.HoldersCounter++;
}
示例5: setKey
import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
synchronized void setKey(FBTree.Key key) {
if (!Key.equals(key)) {
if (coverBitmapTask != null) {
coverBitmapTask.cancel(true);
coverBitmapTask = null;
}
coverBitmapRunnable = null;
}
Key = key;
}
示例6: removeEldestEntry
import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
@Override
protected boolean removeEldestEntry(Map.Entry<FBTree.Key,Object> eldest) {
return size() > 3 * HoldersCounter;
}
示例7: putBitmap
import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
void putBitmap(FBTree.Key key, Bitmap bitmap) {
myBitmaps.put(key, bitmap != null ? bitmap : NULL_BITMAP);
}
示例8: getTreeByKey
import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
@Override
protected LibraryTree getTreeByKey(FBTree.Key key) {
return key != null ? myRootTree.getLibraryTree(key) : myRootTree;
}
示例9: getTreeByKey
import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
protected abstract T getTreeByKey(FBTree.Key key);