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 com
.sun
.star
.comp
.beans
;
21 import com
.sun
.star
.uno
.*;
22 import com
.sun
.star
.awt
.*;
24 /** <p>Class to pass the system window handle to the OpenOffice.org toolkit.</p>
28 class JavaWindowPeerFake
29 implements XSystemDependentWindowPeer
, XWindowPeer
31 protected int localSystemType
;
32 protected Any wrappedHandle
;
34 /** Create the faked window peer.
35 * @param _hWindow the system handle to the window.
36 * @param _systemType specifies the system type.
38 public JavaWindowPeerFake(Any _hWindow
, int _systemType
)
40 localSystemType
= _systemType
;
41 wrappedHandle
= _hWindow
;
44 /** <p>Implementation of XSystemDependentWindowPeer (that's all we really need)</p>
45 * This method is called back from the OpenOffice.org toolkit to retrieve the system data.
47 public Object
getWindowHandle(/*IN*/ byte[] ProcessId
, /*IN*/ short SystemType
)
48 throws com
.sun
.star
.uno
.RuntimeException
50 if (SystemType
== localSystemType
) {
56 /** not really needed.
58 public XToolkit
getToolkit()
59 throws com
.sun
.star
.uno
.RuntimeException
64 /** not really needed.
66 public void setPointer(/*IN*/ XPointer Pointer
)
67 throws com
.sun
.star
.uno
.RuntimeException
71 /** not really needed.
73 public void setBackground(/*IN*/ int Color
)
74 throws com
.sun
.star
.uno
.RuntimeException
78 /** not really needed.
80 public void invalidate(/*IN*/ short Flags
)
81 throws com
.sun
.star
.uno
.RuntimeException
85 /** not really needed.
87 public void invalidateRect(/*IN*/ com
.sun
.star
.awt
.Rectangle Rect
, /*IN*/ short Flags
)
88 throws com
.sun
.star
.uno
.RuntimeException
92 /** not really needed.
95 throws com
.sun
.star
.uno
.RuntimeException
99 /** not really needed.
101 public void addEventListener(/*IN*/ com
.sun
.star
.lang
.XEventListener xListener
)
102 throws com
.sun
.star
.uno
.RuntimeException
106 /** not really needed.
108 public void removeEventListener(/*IN*/ com
.sun
.star
.lang
.XEventListener aListener
)
109 throws com
.sun
.star
.uno
.RuntimeException