Inspecting Your AbleBean

You can add your own custom inspector to the text and graphic inspectors that Able provides. In the beaninfo file, the inspector name is used both as the key in a hashtable, and the text to appear on the cascading menu. The inspector class name is the hashtable object and is called when your inspector is selected from the context menu to format and display the desired values of object.

Custom inspectors are added to the Bean Descriptor by adding their name and class to a hashtable with a bean property name of "able-custom-inspectors". Here is an example:

Hashtable lclCustomInspectors = new Hashtable();
lclCustomInspectors.put("Fuzzy Set Inspector", "com.ibm.able.beans.fuzzy.FsGuiSetInspector");
lclCustomInspectors.put("Fuzzy Rule Inspector", "com.ibm.able.beans.fuzzy.FsGuiRuleInspector");
lclBeanDescriptor.setValue("able-custom-inspectors", lclCustomInspectors);

The object will be passed in as the sole parameter of the class constructor. The class must implement the PropertyChangeListener interface.

Property change events will be issued when values change, and the inspector needs to refresh its panel as appropriate using data from the reference to the object passed on the constructor.