merge the formfield patch from ooo-build
[ooovba.git] / bean / com / sun / star / comp / beans / Frame.java
blob099b659519a630e5952661787c3926c3bab2a7f4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Frame.java,v $
10 * $Revision: 1.4 $
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 package com.sun.star.comp.beans;
33 import com.sun.star.uno.UnoRuntime;
35 /** Wrapper class for a com.sun.star.frame.XFrame.
37 * @since OOo 2.0.0
39 public class Frame
40 extends Wrapper
41 implements
42 com.sun.star.frame.XFrame,
43 com.sun.star.frame.XDispatchProvider,
44 com.sun.star.frame.XDispatchProviderInterception
46 private com.sun.star.frame.XFrame xFrame;
47 private com.sun.star.frame.XDispatchProvider xDispatchProvider;
48 private com.sun.star.frame.XDispatchProviderInterception xDispatchProviderInterception;
50 public Frame( com.sun.star.frame.XFrame xFrame )
52 super( xFrame );
53 this.xFrame = xFrame;
54 xDispatchProvider = (com.sun.star.frame.XDispatchProvider)
55 UnoRuntime.queryInterface( com.sun.star.frame.XDispatchProvider.class,
56 xFrame );
57 xDispatchProviderInterception = (com.sun.star.frame.XDispatchProviderInterception)
58 UnoRuntime.queryInterface( com.sun.star.frame.XDispatchProviderInterception.class,
59 xFrame );
62 //==============================================================
63 // com.sun.star.frame.XFrame
64 //--------------------------------------------------------------
66 public void initialize( /*IN*/com.sun.star.awt.XWindow xWindow )
68 xFrame.initialize( xWindow );
71 public com.sun.star.awt.XWindow getContainerWindow( )
73 return xFrame.getContainerWindow();
76 public void setCreator( /*IN*/ com.sun.star.frame.XFramesSupplier xCreator )
78 xFrame.setCreator( xCreator );
81 public com.sun.star.frame.XFramesSupplier getCreator( )
83 return xFrame.getCreator();
86 public String getName( )
88 return xFrame.getName();
91 public void setName( /*IN*/ String aName )
93 xFrame.setName( aName );
96 public com.sun.star.frame.XFrame findFrame( /*IN*/String aTargetFrameName, /*IN*/int nSearchFlags )
98 return xFrame.findFrame( aTargetFrameName, nSearchFlags );
101 public boolean isTop( )
103 return xFrame.isTop();
106 public void activate( )
108 xFrame.activate();
111 public void deactivate( )
113 xFrame.deactivate();
116 public boolean isActive( )
118 return xFrame.isActive();
121 public boolean setComponent( /*IN*/com.sun.star.awt.XWindow xComponentWindow, /*IN*/ com.sun.star.frame.XController xController )
123 return xFrame.setComponent( xComponentWindow, xController );
126 public com.sun.star.awt.XWindow getComponentWindow( )
128 return xFrame.getComponentWindow();
131 public com.sun.star.frame.XController getController( )
133 return xFrame.getController();
136 public void contextChanged( )
138 xFrame.contextChanged();
141 public void addFrameActionListener( /*IN*/ com.sun.star.frame.XFrameActionListener xListener )
143 xFrame.addFrameActionListener( xListener );
146 public void removeFrameActionListener( /*IN*/ com.sun.star.frame.XFrameActionListener xListener )
148 xFrame.removeFrameActionListener( xListener );
151 //==============================================================
152 // com.sun.star.frame.XDispatchProvider
153 //--------------------------------------------------------------
155 public com.sun.star.frame.XDispatch queryDispatch(
156 /*IN*/ com.sun.star.util.URL aURL,
157 /*IN*/ String aTargetFrameName,
158 /*IN*/ int nSearchFlags )
160 return xDispatchProvider.queryDispatch( aURL, aTargetFrameName, nSearchFlags );
163 public com.sun.star.frame.XDispatch[] queryDispatches(
164 /*IN*/ com.sun.star.frame.DispatchDescriptor[] aRequests )
166 return xDispatchProvider.queryDispatches( aRequests );
169 //==============================================================
170 // com.sun.star.frame.XDispatchProviderInterception
171 //--------------------------------------------------------------
173 public void registerDispatchProviderInterceptor(
174 /*IN*/ com.sun.star.frame.XDispatchProviderInterceptor xInterceptor )
176 xDispatchProviderInterception.registerDispatchProviderInterceptor( xInterceptor );
179 public void releaseDispatchProviderInterceptor(
180 /*IN*/ com.sun.star.frame.XDispatchProviderInterceptor xInterceptor )
182 xDispatchProviderInterception.releaseDispatchProviderInterceptor( xInterceptor );