Screenshoot of the Netbeans Mobility Navigator Window
Most of the Inspector API is placed in module VMD Inspector (vmd.inspector) also in VMD MIDP (vmd.midp) and VMD MIDPNB (vmd.midpnb). Most important class of this API:
To enable this functionality it's necessary to add both presenters ( InspectorPositioningControllerPresener and InspectorFolderPresenter) to the ComponentDescriptor class in the presenter section.
Common inspector presenter pattern in ComponentDescriptor:
1) Example of the DesignComponent shown in the Mobile Navigator tree.
Part of the ComponentDescriptorClass
protected List<? extends Presenter> createPresenters () {
return Arrays.asList (
....
// inspector
new InspectorFolderComponentPresenter(true), //Creates InspectorFolder based on the DesignComponent and creates new InspectorFolderComponentPresenter
InspectorPositionPresenter.create(new DisplayablePC()), //Creates InspectorPositionPresenter and InspectorPositionController
....
);
}
2) Example of the virtual folder(node) shown in the Mobile Navigator tree which does not represent any DesignComponent
Part of the ComponentDescriptorClass
protected List<? extends Presenter> createPresenters () {
return Arrays.asList (
....
// inspector
//This factor method creates category folder for Items (shown above on the screen shot as "Items")
MidpInspectorSupport.createComponentElementsCategory(NbBundle.getMessage(FormCD.class, "DISP_InspectorCategory_Items"), createOrderingArrayController() , ItemCD.TYPEID),
....
);
}
In most of the cases component developer should reuse implementation of this classes available in modules vmd.inspector, vmd.midp and vmd.midpnb. When it's not possible and InspectorFolder requires different functionality then developer should consider to provide it's own implementation of thees classes. VMD MIDP as well VMD MIDPNB contain many examples of implementation of this classes.
Exists many examples of usage this API mostly in VMD MIDP and VMD MIDPNB
some of them: VMD MIDP:
VMD MIDPNB
contact: Karol Harezlak
| navigator.jpg | ![]() |
39817 bytes |