Questions tagged [tree-nodes]
36 questions
1
vote
2 answers
javax.swing.tree.TreePath Selection to XPath Query String
How can I get the corresponding XPath Query String from a selected TreePath?
a
|-b
+-c
|-b
+-d
If I select "d" I want to get something like /a/b[2]/d
EDIT:
For now I wanted to loop through the tree.getSelectionPath().toString().split(",") but…

KIC
- 5,887
- 7
- 58
- 98
1
vote
1 answer
How to get children for each internal node in R?
For the dendrogram object how can I get children of the internal nodes? Ideally I would like to extract children with their labels.
thank you

Alexandra Bolotskikh
- 59
- 3
1
vote
0 answers
Populate one Treeview from another C#
I would like to be able to take a treeview that i have created from a directory, and when the user checks off a checkbox next to a node, i would like that node to appear in the second tree uding the same directory structure
root
a
b
b1
b2
…

Axxelsian
- 787
- 3
- 9
- 25
0
votes
1 answer
Given an array of values corresponding to the location of a leaf node, how would I access said node?
Note: I am unfamiliar with terminology regarding tree structures. Please forgive any oversights that may be a result of my ignorance!
Practical Example
Given an array as such:
Array
(
[0] => 0
[1] => 2
[2] => 8
[3] => 9
)
The tree…

Julian H. Lam
- 25,501
- 13
- 46
- 73
0
votes
2 answers
Undirected Graph adjacency (Computer Science)
I have an undirected graph G=(V,E) with nodes labelled 1, 2, 3,...,n, and a specific node k in V.
I have two representations of this graph: Adjacency-Matrix and Adjacency-List
How would I go about figuring out if node k is adjacent to all other…

0xSina
- 20,973
- 34
- 136
- 253
0
votes
1 answer
Is Read-only property available in tree node in C#?
How to set tree node 'read only' in windows C#? Should not us disable, default.

Dhanapal
- 14,239
- 35
- 115
- 142
0
votes
2 answers
preventing duplicates when inserting nodes to treeview control
I want to create a hierarchical view of strings based on first two characters.
If the strings are:
AAAA,AAAA,BBDD,AABB,AACC,BBDD,BBEE
I want to reate a treeview that looks like this:
AA
AAAA
AABB
AACC
BB
BBDD
BBEE
I currently have…

epeleg
- 10,347
- 17
- 101
- 151
0
votes
1 answer
Conditional styling of PrimeNG TreeNodes using templates
I am well aware of how you can style all your nodes at the same time but I need to add one styling if the node is a leaf (the node has children) but no parent and if the node has a parent but no children.
Here is my code.

Casper Nybroe
- 1,179
- 3
- 23
- 47
0
votes
0 answers
How to use a Node pointer as a return type in a BST class?
I am new to C++ and I am confused as to why I cannot utilize Node* as a return type for functions in my BST class (I have to use it as a return type).
My guess is because Node class is not declared except for in 'private'?
Though I am not sure how…

SS Android
- 31
- 1
- 4
0
votes
2 answers
c++ Binary Search tree Deletion
So, my question is I don't understand why this doesn't work. I commented below where it is saying that parent is never initialized when it clearly is. Am I doing pointers wrong, am I getting the logic backwards am I so far off it would be better to…

varrick
- 91
- 1
- 2
- 6
0
votes
0 answers
d3 collapse tree - update node visualization
Hey im working with that example . Watch below for my modified Sourcecode.
Depending on the propertie "enabled" of a node it is coloured green or red.
nodeUpdate.select("circle")
.attr("r", 10)
…

freeFoodFred
- 23
- 1
- 10
0
votes
1 answer
Javascript: Need to remove a single instance of a class on the page when the id is generated
This title may be a little convoluted.... but here it goes.
I have this block of code. In the (I think it's called the parent) span, you can see the id is defined as qa_prdcmpr_qtyspan_0. There are 4 of those on a page (created as 0-3) to compare…

ResourceReaper
- 555
- 2
- 10
- 27
0
votes
2 answers
Loop through nodes of tree view from current selected
I have a tree view that has been built fine with no issues.
Is their a way to start looping through the nodes at the current selected node instead of looping through all of them?
TreeNodeCollection nodes = treeView.Nodes;
foreach (TreeNode n in…

JPJedi
- 1,498
- 7
- 32
- 58
0
votes
1 answer
Type Passing / Changing
public abstract class ASTNode3 extends ASTNode {
ASTNode child1;
ASTNode child2;
ASTNode child3;
public ASTNode3(ASTNode c1, ASTNode c2, ASTNode c3) {
child1 = c1;
child2 = c2;
child3 = c3;
}
public ASTNode…

ferronrsmith
- 1,110
- 5
- 28
- 47
0
votes
4 answers
String variable to a DefaultMutableTreeNode object?
Is it possible to convert a String variable to a DefaultMutableTreeNode object?
Please explain.
Context:
String s = new String(outputTagName);
Object s2 = (Object) s;
DefaultMutableTreeNode selectedNode2 =(DefaultMutableTreeNode)…

fixxxer
- 15,568
- 15
- 58
- 76