Branch libreoffice-5-0-4
[LibreOffice.git] / qadevOOo / tests / java / ifc / frame / _XPopupMenuController.java
blobbe8c32da4cf0a0a25ca0fb8beb43f7ce9b0981e6
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 ifc.frame;
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 @Override
31 public void before() {
35 public void _setPopupMenu() {
36 XPopupMenu xMenu = new PopupMenuImpl();
37 oObj.setPopupMenu(xMenu);
38 tRes.tested("setPopupMenu()", true);
41 public void _updatePopupMenu() {
42 oObj.updatePopupMenu();
43 tRes.tested("updatePopupMenu()", true);
46 private class PopupMenuImpl implements XPopupMenu {
48 public void addMenuListener(com.sun.star.awt.XMenuListener xMenuListener) {
49 System.out.println("addMenuListener called.");
52 public void checkItem(short param, boolean param1) {
53 System.out.println("checkItemListener called.");
56 public void enableItem(short param, boolean param1) {
57 System.out.println("enableItem called.");
60 public short execute(com.sun.star.awt.XWindowPeer xWindowPeer, com.sun.star.awt.Rectangle pos, short param) {
61 System.out.println("execute called.");
62 return 0;
65 public short getDefaultItem() {
66 System.out.println("getDefaultItem called.");
67 return 0;
70 public short getItemCount() {
71 System.out.println("getItemCount called.");
72 return 0;
75 public short getItemId(short param) {
76 System.out.println("getItemId called.");
77 return 0;
80 public short getItemPos(short param) {
81 System.out.println("getItemPos called.");
82 return 0;
85 public String getItemText(short param) {
86 System.out.println("getItemText called.");
87 return "Hi.";
90 public com.sun.star.awt.XPopupMenu getPopupMenu(short param) {
91 System.out.println("getPopupMenu called.");
92 return this;
95 public void insertItem(short param, String str, short param2, short param3) {
96 System.out.println("insertItem called.");
99 public void insertSeparator(short param) {
100 System.out.println("insertSeparator called.");
103 public boolean isItemChecked(short param) {
104 System.out.println("isItemChecked called.");
105 return false;
108 public boolean isItemEnabled(short param) {
109 System.out.println("isItemEnabled called.");
110 return false;
113 public void removeItem(short param, short param1) {
114 System.out.println("removeItem called.");
117 public void removeMenuListener(com.sun.star.awt.XMenuListener xMenuListener) {
118 System.out.println("removeMenuListener called.");
121 public void setDefaultItem(short param) {
122 System.out.println("setDefaultItem called.");
125 public void setItemText(short param, String str) {
126 System.out.println("setItemText called.");
129 public void setPopupMenu(short param, com.sun.star.awt.XPopupMenu xPopupMenu) {
130 System.out.println("setPopupMenu called.");
133 public XGraphic getItemImage(short param ) {
134 System.out.println("getItemImage called.");
135 return null;
138 public void setItemImage(short param, XGraphic param1, boolean param2 ) {
139 System.out.println("setItemImage called.");
142 public KeyEvent getAcceleratorKeyEvent(short param ) {
143 System.out.println("getAcceleratorKeyEvent called.");
144 return new KeyEvent();
147 public void setAcceleratorKeyEvent(short param, KeyEvent param1 ) {
148 System.out.println("setAcceleratorKeyEvent called.");
151 public void endExecute() {
152 System.out.println("endExecute called.");
155 public boolean isInExecute() {
156 System.out.println("isInExecute called.");
157 return false;
160 public boolean isPopupMenu() {
161 System.out.println("isPopupMenu called.");
162 return true;
165 public String getTipHelpText(short param ) {
166 System.out.println("getTipHelpText called.");
167 return null;
170 public void setTipHelpText(short param, String param1 ) {
171 System.out.println("setTipHelpText called.");
174 public String getHelpText(short param ) {
175 System.out.println("getHelpText called.");
176 return null;
179 public void setHelpText(short param, String param1 ) {
180 System.out.println("setHelpText called.");
183 public String getHelpCommand(short param ) {
184 System.out.println("getHelpCommand called.");
185 return null;
188 public void setHelpCommand(short param, String param1 ) {
189 System.out.println("setHelpCommand called.");
192 public String getCommand(short param ) {
193 System.out.println("getCommand called.");
194 return null;
197 public void setCommand(short param, String param1 ) {
198 System.out.println("setCommand called.");
201 public void enableAutoMnemonics(boolean param ) {
202 System.out.println("enableAutoMnemonics called.");
205 public void hideDisabledEntries(boolean param ) {
206 System.out.println("hideDisabledEntries called.");
209 public com.sun.star.awt.MenuItemType getItemType(short param ) {
210 System.out.println("getItemType called.");
211 return com.sun.star.awt.MenuItemType.DONTKNOW;
214 public void clear() {
215 System.out.println("clear called.");