Questions tagged [treemodel]

109 questions
0
votes
1 answer

How to initiate a change event for a TreeModel in Java?

Suppose you got a JTree with a model that implements TreeModel, and all nodes implement TreeNode. Suppose then that something happens in the background with the model (not through the GUI) like a CRUD-event, that update the model and should update…
user2902165
  • 303
  • 2
  • 14
0
votes
1 answer

Refreshing JtreeModel does not work but Jtree updates accordingly

I am using org.dom4j.swing.DocumentTreeModel to construct a Swing Jtree from a parsed DOM document. When I edit the document which the treeModel is constructed from, I expect the Jtree to reflect this immediately by treeModel.reload(); The problem…
KJW
  • 15,035
  • 47
  • 137
  • 243
0
votes
1 answer

how to convert xml document parsed by org.dom4j.io.SAXReader into a visual Swing tree?

I have parsed an xml document using org.dom4j.io.SAXReader, is it possible to feed this into javax.swing.tree.TreeModel and generate a dynamically changing visual Swing JTree? For example, when I programmaticaly add or delete nodes, I want the…
KJW
  • 15,035
  • 47
  • 137
  • 243
0
votes
1 answer

FTP JTree of Directory and Files

I'm currently developing an application that will allow people to download the files from the online FTP repository, I have it connecting perfectly with Apache Commons, My only trouble is making a JTable out of it. I know how to create a JTree, My…
Thomas Nairn
  • 1,186
  • 8
  • 34
0
votes
1 answer

The working of model.insertNodeInto() function

I have a little confusion: Is the function insertNodeInto used to inserts only a single node and not its sub nodes? for example I have a code snippet as follows: DefaultMutableTreeNode newNode = new DefaultMutableTreeNode("topMost"); newNode.add(new…
aditya_gaur
  • 3,209
  • 6
  • 32
  • 43
0
votes
1 answer

TreeModel.parse pass array?

I'm using the TreeModel js library. It looks like the library supports passing a object that has a structure like... { id: 1, children: [{ id: 2, childre: [] }] } However, what if I have a tree structure that is an array like... [ { …
xspydr
  • 3,030
  • 3
  • 31
  • 49
0
votes
1 answer

tree-model-js get first siblings

Please find the tree var TreeModel = require('tree-model'); tree = new TreeModel(); rootMain = tree.parse( {id: 1, children: [ { id: "11", children: [{id: "111"}] }, { id: "12", …
Mukesh S
  • 367
  • 5
  • 19
0
votes
1 answer

Save the edited tree as a json object in the original format

let data = { "name": "root", "children": [{ "name": "analytics", "children": [{ "name": "cluster", "children": [{ "name": "AgglomerativeCluster", "size": 3938 }] }, { "name":…
Aki
  • 179
  • 2
  • 14
0
votes
2 answers

tree-model-js how to get previous node id

I wanted to know the previous visited node from tree. trying with below example var TreeModel = require('tree-model'); tree = new TreeModel(); rootMain = tree.parse({ id: 1, children: [ { id: "11", …
Mukesh S
  • 367
  • 5
  • 19
0
votes
1 answer

treemodel + skype-bots Cannot read property 'model' of undefined

I'm working on skype bot app. I have issue with read the node from tree-model. Tree-model example follow the children node but my node has diff tab to read by system. XML example-
Mukesh S
  • 367
  • 5
  • 19
0
votes
0 answers

Resolve dependency among custom objects

I have a List and each Object has integer 'id' and integer 'depends' parameter. This list then goes for some processing such that the objects which are not dependent on anyone will do the processing first and then next group of objects go…
sg0309
  • 1
  • 1
  • 3
0
votes
1 answer

Gtkd TreeModel ComboBox

I'm following the steps in this tutorial to create a TreeModel ComboBox in Gtkd (not gtkmm): https://developer.gnome.org/gtkmm-tutorial/stable/combobox-example-full.html.en But im really stuck with it. I think one way to set the ListStore to a…
Kamerad
  • 41
  • 1
  • 3
0
votes
1 answer

R: get nodes from root to leaves of a tree model?

I'm using R to make a regression tree model: library(party) mydata = read.csv(“data.csv”) TreeModel = ctree(price ~., data = mydata) I would like to extract the nodes of the tree from the root to any of the leaves. but I couldn't find any…
Alex
  • 1,914
  • 6
  • 26
  • 47
0
votes
1 answer

gtk2hs - Getting back a ListStore from a TreeView

I have a handle to a TreeView that happens to have a ListStore as its model. What I want to do is get back a handle to that ListStore from my handle to the TreeView. As pointed out here, the treeViewGetModel getter returns a generic TreeModel rather…
gameboo
  • 93
  • 1
  • 10
0
votes
1 answer

treemodel js logic architecture (theorical)

I'm really new a tree sctructure and linked list, I'm a facing a theorical problem, let's say I decide to use TreeModel, seeing the sample, you basically will order the tree like: Tree node 1 11 12 121 122 …
andresmijares
  • 3,658
  • 4
  • 34
  • 40