1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_sdb_ui_XTableUIProvider_idl__ 29#define __com_sun_star_sdb_ui_XTableUIProvider_idl__ 30 31#include <com/sun/star/graphic/XGraphic.idl> 32#include <com/sun/star/lang/IllegalArgumentException.idl> 33#include <com/sun/star/lang/WrappedTargetException.idl> 34 35//============================================================================= 36 37module com { module sun { module star { module sdb { module application { 38 39interface XDatabaseDocumentUI; 40 41//============================================================================= 42 43/** is used by the database application to obtain non-default user 44 interface information and/or components for database tables. 45 46 @see com::sun::star::sdb::Connection 47 48 @since OOo 2.2 49 */ 50interface XTableUIProvider 51{ 52 /** provides the icon which should be used to represent the table in the 53 database application window. 54 55 <p>The icon will usually be requested once per table, and cached. It 56 might be requested again if the application settings change, for instance, 57 if another desktop theme has been activated.</p> 58 59 @param TableName 60 denotes the fully qualified name of the database table. 61 62 @param ColorMode 63 denotes the color mode of the graphic to retrieve, being one of the 64 <type scope="com::sun::star::graphic">GraphicColorMode</type> constants. 65 @return 66 the icon which should be used to represent the table in the 67 database application window, or <NULL/> if the default icon 68 should be used. 69 */ 70 com::sun::star::graphic::XGraphic getTableIcon( 71 [in] string TableName, [in] long ColorMode ); 72 73 /** returns a component which can be used to edit the definition of an 74 existing table. 75 76 @param DocumentUI 77 provides access to the UI in which the database document is 78 currently displayed.<br/> 79 In particular, this paramter provides access to the application's main 80 window, which is needed in case the table editor should be a dialog. 81 82 @param TableName 83 denotes the fully qualified name of an existing table. 84 85 @return 86 a component which can be used to edit the definition of an 87 existing table, or <NULL/> if the default component should 88 be used.<br/> 89 Two component types are supported so far 90 <ul><li>modal dialogs<br/> 91 If the returned component supports the 92 <type scope="com::sun::star::ui::dialogs">XExecutableDialog</type> 93 interface, the dialog will be executed modally.</li> 94 <li>modeless frames<br/> 95 If the returned component supports the 96 <type scope="com::sun::star::frame">XController</type> 97 interface, it is assumed that it represents a controller, 98 loaded into a new frame, which is a modeless and, in its lifetime, 99 depends on the application main window.</li> 100 </ul> 101 If the returned component does not support any of the above-mentioned 102 interfaces, it's discarded. 103 104 @throws ::com::sun::star::lang::IllegalArgumentException 105 if the given <arg>TableName</arg> does not denote an existing table 106 107 @throws ::com::sun::star::lang::WrappedTargetException 108 if an error occures while creating the table editor component. 109 */ 110 com::sun::star::uno::XInterface getTableEditor( 111 [in] XDatabaseDocumentUI DocumentUI, 112 [in] string TableName ) 113 raises (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException); 114}; 115 116//============================================================================= 117 118}; }; }; }; }; 119 120//============================================================================= 121 122#endif 123 124