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 .
21 import com
.sun
.star
.graphic
.XGraphic
;
22 import com
.sun
.star
.awt
.XPopupMenu
;
23 import com
.sun
.star
.awt
.KeyEvent
;
24 import com
.sun
.star
.frame
.XPopupMenuController
;
25 import lib
.MultiMethodTest
;
27 public class _XPopupMenuController
extends MultiMethodTest
{
28 public XPopupMenuController oObj
= null;
30 public void before() {
34 public void _setPopupMenu() {
35 XPopupMenu xMenu
= new PopupMenuImpl();
36 oObj
.setPopupMenu(xMenu
);
37 tRes
.tested("setPopupMenu()", true);
40 public void _updatePopupMenu() {
41 oObj
.updatePopupMenu();
42 tRes
.tested("updatePopupMenu()", true);
45 private class PopupMenuImpl
implements XPopupMenu
{
47 public void addMenuListener(com
.sun
.star
.awt
.XMenuListener xMenuListener
) {
48 System
.out
.println("addMenuListener called.");
51 public void checkItem(short param
, boolean param1
) {
52 System
.out
.println("checkItemListener called.");
55 public void enableItem(short param
, boolean param1
) {
56 System
.out
.println("enableItem called.");
59 public short execute(com
.sun
.star
.awt
.XWindowPeer xWindowPeer
, com
.sun
.star
.awt
.Rectangle pos
, short param
) {
60 System
.out
.println("execute called.");
64 public short getDefaultItem() {
65 System
.out
.println("getDefaultItem called.");
69 public short getItemCount() {
70 System
.out
.println("getItemCount called.");
74 public short getItemId(short param
) {
75 System
.out
.println("getItemId called.");
79 public short getItemPos(short param
) {
80 System
.out
.println("getItemPos called.");
84 public String
getItemText(short param
) {
85 System
.out
.println("getItemText called.");
89 public com
.sun
.star
.awt
.XPopupMenu
getPopupMenu(short param
) {
90 System
.out
.println("getPopupMenu called.");
94 public void insertItem(short param
, String str
, short param2
, short param3
) {
95 System
.out
.println("insertItem called.");
98 public void insertSeparator(short param
) {
99 System
.out
.println("insertSeparator called.");
102 public boolean isItemChecked(short param
) {
103 System
.out
.println("isItemChecked called.");
107 public boolean isItemEnabled(short param
) {
108 System
.out
.println("isItemEnabled called.");
112 public void removeItem(short param
, short param1
) {
113 System
.out
.println("removeItem called.");
116 public void removeMenuListener(com
.sun
.star
.awt
.XMenuListener xMenuListener
) {
117 System
.out
.println("removeMenuListener called.");
120 public void setDefaultItem(short param
) {
121 System
.out
.println("setDefaultItem called.");
124 public void setItemText(short param
, String str
) {
125 System
.out
.println("setItemText called.");
128 public void setPopupMenu(short param
, com
.sun
.star
.awt
.XPopupMenu xPopupMenu
) {
129 System
.out
.println("setPopupMenu called.");
132 public XGraphic
getItemImage(short param
) {
133 System
.out
.println("getItemImage called.");
137 public void setItemImage(short param
, XGraphic param1
, boolean param2
) {
138 System
.out
.println("setItemImage called.");
141 public KeyEvent
getAcceleratorKeyEvent(short param
) {
142 System
.out
.println("getAcceleratorKeyEvent called.");
143 return new KeyEvent();
146 public void setAcceleratorKeyEvent(short param
, KeyEvent param1
) {
147 System
.out
.println("setAcceleratorKeyEvent called.");
150 public void endExecute() {
151 System
.out
.println("endExecute called.");
154 public boolean isInExecute() {
155 System
.out
.println("isInExecute called.");
159 public boolean isPopupMenu() {
160 System
.out
.println("isPopupMenu called.");
164 public String
getTipHelpText(short param
) {
165 System
.out
.println("getTipHelpText called.");
169 public void setTipHelpText(short param
, String param1
) {
170 System
.out
.println("setTipHelpText called.");
173 public String
getHelpText(short param
) {
174 System
.out
.println("getHelpText called.");
178 public void setHelpText(short param
, String param1
) {
179 System
.out
.println("setHelpText called.");
182 public String
getHelpCommand(short param
) {
183 System
.out
.println("getHelpCommand called.");
187 public void setHelpCommand(short param
, String param1
) {
188 System
.out
.println("setHelpCommand called.");
191 public String
getCommand(short param
) {
192 System
.out
.println("getCommand called.");
196 public void setCommand(short param
, String param1
) {
197 System
.out
.println("setCommand called.");
200 public void enableAutoMnemonics(boolean param
) {
201 System
.out
.println("enableAutoMnemonics called.");
204 public void hideDisabledEntries(boolean param
) {
205 System
.out
.println("hideDisabledEntries called.");
208 public com
.sun
.star
.awt
.MenuItemType
getItemType(short param
) {
209 System
.out
.println("getItemType called.");
210 return com
.sun
.star
.awt
.MenuItemType
.DONTKNOW
;
213 public void setItemType(com
.sun
.star
.awt
.MenuItemType param
) {
214 System
.out
.println("setItemType called.");
217 public void clear() {
218 System
.out
.println("clear called.");