当前位置: 首页>>代码示例>>Java>>正文


Java TreeNode.isLeaf方法代码示例

本文整理汇总了Java中com.unnamed.b.atv.model.TreeNode.isLeaf方法的典型用法代码示例。如果您正苦于以下问题:Java TreeNode.isLeaf方法的具体用法?Java TreeNode.isLeaf怎么用?Java TreeNode.isLeaf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.unnamed.b.atv.model.TreeNode的用法示例。


在下文中一共展示了TreeNode.isLeaf方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createNodeView

import com.unnamed.b.atv.model.TreeNode; //导入方法依赖的package包/类
@Override
public View createNodeView(TreeNode node, IconTreeItemHolder.IconTreeItem value) {
    final LayoutInflater inflater = LayoutInflater.from(context);
    final View view = inflater.inflate(R.layout.layout_header_node, null, false);
    TextView tvValue = (TextView) view.findViewById(R.id.node_value);
    tvValue.setText(value.text);

    final PrintView iconView = (PrintView) view.findViewById(R.id.icon);
    iconView.setIconText(context.getResources().getString(value.icon));

    arrowView = (PrintView) view.findViewById(R.id.arrow_icon);
    if (node.isLeaf()) {
        arrowView.setVisibility(View.INVISIBLE);
    }

    return view;
}
 
开发者ID:loput12ouj35,项目名称:Android-MindMap,代码行数:18,代码来源:HeaderHolder.java

示例2: createNodeView

import com.unnamed.b.atv.model.TreeNode; //导入方法依赖的package包/类
@Override
public View createNodeView(TreeNode node, IconTreeItem value) {
    final LayoutInflater inflater = LayoutInflater.from(context);
    final View view = inflater.inflate(R.layout.layout_icon_node, null, false);
    tvValue = (TextView) view.findViewById(R.id.node_value);
    tvValue.setText(value.text);

    final PrintView iconView = (PrintView) view.findViewById(R.id.icon);
    iconView.setIconText(context.getResources().getString(value.icon));

    arrowView = (PrintView) view.findViewById(R.id.arrow_icon);
    if (node.isLeaf()) {
        arrowView.setVisibility(View.INVISIBLE);
    }
    return view;
}
 
开发者ID:ErNaveen,项目名称:TreeView_in_Android,代码行数:17,代码来源:IconTreeItemHolder.java

示例3: createNodeView

import com.unnamed.b.atv.model.TreeNode; //导入方法依赖的package包/类
@Override
public View createNodeView(final TreeNode node, final GpxTreeItem value) {
    final LayoutInflater inflater = LayoutInflater.from(context);
    final View view = inflater.inflate(R.layout.holder_gpx_tree, null, false);

    ImageView iconView = (ImageView) view.findViewById(R.id.tree_item_icon);
    iconView.setImageResource(value.icon);

    TextView textView = (TextView) view.findViewById(R.id.tree_item_text);
    textView.setText(value.gpxName);

    arrowView = (PrintView) view.findViewById(R.id.arrow_icon);
    if (node.isLeaf()) {
        arrowView.setVisibility(View.GONE);
    }

    nodeSelector = (CheckBox) view.findViewById(R.id.node_selector);
    nodeSelector.setOnCheckedChangeListener(getCheckListener(node, value));

    view.findViewById(R.id.btn_delete).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            nodeSelector.setChecked(false);
            getTreeView().removeNode(node);
            if (value.type == ITEM_TYPE_WAYPOINT || value.type == ITEM_TYPE_WAYPOINTS)
                manager.clusterTheMarkers();
        }
    });

    if (node.isLeaf())
        view.setOnClickListener(getClickListener(value));

    return view;
}
 
开发者ID:typebrook,项目名称:FiveMinsMore,代码行数:35,代码来源:GpxHolder.java

示例4: createNodeView

import com.unnamed.b.atv.model.TreeNode; //导入方法依赖的package包/类
@Override
public View createNodeView(final TreeNode node, IconTreeItemHolder.IconTreeItem value) {
    final LayoutInflater inflater = LayoutInflater.from(context);
    final View view = inflater.inflate(R.layout.layout_selectable_header, null, false);

    tvValue = (TextView) view.findViewById(R.id.node_value);
    tvValue.setText(value.text);

    final PrintView iconView = (PrintView) view.findViewById(R.id.icon);
    iconView.setIconText(context.getResources().getString(value.icon));

    arrowView = (PrintView) view.findViewById(R.id.arrow_icon);
    if (node.isLeaf()) {
        arrowView.setVisibility(View.GONE);
    }

    nodeSelector = (CheckBox) view.findViewById(R.id.node_selector);
    nodeSelector.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
            node.setSelected(isChecked);
            for (TreeNode n : node.getChildren()) {
                getTreeView().selectNode(n, isChecked);
            }
        }
    });
    nodeSelector.setChecked(node.isSelected());

    return view;
}
 
开发者ID:loput12ouj35,项目名称:Android-MindMap,代码行数:31,代码来源:SelectableHeaderHolder.java

示例5: onClick

import com.unnamed.b.atv.model.TreeNode; //导入方法依赖的package包/类
@Override
public void onClick(TreeNode node, Object value) {
    IconTreeItemHolder.IconTreeItem item = (IconTreeItemHolder.IconTreeItem) value;
    statusBar.setText("Last clicked: " + item.text);
    if (node.isLeaf()) {
        Toast.makeText(getActivity(), item.text, Toast.LENGTH_SHORT).show();
    }
}
 
开发者ID:ErNaveen,项目名称:TreeView_in_Android,代码行数:9,代码来源:FolderStructureFragment.java

示例6: createNodeView

import com.unnamed.b.atv.model.TreeNode; //导入方法依赖的package包/类
@Override
public View createNodeView(final TreeNode node, IconTreeItemHolder.IconTreeItem value) {
    final LayoutInflater inflater = LayoutInflater.from(context);
    final View view = inflater.inflate(R.layout.layout_selectable_header, null, false);

    tvValue = (TextView) view.findViewById(R.id.node_value);
    tvValue.setText(value.text);

    final PrintView iconView = (PrintView) view.findViewById(R.id.icon);
    iconView.setIconText(context.getResources().getString(value.icon));

    arrowView = (PrintView) view.findViewById(R.id.arrow_icon);
    if (node.isLeaf()) {
        arrowView.setVisibility(View.GONE);
    }

    nodeSelector = (CheckBox) view.findViewById(R.id.node_selector);
    nodeSelector.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
            node.setSelected(isChecked);
        }
    });
    nodeSelector.setChecked(node.isSelected());

    return view;
}
 
开发者ID:ErNaveen,项目名称:TreeView_in_Android,代码行数:28,代码来源:SelectableHeaderHolder.java


注:本文中的com.unnamed.b.atv.model.TreeNode.isLeaf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。