Hej forum
I am looking for the pixels dimensions of the view available for change in a program node and installation node.
also the difference between CB and e series.
Thanks in advance.
Hej forum
I am looking for the pixels dimensions of the view available for change in a program node and installation node.
also the difference between CB and e series.
Thanks in advance.
Hi @silar17
You will see that in the “View” class for both the Program Node and the Installation Node, you have the following method:
buildUI(JPanel panel, InstallationNodeContribution contribution)
{
... methodBody ...
}
The JPanel passed to this method by polyscope is the display area that you have to work with, so if you save that JPanel
to a field, once polyscope has been initialised, you will be able to find the size of the JPanel
and thus the viewing area by using System.out.println(panel.getSize());
(line will be printed to the terminal that is running polyscope)
I suspect if you call panel.getSize()
during buildUI()
then it will return [0, 0] since the panel is not yet visible (since buildUI()
is called during the initialisation of polyscope.
Hope this helps.
Thanks @sam.verity-hilton
I will try this solution and return with the results
it worked
CB:
Installation node width = 615, height = 435
Program node width = 606, height = 407
e:
Installation node width = 1078, height = 626
Program node width = 705, height = 540