xref: /AOO41X/main/bean/com/sun/star/beans/JavaWindowPeerFake.java (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 package com.sun.star.beans;
29 
30 import com.sun.star.awt.*;
31 
32 /** <p>Class to pass the system window handle to the OpenOffice.org toolkit.</p>
33  *  @deprecated
34  */
35 /* package */ class JavaWindowPeerFake
36 	implements XSystemDependentWindowPeer, XWindowPeer
37 {
38 
39 	protected long hWindow;
40 	protected int localSystemType;
41 
42 	/** Create the faked window peer.
43 	 * @param _hWindow the system handle to the window.
44 	 * @param _systemType specifies the system type.
45 	 */
46 	public JavaWindowPeerFake(long _hWindow, int _systemType)
47 	{
48 		hWindow = _hWindow;
49 		localSystemType = _systemType;
50 	}
51 
52 	/** <p>Implementation of XSystemDependentWindowPeer (that's all we really need)</p>
53 	 *  This method is called back from the OpenOffice.org toolkit to retrieve the system data.
54 	 */
55     public Object getWindowHandle(/*IN*/byte[] ProcessId, /*IN*/short SystemType)
56 		throws com.sun.star.uno.RuntimeException
57 	{
58 
59 		if (SystemType == localSystemType) {
60 			return new Integer((int)hWindow);
61 		}
62 		else return null;
63 	}
64 
65 	/** not really neaded.
66 	 */
67     public XToolkit getToolkit()
68 		throws com.sun.star.uno.RuntimeException
69 	{
70 		return null;
71 	}
72 
73 	/** not really neaded.
74 	 */
75     public void setPointer(/*IN*/XPointer Pointer)
76 		throws com.sun.star.uno.RuntimeException
77 	{
78 	}
79 
80 	/** not really neaded.
81 	 */
82     public void setBackground(/*IN*/int Color)
83 		throws com.sun.star.uno.RuntimeException
84 	{
85 	}
86 
87 	/** not really neaded.
88 	 */
89     public void invalidate(/*IN*/short Flags)
90 		throws com.sun.star.uno.RuntimeException
91 	{
92 	}
93 
94 	/** not really neaded.
95 	 */
96     public void invalidateRect(/*IN*/com.sun.star.awt.Rectangle Rect, /*IN*/short Flags)
97 		throws com.sun.star.uno.RuntimeException
98 	{
99 	}
100 
101 	/** not really neaded.
102 	 */
103     public void dispose()
104 		throws com.sun.star.uno.RuntimeException
105 	{
106 	}
107 
108 	/** not really neaded.
109 	 */
110     public void addEventListener(/*IN*/com.sun.star.lang.XEventListener xListener)
111 		throws com.sun.star.uno.RuntimeException
112 	{
113 	}
114 
115 	/** not really neaded.
116 	 */
117     public void removeEventListener(/*IN*/com.sun.star.lang.XEventListener aListener)
118 		throws com.sun.star.uno.RuntimeException
119 	{
120 	}
121 }
122 
123