Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / embeddedobj / test / Container1 / JavaWindowPeerFake.java
blob54d1f39df5ea6f2e0c05d3af4c4e000f8cc0cb53
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 package embeddedobj.test;
21 import java.awt.*;
23 import com.sun.star.uno.*;
24 import com.sun.star.lang.*;
25 import com.sun.star.awt.*;
26 import com.sun.star.util.*;
27 import com.sun.star.beans.*;
28 import com.sun.star.container.*;
30 /** <p>Class to pass the system window handle to the OpenOffice.org toolkit.</p>
32 class JavaWindowPeerFake implements XSystemDependentWindowPeer,
33 XWindowPeer
35 NativeView maView;
37 public JavaWindowPeerFake( NativeView aNative )
39 maView = aNative;
43 /**
44 * Implementation of XSystemDependentWindowPeer ( that's all we really need ).
45 * This method is called back from the Office toolkit to retrieve the system data.
47 public java.lang.Object getWindowHandle( byte[] aProcessId, short aSystem )
48 throws com.sun.star.uno.RuntimeException
50 Object aReturn = null;
51 if( aSystem == maView.maSystem )
52 aReturn = ( Object )maView.maHandle;
54 return aReturn;
57 /** not really neaded.
59 public XToolkit getToolkit()
60 throws com.sun.star.uno.RuntimeException
62 return null;
65 public void setPointer( XPointer xPointer )
66 throws com.sun.star.uno.RuntimeException
70 public void setBackground( int nColor )
71 throws com.sun.star.uno.RuntimeException
75 public void invalidate( short nFlags )
76 throws com.sun.star.uno.RuntimeException
80 public void invalidateRect( com.sun.star.awt.Rectangle aRect,short nFlags )
81 throws com.sun.star.uno.RuntimeException
85 public void dispose()
86 throws com.sun.star.uno.RuntimeException
90 public void addEventListener( XEventListener xListener )
91 throws com.sun.star.uno.RuntimeException
95 public void removeEventListener( XEventListener xListener )
96 throws com.sun.star.uno.RuntimeException