xref: /aoo4110/main/bean/com/sun/star/comp/beans/Frame.java (revision b1cdbd2c)
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 package com.sun.star.comp.beans;
25 
26 import com.sun.star.uno.UnoRuntime;
27 
28 /** Wrapper class for a com.sun.star.frame.XFrame.
29  *
30  * @since OOo 2.0.0
31  */
32 public class Frame
33 	extends Wrapper
34 	implements
35 		com.sun.star.frame.XFrame,
36 		com.sun.star.frame.XDispatchProvider,
37 		com.sun.star.frame.XDispatchProviderInterception
38 {
39 	private com.sun.star.frame.XFrame xFrame;
40 	private com.sun.star.frame.XDispatchProvider xDispatchProvider;
41 	private com.sun.star.frame.XDispatchProviderInterception xDispatchProviderInterception;
42 
Frame( com.sun.star.frame.XFrame xFrame )43 	public Frame( com.sun.star.frame.XFrame xFrame )
44 	{
45 		super( xFrame );
46 		this.xFrame = xFrame;
47 		xDispatchProvider = (com.sun.star.frame.XDispatchProvider)
48 			UnoRuntime.queryInterface( com.sun.star.frame.XDispatchProvider.class,
49 				xFrame );
50 		xDispatchProviderInterception = (com.sun.star.frame.XDispatchProviderInterception)
51 			UnoRuntime.queryInterface( com.sun.star.frame.XDispatchProviderInterception.class,
52 				xFrame );
53 	}
54 
55 	//==============================================================
56 	// com.sun.star.frame.XFrame
57 	//--------------------------------------------------------------
58 
initialize( com.sun.star.awt.XWindow xWindow )59 	public void initialize( /*IN*/com.sun.star.awt.XWindow xWindow )
60 	{
61 		xFrame.initialize( xWindow );
62 	}
63 
getContainerWindow( )64 	public com.sun.star.awt.XWindow getContainerWindow(  )
65 	{
66 		return xFrame.getContainerWindow();
67 	}
68 
setCreator( com.sun.star.frame.XFramesSupplier xCreator )69 	public void setCreator( /*IN*/ com.sun.star.frame.XFramesSupplier xCreator )
70 	{
71 		xFrame.setCreator( xCreator );
72 	}
73 
getCreator( )74 	public com.sun.star.frame.XFramesSupplier getCreator(  )
75 	{
76 		return xFrame.getCreator();
77 	}
78 
getName( )79 	public String getName(  )
80 	{
81 		return xFrame.getName();
82 	}
83 
setName( String aName )84 	public void setName( /*IN*/ String aName )
85 	{
86 		xFrame.setName( aName );
87 	}
88 
findFrame( String aTargetFrameName, int nSearchFlags )89 	public com.sun.star.frame.XFrame findFrame( /*IN*/String aTargetFrameName, /*IN*/int nSearchFlags )
90 	{
91 		return xFrame.findFrame( aTargetFrameName, nSearchFlags );
92 	}
93 
isTop( )94 	public boolean isTop(  )
95 	{
96 		return xFrame.isTop();
97 	}
98 
activate( )99 	public void activate(  )
100 	{
101 		xFrame.activate();
102 	}
103 
deactivate( )104 	public void deactivate(  )
105 	{
106 		xFrame.deactivate();
107 	}
108 
isActive( )109 	public boolean isActive(  )
110 	{
111 		return xFrame.isActive();
112 	}
113 
setComponent( com.sun.star.awt.XWindow xComponentWindow, com.sun.star.frame.XController xController )114 	public boolean setComponent( /*IN*/com.sun.star.awt.XWindow xComponentWindow, /*IN*/ com.sun.star.frame.XController xController )
115 	{
116 		return xFrame.setComponent( xComponentWindow, xController );
117 	}
118 
getComponentWindow( )119 	public com.sun.star.awt.XWindow getComponentWindow(  )
120 	{
121 		return xFrame.getComponentWindow();
122 	}
123 
getController( )124 	public com.sun.star.frame.XController getController(  )
125 	{
126 		return xFrame.getController();
127 	}
128 
contextChanged( )129 	public void contextChanged(  )
130 	{
131 		xFrame.contextChanged();
132 	}
133 
addFrameActionListener( com.sun.star.frame.XFrameActionListener xListener )134 	public void addFrameActionListener( /*IN*/ com.sun.star.frame.XFrameActionListener xListener )
135 	{
136 		xFrame.addFrameActionListener( xListener );
137 	}
138 
removeFrameActionListener( com.sun.star.frame.XFrameActionListener xListener )139 	public void removeFrameActionListener( /*IN*/ com.sun.star.frame.XFrameActionListener xListener )
140 	{
141 		xFrame.removeFrameActionListener( xListener );
142 	}
143 
144 	//==============================================================
145 	// com.sun.star.frame.XDispatchProvider
146 	//--------------------------------------------------------------
147 
queryDispatch( com.sun.star.util.URL aURL, String aTargetFrameName, int nSearchFlags )148 	public com.sun.star.frame.XDispatch queryDispatch(
149 			/*IN*/ com.sun.star.util.URL aURL,
150 			/*IN*/ String aTargetFrameName,
151 			/*IN*/ int nSearchFlags )
152 	{
153 		return xDispatchProvider.queryDispatch( aURL, aTargetFrameName, nSearchFlags );
154 	}
155 
queryDispatches( com.sun.star.frame.DispatchDescriptor[] aRequests )156 	public com.sun.star.frame.XDispatch[] queryDispatches(
157 			/*IN*/ com.sun.star.frame.DispatchDescriptor[] aRequests )
158 	{
159 		return xDispatchProvider.queryDispatches( aRequests );
160 	}
161 
162 	//==============================================================
163 	// com.sun.star.frame.XDispatchProviderInterception
164 	//--------------------------------------------------------------
165 
registerDispatchProviderInterceptor( com.sun.star.frame.XDispatchProviderInterceptor xInterceptor )166 	public void registerDispatchProviderInterceptor(
167 			/*IN*/ com.sun.star.frame.XDispatchProviderInterceptor xInterceptor )
168 	{
169 		xDispatchProviderInterception.registerDispatchProviderInterceptor( xInterceptor );
170 	}
171 
releaseDispatchProviderInterceptor( com.sun.star.frame.XDispatchProviderInterceptor xInterceptor )172 	public void releaseDispatchProviderInterceptor(
173 			/*IN*/ com.sun.star.frame.XDispatchProviderInterceptor xInterceptor )
174 	{
175 		xDispatchProviderInterception.releaseDispatchProviderInterceptor( xInterceptor );
176 	}
177 };
178 
179