1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: JavaWindowPeerFake.java,v $
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
.beans
;
33 import com
.sun
.star
.awt
.*;
35 /** <p>Class to pass the system window handle to the OpenOffice.org toolkit.</p>
38 /* package */ class JavaWindowPeerFake
39 implements XSystemDependentWindowPeer
, XWindowPeer
42 protected long hWindow
;
43 protected int localSystemType
;
45 /** Create the faked window peer.
46 * @param _hWindow the system handle to the window.
47 * @param _systemType specifies the system type.
49 public JavaWindowPeerFake(long _hWindow
, int _systemType
)
52 localSystemType
= _systemType
;
55 /** <p>Implementation of XSystemDependentWindowPeer (that's all we really need)</p>
56 * This method is called back from the OpenOffice.org toolkit to retrieve the system data.
58 public Object
getWindowHandle(/*IN*/byte[] ProcessId
, /*IN*/short SystemType
)
59 throws com
.sun
.star
.uno
.RuntimeException
62 if (SystemType
== localSystemType
) {
63 return new Integer((int)hWindow
);
68 /** not really neaded.
70 public XToolkit
getToolkit()
71 throws com
.sun
.star
.uno
.RuntimeException
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