|
I am creating a graphical "glue-code" application where users can pull programs from a palette window onto the main workspace. The application's job is to control the flow of data from one application to the next; feeding output(s) from one node as inputs to the next node(s). The user would specify data flow through arrows between nodes in the graph.
I have the palette, drag-drop functionality, and the workspace is coming together (thanks to several great tutorials). I am working now on the structure of the nodes required and their interaction with the Explorer API. ![]() This image shows what I am trying to work towards: 1) A node added to the workspace will be added to the explorer with the inputs/outputs of the node exposed 2) The ability to add an image to the explorer line item to show the user that the value is an input or an output. 3) The ability to edit inputs in the explorer (the green values) where double-clicking on the number would make it editable. 4) When a node is selected in the workspace, I'd like the node represented in the explorer to be selected and expanded to show the inputs/outputs. 5) Node in the image can be run and will use the inputs to update its output values. I'm looking for feedback if possible on how to implement these ideas through the Netbeans Platform. Best regards, Richard |
|
Hi Richard, Best wishes, Hermien PELLISSIER On Mon, Feb 6, 2012 at 7:11 PM, rotero <[hidden email]> wrote: I am creating a graphical "glue-code" application where users can pull |
|
The following tutorials should also be useful:
On Mon, Feb 6, 2012 at 10:55 PM, Hermien Pellissier <[hidden email]> wrote:
|
|
Thank you, those tutorials were helpful and did get me closer to my goal and a better understanding of the platform.
![]() The code I currently have produces the above, where I pull a node from an available palette window. I'm still trying to do the things below: ################################# 1) A node added to the workspace will be added to the explorer with the inputs/outputs of the node exposed Should I place every node placed into the Workspace into that object's lookup? Then have the explorer look though the global lookup and, when the Workspace is selected, it'll be able to see the available nodes and add them as children to the graph node? I want to be able to show each input/output variable in the wrapper node on the explorer window. To me, that seems to imply that I need to have the variables be nodes contained within each wrapper node. ################################# 2) The ability to add an image to the explorer line item to show the user that the value is an input or an output. This was answered nicely in the tutorials you sent thank you. ################################# 3) The ability to edit inputs in the explorer (the green values) where double-clicking on the number would make it editable. I had thought extending PropertySupport.ReadWrite for the node would make the value editable but something seems to be wrong with the way I'm doing it. The current values are not shown in the explorer window and the boxes can't be edited. I've included the code used for clarity. ######## ExplorerTopComponent ##################### ######## WrapperNode ##################### Thank you again for your earlier responses. Richard |
|
It is running on a week since the following post.
Does anyone have an idea regarding how/why: 1) I could expose nodes added to a Editor TopComponent, through a palette window, by making them also appear in the explorer TopComponent OutlineView. 3) I wouldn't be getting access to values I try to make available through PropertySupport.ReadWrite? (Code below) Please let me know if you would need to see more code. I was trying to keep it short and to the point. Thanks, Richard More info below:
|
|
Well, I solve my own issue. In case anyone else is interested:
1) The child factory for the root node is going to look for all bean nodes in the workspace (through a lookup) and add them as children. These children will have a different child factory that will show their variables as nodes in the explorer window. 3) When I wanted to expose bean values for read/write using a beannode: - I did not have to overwrite createsheet - I did not have to create a class extending PropertySupport.ReadWrite - All I needed to do was: // Add a new outline view to have a tree table for the explorer window OutlineView pane = new OutlineView(); ((OutlineView) pane).setPropertyColumns("value", "Current Value", "units", "Units Used"); add (pane, BorderLayout.CENTER); Where 'value' and 'units' were the names of the two properties I wanted exposed for viewing/editing in the explorer window. The explorer window does need to implement ExplorerManager.Provider, needs to contain an ExplorerManager, and override getExplorerManager but that is shown in the tutorials referenced in this thread. Hope that helps, Richard |
| Powered by Nabble | See how NAML generates this page |
