1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: _XPopupMenuController.java,v $
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 ************************************************************************/
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.");
74 public short getDefaultItem() {
75 System
.out
.println("getDefaultItem called.");
79 public short getItemCount() {
80 System
.out
.println("getItemCount called.");
84 public short getItemId(short param
) {
85 System
.out
.println("getItemId called.");
89 public short getItemPos(short param
) {
90 System
.out
.println("getItemPos called.");
94 public String
getItemText(short param
) {
95 System
.out
.println("getItemText called.");
99 public com
.sun
.star
.awt
.XPopupMenu
getPopupMenu(short param
) {
100 System
.out
.println("getPopupMenu called.");
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.");
117 public boolean isItemEnabled(short param
) {
118 System
.out
.println("isItemEnabled called.");
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.");