Note that there are some explanatory texts on larger screens.

plurals
  1. POHave com.l2fprod.common.propertysheet.PropertySheetPanel To Display Composited Class
    primarykey
    data
    text
    <p>In order to have a Netbeans liked property inspector windows, I am making use of the following class to help me achieve this.</p> <p>com.l2fprod.common.propertysheet.PropertySheetPanel</p> <p>So far, it works fine for class with simple properties like String, int...</p> <p>However, when come to slightly complicated class with composited relationship, things get more complicated.</p> <p>For example, I have two animals (interface). One is Cat (Simple class with name and age) and Dog (Another simple class with name and age).</p> <p>It takes no effort to display them through GUI windows.</p> <p>However, when come to class with composited relationship. A Zoo, which can contains multiple animals (A class with array list to hold animals), I have problem to display all the animals properties within a single window.</p> <p>The following is the screen shoot</p> <p><a href="http://yancheng.cheok.googlepages.com/object-inspector.png" rel="noreferrer">alt text http://yancheng.cheok.googlepages.com/object-inspector.png</a></p> <p>Partial source code is shown here</p> <pre><code> ObjectInspectorJFrame objectInspectorJFrame0 = new ObjectInspectorJFrame(cat); objectInspectorJFrame0.setVisible(true); objectInspectorJFrame0.setState(java.awt.Frame.NORMAL); ObjectInspectorJFrame objectInspectorJFrame1 = new ObjectInspectorJFrame(dog); objectInspectorJFrame1.setVisible(true); objectInspectorJFrame1.setState(java.awt.Frame.NORMAL); // I wish to see all "animals" and their properties in this windows. :( // How? ObjectInspectorJFrame objectInspectorJFrame2 = new ObjectInspectorJFrame(zoo); objectInspectorJFrame2.setVisible(true); objectInspectorJFrame2.setState(java.awt.Frame.NORMAL); </code></pre> <p>Complete source code can be downloaded from </p> <p><a href="http://yancheng.cheok.googlepages.com/sandbox.zip" rel="noreferrer">http://yancheng.cheok.googlepages.com/sandbox.zip</a></p> <p>I wish within "Zoo" windows, it can display all the properties for all animals.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload