1*113d1ee9SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*113d1ee9SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*113d1ee9SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*113d1ee9SAndrew Rist * distributed with this work for additional information 6*113d1ee9SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*113d1ee9SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*113d1ee9SAndrew Rist * "License"); you may not use this file except in compliance 9*113d1ee9SAndrew Rist * with the License. You may obtain a copy of the License at 10*113d1ee9SAndrew Rist * 11*113d1ee9SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*113d1ee9SAndrew Rist * 13*113d1ee9SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*113d1ee9SAndrew Rist * software distributed under the License is distributed on an 15*113d1ee9SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*113d1ee9SAndrew Rist * KIND, either express or implied. See the License for the 17*113d1ee9SAndrew Rist * specific language governing permissions and limitations 18*113d1ee9SAndrew Rist * under the License. 19*113d1ee9SAndrew Rist * 20*113d1ee9SAndrew Rist *************************************************************/ 21*113d1ee9SAndrew Rist 22*113d1ee9SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir package embeddedobj.test; 25cdf0e10cSrcweir 26cdf0e10cSrcweir import java.awt.*; 27cdf0e10cSrcweir 28cdf0e10cSrcweir import com.sun.star.uno.*; 29cdf0e10cSrcweir import com.sun.star.lang.*; 30cdf0e10cSrcweir import com.sun.star.awt.*; 31cdf0e10cSrcweir import com.sun.star.util.*; 32cdf0e10cSrcweir import com.sun.star.beans.*; 33cdf0e10cSrcweir import com.sun.star.container.*; 34cdf0e10cSrcweir 35cdf0e10cSrcweir /** <p>Class to pass the system window handle to the OpenOffice.org toolkit.</p> 36cdf0e10cSrcweir */ 37cdf0e10cSrcweir class JavaWindowPeerFake implements XSystemDependentWindowPeer, 38cdf0e10cSrcweir XWindowPeer 39cdf0e10cSrcweir { 40cdf0e10cSrcweir NativeView maView; 41cdf0e10cSrcweir 42cdf0e10cSrcweir public JavaWindowPeerFake( NativeView aNative ) 43cdf0e10cSrcweir { 44cdf0e10cSrcweir maView = aNative; 45cdf0e10cSrcweir } 46cdf0e10cSrcweir 47cdf0e10cSrcweir // ____________________ 48cdf0e10cSrcweir /** 49cdf0e10cSrcweir * Implementation of XSystemDependentWindowPeer ( that's all we really need ). 50cdf0e10cSrcweir * This method is called back from the Office toolkit to retrieve the system data. 51cdf0e10cSrcweir */ 52cdf0e10cSrcweir public java.lang.Object getWindowHandle( byte[] aProcessId, short aSystem ) 53cdf0e10cSrcweir throws com.sun.star.uno.RuntimeException 54cdf0e10cSrcweir { 55cdf0e10cSrcweir Object aReturn = null; 56cdf0e10cSrcweir if( aSystem == maView.maSystem ) 57cdf0e10cSrcweir aReturn = ( Object )maView.maHandle; 58cdf0e10cSrcweir 59cdf0e10cSrcweir return aReturn; 60cdf0e10cSrcweir } 61cdf0e10cSrcweir 62cdf0e10cSrcweir /** not really neaded. 63cdf0e10cSrcweir */ 64cdf0e10cSrcweir public XToolkit getToolkit() 65cdf0e10cSrcweir throws com.sun.star.uno.RuntimeException 66cdf0e10cSrcweir { 67cdf0e10cSrcweir return null; 68cdf0e10cSrcweir } 69cdf0e10cSrcweir 70cdf0e10cSrcweir public void setPointer( XPointer xPointer ) 71cdf0e10cSrcweir throws com.sun.star.uno.RuntimeException 72cdf0e10cSrcweir { 73cdf0e10cSrcweir } 74cdf0e10cSrcweir 75cdf0e10cSrcweir public void setBackground( int nColor ) 76cdf0e10cSrcweir throws com.sun.star.uno.RuntimeException 77cdf0e10cSrcweir { 78cdf0e10cSrcweir } 79cdf0e10cSrcweir 80cdf0e10cSrcweir public void invalidate( short nFlags ) 81cdf0e10cSrcweir throws com.sun.star.uno.RuntimeException 82cdf0e10cSrcweir { 83cdf0e10cSrcweir } 84cdf0e10cSrcweir 85cdf0e10cSrcweir public void invalidateRect( com.sun.star.awt.Rectangle aRect,short nFlags ) 86cdf0e10cSrcweir throws com.sun.star.uno.RuntimeException 87cdf0e10cSrcweir { 88cdf0e10cSrcweir } 89cdf0e10cSrcweir 90cdf0e10cSrcweir public void dispose() 91cdf0e10cSrcweir throws com.sun.star.uno.RuntimeException 92cdf0e10cSrcweir { 93cdf0e10cSrcweir } 94cdf0e10cSrcweir 95cdf0e10cSrcweir public void addEventListener( XEventListener xListener ) 96cdf0e10cSrcweir throws com.sun.star.uno.RuntimeException 97cdf0e10cSrcweir { 98cdf0e10cSrcweir } 99cdf0e10cSrcweir 100cdf0e10cSrcweir public void removeEventListener( XEventListener xListener ) 101cdf0e10cSrcweir throws com.sun.star.uno.RuntimeException 102cdf0e10cSrcweir { 103cdf0e10cSrcweir } 104cdf0e10cSrcweir } 105cdf0e10cSrcweir 106