本文整理汇总了Java中pl.polidea.treeview.TreeStateManager类的典型用法代码示例。如果您正苦于以下问题:Java TreeStateManager类的具体用法?Java TreeStateManager怎么用?Java TreeStateManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TreeStateManager类属于pl.polidea.treeview包,在下文中一共展示了TreeStateManager类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doInBackground
import pl.polidea.treeview.TreeStateManager; //导入依赖的package包/类
protected Integer doInBackground(Void...params){
try{
List<String> lines = new ArrayList<String>();
TreeStateManager<Integer> treeStateManager=new InMemoryTreeStateManager<Integer>();
TreeBuilder<Integer> treeBuilder = new TreeBuilder<Integer>(treeStateManager);
PacketFormatter packetFormatter = new PacketFormatter(new StringBuilder(),treeBuilder,lines);
int maxLevel=packetFormatter.analyzePacket(pcapPacket, referenceEpochTime);
packetTreeAdapter= new PacketTreeAdapter(activity, treeStateManager,maxLevel+1,R.layout.item_packet_tree,lines);
} catch (Exception e){
e.printStackTrace();
return -1;
}
return 0;
}
示例2: DownloadTreeViewAdapter
import pl.polidea.treeview.TreeStateManager; //导入依赖的package包/类
/**
*
* @param activity
* @param treeStateManager
* @param numberOfLevels
*/
public DownloadTreeViewAdapter(final Activity activity,
final TreeStateManager<RemoteFile> treeStateManager,
final int numberOfLevels) {
super(activity, treeStateManager, numberOfLevels);
this.manager = treeStateManager;
listTasks = new HashMap<RemoteDirListTask, RemoteFile>();
downloadsByReference = new HashMap<Long, DownloadInfo>();
downloadsByUri = new HashMap<Uri, DownloadInfo>();
downloadsByFile = new HashMap<File, DownloadInfo>();
df.setTimeZone(TimeZone.getDefault());
downloadManager = (DownloadManager) activity.getSystemService(Context.DOWNLOAD_SERVICE);
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(activity);
checkProgress();
if (!downloadsByReference.isEmpty())
startProgressChecker();
}
示例3: SimpleStandardAdapter
import pl.polidea.treeview.TreeStateManager; //导入依赖的package包/类
public SimpleStandardAdapter(final TreeViewListDemo treeViewListDemo,
final Set<Long> selected,
final TreeStateManager<Long> treeStateManager,
final int numberOfLevels) {
super(treeViewListDemo, treeStateManager, numberOfLevels);
this.selected = selected;
}
示例4: onCreate
import pl.polidea.treeview.TreeStateManager; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TreeType newTreeType = null;
boolean newCollapsible;
if (savedInstanceState == null) {
manager = new InMemoryTreeStateManager<Long>();
final TreeBuilder<Long> treeBuilder = new TreeBuilder<Long>(manager);
for (int i = 0; i < DEMO_NODES.length; i++) {
treeBuilder.sequentiallyAddNextNode((long) i, DEMO_NODES[i]);
}
Log.d(TAG, manager.toString());
newTreeType = TreeType.SIMPLE;
newCollapsible = true;
} else {
manager = (TreeStateManager<Long>) savedInstanceState
.getSerializable("treeManager");
newTreeType = (TreeType) savedInstanceState
.getSerializable("treeType");
newCollapsible = savedInstanceState.getBoolean("collapsible");
}
setContentView(R.layout.main_demo);
treeView = (TreeViewList) findViewById(R.id.mainTreeView);
fancyAdapter = new FancyColouredVariousSizesAdapter(this, selected,
manager, LEVEL_NUMBER);
simpleAdapter = new SimpleStandardAdapter(this, selected, manager,
LEVEL_NUMBER);
setTreeAdapter(newTreeType);
setCollapsible(newCollapsible);
registerForContextMenu(treeView);
}
示例5: onCreate
import pl.polidea.treeview.TreeStateManager; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TreeType newTreeType = null;
boolean newCollapsible;
if (savedInstanceState == null) {
manager = new InMemoryTreeStateManager<Long>();
final TreeBuilder<Long> treeBuilder = new TreeBuilder<Long>(manager);
for (int i = 0; i < DEMO_NODES.length; i++) {
treeBuilder.sequentiallyAddNextNode((long) i, DEMO_NODES[i]);
}
Log.d(TAG, manager.toString());
newTreeType = TreeType.SIMPLE;
newCollapsible = true;
} else {
manager = (TreeStateManager<Long>) savedInstanceState
.getSerializable("treeManager");
if (manager == null) {
manager = new InMemoryTreeStateManager<Long>();
}
newTreeType = (TreeType) savedInstanceState
.getSerializable("treeType");
if (newTreeType == null) {
newTreeType = TreeType.SIMPLE;
}
newCollapsible = savedInstanceState.getBoolean("collapsible");
}
setContentView(R.layout.main_demo);
treeView = (TreeViewList) findViewById(R.id.mainTreeView);
fancyAdapter = new FancyColouredVariousSizesAdapter(this, selected,
manager, LEVEL_NUMBER);
simpleAdapter = new SimpleStandardAdapter(this, selected, manager,
LEVEL_NUMBER);
setTreeAdapter(newTreeType);
setCollapsible(newCollapsible);
registerForContextMenu(treeView);
}
示例6: TreeAdapter
import pl.polidea.treeview.TreeStateManager; //导入依赖的package包/类
public TreeAdapter(final Activity treeViewListDemo, final Set<Entity> selected,
final TreeStateManager<Entity> treeStateManager, final int numberOfLevels) {
super(treeViewListDemo, treeStateManager, numberOfLevels);
this.selected = selected;
}
示例7: FancyColouredVariousSizesAdapter
import pl.polidea.treeview.TreeStateManager; //导入依赖的package包/类
public FancyColouredVariousSizesAdapter(final TreeViewListDemo activity,
final Set<Long> selected,
final TreeStateManager<Long> treeStateManager,
final int numberOfLevels) {
super(activity, selected, treeStateManager, numberOfLevels);
}
示例8: PacketTreeAdapter
import pl.polidea.treeview.TreeStateManager; //导入依赖的package包/类
public PacketTreeAdapter(Activity activity, TreeStateManager<Integer> treeStateManager,
int numberOfLevels, int resource, List<String> lines) {
super(activity, treeStateManager, numberOfLevels);
this.lines=lines;
this.resource=resource;
}