1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __com_sun_star_form_PropertyBrowserController_idl__
29 #define __com_sun_star_form_PropertyBrowserController_idl__
31 #ifndef __com_sun_star_frame_XController_idl__
32 #include
<com
/sun
/star
/frame
/XController.idl
>
35 #ifndef __com_sun_star_beans_XPropertySet_idl__
36 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
39 #ifndef __com_sun_star_beans_XFastPropertySet_idl__
40 #include
<com
/sun
/star
/beans
/XFastPropertySet.idl
>
43 #ifndef __com_sun_star_beans_XMultiPropertySet_idl__
44 #include
<com
/sun
/star
/beans
/XMultiPropertySet.idl
>
47 //=============================================================================
49 module com
{ module sun
{ module star
{ module form
{
51 //=============================================================================
53 /** describes a controller which can be used to browse and modify properties of form controls.
55 <p>The controller can be plugged into an <type scope="com::sun::star::frame">XFrame</type>, and will
56 provide a visual component for inspecting control properties. This means it allows to interactively control
57 several aspects of a <type>FormControlModel</type> or <type>DataAwareControlModel</type>, such as it's
58 data binding, it's layout, and it's event binding</p>
60 <p>For using a PropertyBrowserController, you need to
61 <ul><li>instatiate it at a service factory of your choice</li>
62 <li>attach it to an empty frame of your choice</li>
63 <li>set the IntrospectedObject property to the control model which you wish to analyze</li>
69 XFrame xFrame = getNewEmptyFrame();
70 XMultiServiceFactory xORB = getORB();
71 XPropertySet xControlModel = getMyControlModel();
73 // instantiate the controller
74 XController xController = (XController)UnoRuntime.queryInterface( XController.class,
75 xORB.createInstance( "com.sun.star.form.PropertyBrowserController" ) );
77 // marry the controller and the frame. This will cause the controller
78 // to create a visual component within the frame to inspect our object
79 xController.attachFrame( xFrame )
81 // tell the controller which object to inspect
82 XPropertySet xControllerProps = (XPropertySet)UnoRuntime.queryInterface(
83 XPropertySet.class, xController );
85 xControllerProps.setPropertyValue( "IntrospectedObject", xControlModel );
88 @see com::sun::star::frame::XController
91 <p>Note that nowadays, this service is only a legacy wrapper using the
92 <type scope="com::sun::star::inspection">ObjectInspector</type> and the
93 <type scope="com::sun::star::form::inspection">DefaultFormComponentInspectorModel</type> services, and knitting them together.</p>
96 published service PropertyBrowserController
98 /** contains the object to inspect.
100 <p>Changing this property from outside causes the controller to update it's view
101 with the data of the new object</p>
103 [property
] com
::sun
::star
::beans
::XPropertySet IntrospectedObject
;
105 /** controls the actually visible page.
107 <p>The aspects of a <type>DataAwareControlModel</type> which can be browsed and modified
108 using this controller can be separated into 3 groups: common aspects, data-awareness
109 related aspects, and bound events.</br>
110 The appearance of the visual component created by the controller is that 3 tab pages, one for
111 each group, are displayed (of course if the control does not support any aspects of a given group,
112 the group is omitted).<br/>
113 With this property, it can be controller which page is currently acticve.</p>
115 <p>Valid values are (this list may be extended in the future):
121 [property
] string CurrentPage
;
123 /** ensures the basic functionality for a controller.
125 <p>With supporting this interface, the component is able to operate in (and provide content
126 for) an <type scope="com::sun::star::frame">XFrame</type>.</p>
128 interface com
::sun
::star
::frame
::XController
;
130 /** allows to access the properties of the object
132 interface com
::sun
::star
::beans
::XPropertySet
;
134 /** allows to access the properties via indicies
136 interface com
::sun
::star
::beans
::XFastPropertySet
;
138 /** allows to access more than one property of the object at the same time
140 interface com
::sun
::star
::beans
::XMultiPropertySet
;
143 //=============================================================================