1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_sdb_ui_XTableUIProvider_idl__ 25#define __com_sun_star_sdb_ui_XTableUIProvider_idl__ 26 27#include <com/sun/star/graphic/XGraphic.idl> 28#include <com/sun/star/lang/IllegalArgumentException.idl> 29#include <com/sun/star/lang/WrappedTargetException.idl> 30 31//============================================================================= 32 33module com { module sun { module star { module sdb { module application { 34 35interface XDatabaseDocumentUI; 36 37//============================================================================= 38 39/** is used by the database application to obtain non-default user 40 interface information and/or components for database tables. 41 42 @see com::sun::star::sdb::Connection 43 44 @since OpenOffice 2.2 45 */ 46interface XTableUIProvider 47{ 48 /** provides the icon which should be used to represent the table in the 49 database application window. 50 51 <p>The icon will usually be requested once per table, and cached. It 52 might be requested again if the application settings change, for instance, 53 if another desktop theme has been activated.</p> 54 55 @param TableName 56 denotes the fully qualified name of the database table. 57 58 @param ColorMode 59 denotes the color mode of the graphic to retrieve, being one of the 60 <type scope="com::sun::star::graphic">GraphicColorMode</type> constants. 61 @return 62 the icon which should be used to represent the table in the 63 database application window, or <NULL/> if the default icon 64 should be used. 65 */ 66 com::sun::star::graphic::XGraphic getTableIcon( 67 [in] string TableName, [in] long ColorMode ); 68 69 /** returns a component which can be used to edit the definition of an 70 existing table. 71 72 @param DocumentUI 73 provides access to the UI in which the database document is 74 currently displayed.<br/> 75 In particular, this paramter provides access to the application's main 76 window, which is needed in case the table editor should be a dialog. 77 78 @param TableName 79 denotes the fully qualified name of an existing table. 80 81 @return 82 a component which can be used to edit the definition of an 83 existing table, or <NULL/> if the default component should 84 be used.<br/> 85 Two component types are supported so far 86 <ul><li>modal dialogs<br/> 87 If the returned component supports the 88 <type scope="com::sun::star::ui::dialogs">XExecutableDialog</type> 89 interface, the dialog will be executed modally.</li> 90 <li>modeless frames<br/> 91 If the returned component supports the 92 <type scope="com::sun::star::frame">XController</type> 93 interface, it is assumed that it represents a controller, 94 loaded into a new frame, which is a modeless and, in its lifetime, 95 depends on the application main window.</li> 96 </ul> 97 If the returned component does not support any of the above-mentioned 98 interfaces, it's discarded. 99 100 @throws ::com::sun::star::lang::IllegalArgumentException 101 if the given <arg>TableName</arg> does not denote an existing table 102 103 @throws ::com::sun::star::lang::WrappedTargetException 104 if an error occures while creating the table editor component. 105 */ 106 com::sun::star::uno::XInterface getTableEditor( 107 [in] XDatabaseDocumentUI DocumentUI, 108 [in] string TableName ) 109 raises (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException); 110}; 111 112//============================================================================= 113 114}; }; }; }; }; 115 116//============================================================================= 117 118#endif 119 120