Forum Discussion

jomy's avatar
jomy
Occasional Contributor
14 years ago

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

  • 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());

    }

  • jomy's avatar
    jomy
    Occasional Contributor
    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

  • 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.