本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
}
示例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;
}