Update ooo320-m1
[ooovba.git] / bean / com / sun / star / comp / beans / JavaWindowPeerFake.java
blob248cab1a72dd7aa6e1978a6462c3d8cc28bb0d80
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: JavaWindowPeerFake.java,v $
10 * $Revision: 1.5 $
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.*;
34 import com.sun.star.awt.*;
36 /** <p>Class to pass the system window handle to the OpenOffice.org toolkit.</p>
38 * @since OOo 2.0.0
40 /* package */ class JavaWindowPeerFake
41 implements XSystemDependentWindowPeer, XWindowPeer
43 protected int localSystemType;
44 protected Any wrappedHandle;
46 /** Create the faked window peer.
47 * @param _hWindow the system handle to the window.
48 * @param _systemType specifies the system type.
50 public JavaWindowPeerFake(Any _hWindow, int _systemType)
52 localSystemType = _systemType;
53 wrappedHandle = _hWindow;
56 /** <p>Implementation of XSystemDependentWindowPeer (that's all we really need)</p>
57 * This method is called back from the OpenOffice.org toolkit to retrieve the system data.
59 public Object getWindowHandle(/*IN*/byte[] ProcessId, /*IN*/short SystemType)
60 throws com.sun.star.uno.RuntimeException
62 if (SystemType == localSystemType) {
63 return wrappedHandle;
65 else return null;
68 /** not really neaded.
70 public XToolkit getToolkit()
71 throws com.sun.star.uno.RuntimeException
73 return null;
76 /** not really neaded.
78 public void setPointer(/*IN*/XPointer Pointer)
79 throws com.sun.star.uno.RuntimeException
83 /** not really neaded.
85 public void setBackground(/*IN*/int Color)
86 throws com.sun.star.uno.RuntimeException
90 /** not really neaded.
92 public void invalidate(/*IN*/short Flags)
93 throws com.sun.star.uno.RuntimeException
97 /** not really neaded.
99 public void invalidateRect(/*IN*/com.sun.star.awt.Rectangle Rect, /*IN*/short Flags)
100 throws com.sun.star.uno.RuntimeException
104 /** not really neaded.
106 public void dispose()
107 throws com.sun.star.uno.RuntimeException
111 /** not really neaded.
113 public void addEventListener(/*IN*/com.sun.star.lang.XEventListener xListener)
114 throws com.sun.star.uno.RuntimeException
118 /** not really neaded.
120 public void removeEventListener(/*IN*/com.sun.star.lang.XEventListener aListener)
121 throws com.sun.star.uno.RuntimeException