I’ve created an extension, PLXButton, of JGoButton, currently all it does is extend JGoButton - no methods are overriden. All that the constructor of PLXButton does is call
super(new Rectangle(50,50), “PLX”);
My application has one JGoView and several documents and I use view.setDocument(…) to change whats displayed. All of this works fine. My JGoDocuments have various areas with nodes added to them and when I tell the view to swap documents everything works as expected. Howeverwhen I add my extension of JGoButton things go slightly wrong.
I have a class
SFPNode extends JGoIconicNode
and in the constructor of SFPNode I have
onOffBtn = new PLXButton();
Once the application has run up I see the all the nodes and the PLXButtons,
when I toggle the document I see the new document (and its PLXButtons) displayed correctly - however when I toggle back to the first document the PLXButtons are not shown ('tho they were shown initially) - similarly if I then go back to the second document it too has ‘lost’ its PLXButtons (but all the other nodes are fine).
I’m using JGo 521, Jave 150
Any thoughts ?