merge the formfield patch from ooo-build
[ooovba.git] / qadevOOo / tests / java / ifc / frame / _XPopupMenuController.java
blob8a4c5dc2c7533af088b8c5cdb1eef232a26ae573
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: _XPopupMenuController.java,v $
10 * $Revision: 1.5 $
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 ifc.frame;
33 import com.sun.star.awt.XPopupMenu;
34 import com.sun.star.frame.XPopupMenuController;
35 import lib.MultiMethodTest;
37 public class _XPopupMenuController extends MultiMethodTest {
38 public XPopupMenuController oObj = null;
40 public void before() {
44 public void _setPopupMenu() {
45 XPopupMenu xMenu = new PopupMenuImpl();
46 oObj.setPopupMenu(xMenu);
47 tRes.tested("setPopupMenu()", true);
50 public void _updatePopupMenu() {
51 oObj.updatePopupMenu();
52 tRes.tested("updatePopupMenu()", true);
55 private class PopupMenuImpl implements XPopupMenu {
57 public void addMenuListener(com.sun.star.awt.XMenuListener xMenuListener) {
58 System.out.println("addMenuListener called.");
61 public void checkItem(short param, boolean param1) {
62 System.out.println("checkItemListener called.");
65 public void enableItem(short param, boolean param1) {
66 System.out.println("enableItem called.");
69 public short execute(com.sun.star.awt.XWindowPeer xWindowPeer, com.sun.star.awt.Rectangle rectangle, short param) {
70 System.out.println("execute called.");
71 return 0;
74 public short getDefaultItem() {
75 System.out.println("getDefaultItem called.");
76 return 0;
79 public short getItemCount() {
80 System.out.println("getItemCount called.");
81 return 0;
84 public short getItemId(short param) {
85 System.out.println("getItemId called.");
86 return 0;
89 public short getItemPos(short param) {
90 System.out.println("getItemPos called.");
91 return 0;
94 public String getItemText(short param) {
95 System.out.println("getItemText called.");
96 return "Hi.";
99 public com.sun.star.awt.XPopupMenu getPopupMenu(short param) {
100 System.out.println("getPopupMenu called.");
101 return this;
104 public void insertItem(short param, String str, short param2, short param3) {
105 System.out.println("insertItem called.");
108 public void insertSeparator(short param) {
109 System.out.println("insertSeparator called.");
112 public boolean isItemChecked(short param) {
113 System.out.println("isItemChecked called.");
114 return false;
117 public boolean isItemEnabled(short param) {
118 System.out.println("isItemEnabled called.");
119 return false;
122 public void removeItem(short param, short param1) {
123 System.out.println("removeItem called.");
126 public void removeMenuListener(com.sun.star.awt.XMenuListener xMenuListener) {
127 System.out.println("removeMenuListener called.");
130 public void setDefaultItem(short param) {
131 System.out.println("setDefaultItem called.");
134 public void setItemText(short param, String str) {
135 System.out.println("setItemText called.");
138 public void setPopupMenu(short param, com.sun.star.awt.XPopupMenu xPopupMenu) {
139 System.out.println("setPopupMenu called.");