/* ------------------------------------------------------------------ */
private XObjectInspector createObjectInspector() throws com.sun.star.uno.Exception
{
com.sun.star.awt.XWindow floatingWindow = createFloatingWindow();
Frame inspectorFrame = new Frame( m_orb.createInstance( "com.sun.star.frame.Frame" ) );
inspectorFrame.setName( m_inspectorFrameName );
inspectorFrame.initialize( floatingWindow );
m_desktop.getFrames().append( inspectorFrame.getXFrame() );
// handler factories:
Object[] handlerFactories = new Object[] {
"com.sun.star.inspection.GenericPropertyHandler",
new ComponentFactory( ServicesHandler.class ),
new ComponentFactory( MethodHandler.class )
};
// a model
XObjectInspectorModel model = ObjectInspectorModel.createWithHandlerFactoriesAndHelpSection(
m_context, handlerFactories, 4, 4 );
// create the ObjectInspector
XObjectInspector inspector = com.sun.star.inspection.ObjectInspector.createWithModel(
m_context, model );
// add an observer which will emit help texts
new HelpTextProvider( inspector.getInspectorUI() );
// plug it into the frame
inspector.attachFrame( inspectorFrame.getXFrame() );
// make the window visible
floatingWindow.setVisible( true );
// outta here