Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / bean / com / sun / star / comp / beans / JavaWindowPeerFake.java
blobd2d1d351d7dac3306a0f2568f36e6315f551d880
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 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>
26 * @since OOo 2.0.0
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) {
51 return wrappedHandle;
53 else return null;
56 /** not really needed.
58 public XToolkit getToolkit()
59 throws com.sun.star.uno.RuntimeException
61 return null;
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.
94 public void dispose()
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