You can compile and automatically push into URSim without needing to manually install the URCap file every time using
mvn install -P ursim
It’s also possible to modify your java project to allow it to run in Eclipse and display just your GUI window to give you some idea of how the layout will look… but I don’t remember the specifics. If this would be helpful we can find someone to explain it.
In your View-class, you could add a new main, that would allow you to start just the View-class from Eclipse, to see how your components are looking.
Naturally, the limitation is, that there is no linking to PolyScope, so anything pulled from the API og the Contribution (i.e. dropdown list content, keyboards etc.) will not work.
I.e. add something like:
public static void main(String... args) {
int margin = 8;
Style style = new V5Style();
//Style style = new V3Style();
JPanel jPanel = new JPanel();
jPanel.setBorder(BorderFactory.createEmptyBorder(margin, margin, margin, margin));
new MyViewClass(null, style).buildUI(jPanel, null);
JFrame jFrame = new JFrame();
jFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
jFrame.add(jPanel);
jFrame.setPreferredSize(style.getInstallationNodeSize());
jFrame.setVisible(true);
jFrame.pack();
}
Hi @jbm ,
thanks for your input, it works well without style unable to instantiate with V5Style. thus i am not able to get the Jframe size how do i solve this.
or what is the preferred jframe size.
The approach kind of works for me, thanks.
However, the style class does not have a “getInstallationNodeSize()” Function. It only provides “getInputFieldSize” which is probably just a wrong size.
Anyways, I can manually pull the window to some size that gives me an impression how it would look.
It works only for very simple setups, since the NodeContribution is not used and thus no connection to any data model.