• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java TreeStateManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;
}
 
开发者ID:GlacialSoftware,项目名称:PCAPReader,代码行数:17,代码来源:PacketDetailsFragment.java


示例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();
   }
 
开发者ID:mvglasow,项目名称:satstat,代码行数:24,代码来源:DownloadTreeViewAdapter.java


示例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;
}
 
开发者ID:t-arn,项目名称:tomarn66-tree-view-list-android,代码行数:8,代码来源:SimpleStandardAdapter.java


示例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);
}
 
开发者ID:t-arn,项目名称:tomarn66-tree-view-list-android,代码行数:33,代码来源:TreeViewListDemo.java


示例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);
}
 
开发者ID:rdeguzman,项目名称:treeview-list-android,代码行数:39,代码来源:TreeViewListDemo.java


示例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;
}
 
开发者ID:nmud,项目名称:nmud,代码行数:6,代码来源:TreeAdapter.java


示例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);
}
 
开发者ID:t-arn,项目名称:tomarn66-tree-view-list-android,代码行数:7,代码来源:FancyColouredVariousSizesAdapter.java


示例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;
}
 
开发者ID:GlacialSoftware,项目名称:PCAPReader,代码行数:7,代码来源:PacketTreeAdapter.java



注:本文中的pl.polidea.treeview.TreeStateManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TransformContext类代码示例发布时间:2022-05-22
下一篇:
Java IpAddressBuilder类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap