當前位置: 首頁>>代碼示例>>Java>>正文


Java FBTree.Key方法代碼示例

本文整理匯總了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();
}
 
開發者ID:AlixMing,項目名稱:FBreader,代碼行數:29,代碼來源:TreeActivity.java

示例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();
}
 
開發者ID:liufeiit,項目名稱:itmarry,代碼行數:29,代碼來源:TreeActivity.java

示例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;
}
 
開發者ID:liufeiit,項目名稱:itmarry,代碼行數:8,代碼來源:CoverCache.java

示例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++;
}
 
開發者ID:liufeiit,項目名稱:itmarry,代碼行數:9,代碼來源:CoverHolder.java

示例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;
}
 
開發者ID:liufeiit,項目名稱:itmarry,代碼行數:11,代碼來源:CoverHolder.java

示例6: removeEldestEntry

import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
@Override
protected boolean removeEldestEntry(Map.Entry<FBTree.Key,Object> eldest) {
	return size() > 3 * HoldersCounter;
}
 
開發者ID:liufeiit,項目名稱:itmarry,代碼行數:5,代碼來源:CoverCache.java

示例7: putBitmap

import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
void putBitmap(FBTree.Key key, Bitmap bitmap) {
	myBitmaps.put(key, bitmap != null ? bitmap : NULL_BITMAP);
}
 
開發者ID:liufeiit,項目名稱:itmarry,代碼行數:4,代碼來源:CoverCache.java

示例8: getTreeByKey

import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
@Override
protected LibraryTree getTreeByKey(FBTree.Key key) {
	return key != null ? myRootTree.getLibraryTree(key) : myRootTree;
}
 
開發者ID:liufeiit,項目名稱:itmarry,代碼行數:5,代碼來源:LibraryActivity.java

示例9: getTreeByKey

import org.geometerplus.fbreader.tree.FBTree; //導入方法依賴的package包/類
protected abstract T getTreeByKey(FBTree.Key key); 
開發者ID:AlixMing,項目名稱:FBreader,代碼行數:2,代碼來源:TreeActivity.java


注:本文中的org.geometerplus.fbreader.tree.FBTree.Key方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。