cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the Properties of controls inside a Java Viewport

jomy
Occasional Contributor

How to get the Properties of controls inside a Java Viewport

Hi,



     I am using a Java application.

    A Grid like control in placed inside a viewport, and i am not able to get the properties of this grid control.

    I added viewport's JavaFullClassName inside JavaFX, still i am unable to get the properties of the grid.

    How can i get the properties of this grid? ViewPort Screen & its corresponding Name mapping screenshot is attached.
3 REPLIES 3

RE: How to get the Properties of controls inside a Java Viewport

Hello Jomy,


You should be able to get the contents of the grid by using the CellRendererPane component's methods. For example:




crpane = viewport.SwingObject("Properties$9", "", 0).AWTObject("CellRendererPane", "", 0);

for (var i = 0; i < crpane.getComponentCount(); i++)

{

  Log.Message(crpane.getComponent(i).getName());

}


Best regards,
Alexey

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
jomy
Occasional Contributor

RE: How to get the Properties of controls inside a Java Viewport

Hi Allen,



         Still unable to get the total component count of viewport grid table. Here "crpane.getComponentCount();" returns "0".

 Object properties of Jviewport, Property$9 & Cellrendererpane are attached.



Thanks,

Jomy

RE: How to get the Properties of controls inside a Java Viewport


Hello Jomy,





Thank you for the screenshots





As far as I can see, the Gui.propertieView.Properties$9 object is a custom component that is used in your application. I guess, you need to analyze properties, fields and methods of the component to find a way to access cell values of the grid.
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors