1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: PropertyBrowserController.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_form_PropertyBrowserController_idl__
32 #define __com_sun_star_form_PropertyBrowserController_idl__
34 #ifndef __com_sun_star_frame_XController_idl__
35 #include
<com
/sun
/star
/frame
/XController.idl
>
38 #ifndef __com_sun_star_beans_XPropertySet_idl__
39 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
42 #ifndef __com_sun_star_beans_XFastPropertySet_idl__
43 #include
<com
/sun
/star
/beans
/XFastPropertySet.idl
>
46 #ifndef __com_sun_star_beans_XMultiPropertySet_idl__
47 #include
<com
/sun
/star
/beans
/XMultiPropertySet.idl
>
50 //=============================================================================
52 module com
{ module sun
{ module star
{ module form
{
54 //=============================================================================
56 /** describes a controller which can be used to browse and modify properties of form controls.
58 <p>The controller can be plugged into an <type scope="com::sun::star::frame">XFrame</type>, and will
59 provide a visual component for inspecting control properties. This means it allows to interactively control
60 several aspects of a <type>FormControlModel</type> or <type>DataAwareControlModel</type>, such as it's
61 data binding, it's layout, and it's event binding</p>
63 <p>For using a PropertyBrowserController, you need to
64 <ul><li>instatiate it at a service factory of your choice</li>
65 <li>attach it to an empty frame of your choice</li>
66 <li>set the IntrospectedObject property to the control model which you wish to analyze</li>
72 XFrame xFrame = getNewEmptyFrame();
73 XMultiServiceFactory xORB = getORB();
74 XPropertySet xControlModel = getMyControlModel();
76 // instantiate the controller
77 XController xController = (XController)UnoRuntime.queryInterface( XController.class,
78 xORB.createInstance( "com.sun.star.form.PropertyBrowserController" ) );
80 // marry the controller and the frame. This will cause the controller
81 // to create a visual component within the frame to inspect our object
82 xController.attachFrame( xFrame )
84 // tell the controller which object to inspect
85 XPropertySet xControllerProps = (XPropertySet)UnoRuntime.queryInterface(
86 XPropertySet.class, xController );
88 xControllerProps.setPropertyValue( "IntrospectedObject", xControlModel );
91 @see com::sun::star::frame::XController
94 <p>Note that nowadays, this service is only a legacy wrapper using the
95 <type scope="com::sun::star::inspection">ObjectInspector</type> and the
96 <type scope="com::sun::star::form::inspection">DefaultFormComponentInspectorModel</type> services, and knitting them together.</p>
99 published service PropertyBrowserController
101 /** contains the object to inspect.
103 <p>Changing this property from outside causes the controller to update it's view
104 with the data of the new object</p>
106 [property
] com
::sun
::star
::beans
::XPropertySet IntrospectedObject
;
108 /** controls the actually visible page.
110 <p>The aspects of a <type>DataAwareControlModel</type> which can be browsed and modified
111 using this controller can be separated into 3 groups: common aspects, data-awareness
112 related aspects, and bound events.</br>
113 The appearance of the visual component created by the controller is that 3 tab pages, one for
114 each group, are displayed (of course if the control does not support any aspects of a given group,
115 the group is omitted).<br/>
116 With this property, it can be controller which page is currently acticve.</p>
118 <p>Valid values are (this list may be extended in the future):
124 [property
] string CurrentPage
;
126 /** ensures the basic functionality for a controller.
128 <p>With supporting this interface, the component is able to operate in (and provide content
129 for) an <type scope="com::sun::star::frame">XFrame</type>.</p>
131 interface com
::sun
::star
::frame
::XController
;
133 /** allows to access the properties of the object
135 interface com
::sun
::star
::beans
::XPropertySet
;
137 /** allows to access the properties via indicies
139 interface com
::sun
::star
::beans
::XFastPropertySet
;
141 /** allows to access more than one property of the object at the same time
143 interface com
::sun
::star
::beans
::XMultiPropertySet
;
146 //=============================================================================