I may interprete your idea right: you want to convert your GModel to serveral Views at once. That’s in one tab is XML, beside is Nifty, other tab is Tonegod, … That’s what i also trying to do.
DataObject is a facade of Data, which in turn can be seen as Model in MVC (actually DCI). If you link your Data directly with a View (NiftyView or Nifty), you basicly not doing MVC the right way. There should be a Mediator called Controller somewhere, do you agree?
DataObject linked with Nifty can also be seen as ViewModel, which is a special case of MVC but you lose a lot of control over this coupled things, its internal interactions, its event mechanism… Remember later you may want to intercept some basic Event for testing or to do wiring on Element.
[If you don’t know what Wiring mean] Did you ever use Matisse, the Netbean GUI editor, which is a standard of GUI tool in Java world. It has a feature: when you click a Button, a dialog open and ask for a control method, that kind of direct code and data inteprop is call wiring. Some GUI prototyping program also has this feature and other interaction declare in design time. I think you may later want this feature in NiftyEditor also [I can help of course :)].
Edit: If you talking about the connection between the DataObject->MimeType->TopComponent through XML declaration or annotations… I don’t see a solid link to Nifty instance yet. Remember you TopComponent can contain Nifty, Tonegod or other decided at its active moment. You may also notice that the MultiviewElement is actually a proxy for TopComponent which is actually a embed view with TopComponent as its parent.
I think a combined gui editor for multiple gui libs is a silly idea. I never saw such a thing and I don't think its possible while keeping the development time reasonable.
It’s not silly at all. And Java devs actually do it for years in enterprise system. I don’t want to talk big and unrealistic which out of gamedev purpose but that’s a fact. At least abstract out the concept of the GUI model and its editor will help @relucri to understand the DCI architecture of Netbean API more in his way to making the editor.
GUI libraries are quite similar to each other. OF COURSE, Making one interface for various implemented GUI libraries are quite imposible if there are too much internal constrainsts and conner case designs… But thank for the clean and popular of the specification of those libraries i want to support (Swing, SWT, HTML, Nifty, Tonegod…), I can map them with my model and use code generation to make Java or XML file. For the mean time, I just consider making a “base” - not a library to work with all the libs. The base it’s a bunch of classes generic enough to be copied to other Netbean module if need. So beside of just support NiftyGUI, I can also copy them to make Tonegod Editor for example.
The most important reason to have multi GUI libs is the different usages and requirement:
Nifty is quite inefficient enough for Android but good enough for desktop, has XML support which later can be translate to quite a bunch of other things (Swing, HTML, JavaFX…). Nifty can also put services for extension like JME3, LibGDX…
Tonegod is native to JME3 and has quite impressive performance which can work in both desktop, Android and later can become embed GUI to replace Swing components for editing enviroment.
What i want is to draw one GUI model, then the implemented code and XML, etc are generated for me. I can make it immediately work as ingame editor GUI in the SceneComposer for example. Unity for example rely in this feature a lot to expand their framework.
Hope you may see my point.