Bridging the gap Fri, Oct 17. 2008
Ok, first small victories.
The last few days I spent analysing the VisualAp code structure and how everything fits together. The business-logic is different to the one I'll be using, although the basic workings are very very similar. So what I did is trying to find common points and to make the implementation in VisualAp more abstract. I tried to change as few as possible, I should contact the author of visualap. It's open source, so no problem there, but maybe he finds some of my changes usefull.
The basic structure in VisualAp is like this: you got a Bean, a small jar file, which is read and which contains the functions that are offered by this unit. This bean is encapsulated in a BeanDelegate. This beandelegate is stored in an array. The BeanDelegate was split into a Delegate Interface and the usual BeanDelegate for VisualAp and my NodeDelegate for ImageFlow. This is one example.
Another one would be, how to draw the flow-graph. That was much more tricky, because of different dependencies. First, the graph is painted by the GPanel, this accesses the list of BeanDelegates, as well as a list of all Nodes. I had to change a few things in the GPanel, so I can actually access the Node-list, add my own nodes, which extend the same Nodes-Interface as VisualAp. My nodes then get some nice new painting-methods, that I mentioned in the post before. So I create a UnitElement, I add it to a new Node, which has an origin on the panel and this Node draws it's NodeIcon. VisualAp already brings functions to select and move it. Very nice.
Actually, I wanted to post a screenshot, but a screenshot doesn't show anything, except for the things I showed in the last post.
Well anyway …

Next thing will be to extend this. Now it's only one single node, I'll add more and work on the methods to connect them.
May aim is to have a fully working graph asap. This means I have a bunch of nodes, I can connect them and somewhere a run button.
The last few days I spent analysing the VisualAp code structure and how everything fits together. The business-logic is different to the one I'll be using, although the basic workings are very very similar. So what I did is trying to find common points and to make the implementation in VisualAp more abstract. I tried to change as few as possible, I should contact the author of visualap. It's open source, so no problem there, but maybe he finds some of my changes usefull.
The basic structure in VisualAp is like this: you got a Bean, a small jar file, which is read and which contains the functions that are offered by this unit. This bean is encapsulated in a BeanDelegate. This beandelegate is stored in an array. The BeanDelegate was split into a Delegate Interface and the usual BeanDelegate for VisualAp and my NodeDelegate for ImageFlow. This is one example.
Another one would be, how to draw the flow-graph. That was much more tricky, because of different dependencies. First, the graph is painted by the GPanel, this accesses the list of BeanDelegates, as well as a list of all Nodes. I had to change a few things in the GPanel, so I can actually access the Node-list, add my own nodes, which extend the same Nodes-Interface as VisualAp. My nodes then get some nice new painting-methods, that I mentioned in the post before. So I create a UnitElement, I add it to a new Node, which has an origin on the panel and this Node draws it's NodeIcon. VisualAp already brings functions to select and move it. Very nice.
Actually, I wanted to post a screenshot, but a screenshot doesn't show anything, except for the things I showed in the last post.
Well anyway …

First view of the Imageflow application
Next thing will be to extend this. Now it's only one single node, I'll add more and work on the methods to connect them.
May aim is to have a fully working graph asap. This means I have a bunch of nodes, I can connect them and somewhere a run button.
« previous page
(Page 1 of 1, totaling 1 entries)
next page »
