1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 package ifc.frame;
25 
26 import com.sun.star.graphic.XGraphic;
27 import com.sun.star.awt.XPopupMenu;
28 import com.sun.star.awt.KeyEvent;
29 import com.sun.star.frame.XPopupMenuController;
30 import lib.MultiMethodTest;
31 
32 public class _XPopupMenuController extends MultiMethodTest {
33     public XPopupMenuController oObj = null;
34 
before()35     public void before() {
36 
37     }
38 
_setPopupMenu()39     public void _setPopupMenu() {
40         XPopupMenu xMenu = new PopupMenuImpl();
41         oObj.setPopupMenu(xMenu);
42         tRes.tested("setPopupMenu()", true);
43     }
44 
_updatePopupMenu()45     public void _updatePopupMenu() {
46         oObj.updatePopupMenu();
47         tRes.tested("updatePopupMenu()", true);
48     }
49 
50     private class PopupMenuImpl implements XPopupMenu {
51 
addMenuListener(com.sun.star.awt.XMenuListener xMenuListener)52         public void addMenuListener(com.sun.star.awt.XMenuListener xMenuListener) {
53             System.out.println("addMenuListener called.");
54         }
55 
checkItem(short param, boolean param1)56         public void checkItem(short param, boolean param1) {
57             System.out.println("checkItemListener called.");
58         }
59 
enableItem(short param, boolean param1)60         public void enableItem(short param, boolean param1) {
61             System.out.println("enableItem called.");
62         }
63 
execute(com.sun.star.awt.XWindowPeer xWindowPeer, com.sun.star.awt.Rectangle pos, short param)64         public short execute(com.sun.star.awt.XWindowPeer xWindowPeer, com.sun.star.awt.Rectangle pos, short param) {
65             System.out.println("execute called.");
66             return 0;
67         }
68 
getDefaultItem()69         public short getDefaultItem() {
70             System.out.println("getDefaultItem called.");
71             return 0;
72         }
73 
getItemCount()74         public short getItemCount() {
75             System.out.println("getItemCount called.");
76             return 0;
77         }
78 
getItemId(short param)79         public short getItemId(short param) {
80             System.out.println("getItemId called.");
81             return 0;
82         }
83 
getItemPos(short param)84         public short getItemPos(short param) {
85             System.out.println("getItemPos called.");
86             return 0;
87         }
88 
getItemText(short param)89         public String getItemText(short param) {
90             System.out.println("getItemText called.");
91             return "Hi.";
92         }
93 
getPopupMenu(short param)94         public com.sun.star.awt.XPopupMenu getPopupMenu(short param) {
95             System.out.println("getPopupMenu called.");
96             return this;
97         }
98 
insertItem(short param, String str, short param2, short param3)99         public void insertItem(short param, String str, short param2, short param3) {
100             System.out.println("insertItem called.");
101         }
102 
insertSeparator(short param)103         public void insertSeparator(short param) {
104             System.out.println("insertSeparator called.");
105         }
106 
isItemChecked(short param)107         public boolean isItemChecked(short param) {
108             System.out.println("isItemChecked called.");
109             return false;
110         }
111 
isItemEnabled(short param)112         public boolean isItemEnabled(short param) {
113             System.out.println("isItemEnabled called.");
114             return false;
115         }
116 
removeItem(short param, short param1)117         public void removeItem(short param, short param1) {
118             System.out.println("removeItem called.");
119         }
120 
removeMenuListener(com.sun.star.awt.XMenuListener xMenuListener)121         public void removeMenuListener(com.sun.star.awt.XMenuListener xMenuListener) {
122             System.out.println("removeMenuListener called.");
123         }
124 
setDefaultItem(short param)125         public void setDefaultItem(short param) {
126             System.out.println("setDefaultItem called.");
127         }
128 
setItemText(short param, String str)129         public void setItemText(short param, String str) {
130             System.out.println("setItemText called.");
131         }
132 
setPopupMenu(short param, com.sun.star.awt.XPopupMenu xPopupMenu)133         public void setPopupMenu(short param, com.sun.star.awt.XPopupMenu xPopupMenu) {
134             System.out.println("setPopupMenu called.");
135         }
136 
getItemImage(short param )137         public XGraphic getItemImage(short param ) {
138             System.out.println("getItemImage called.");
139             return null;
140         }
141 
setItemImage(short param, XGraphic param1, boolean param2 )142         public void setItemImage(short param, XGraphic param1, boolean param2 ) {
143             System.out.println("setItemImage called.");
144         }
145 
getAcceleratorKeyEvent(short param )146         public KeyEvent getAcceleratorKeyEvent(short param ) {
147             System.out.println("getAcceleratorKeyEvent called.");
148             return new KeyEvent();
149         }
150 
setAcceleratorKeyEvent(short param, KeyEvent param1 )151         public void setAcceleratorKeyEvent(short param, KeyEvent param1 ) {
152             System.out.println("setAcceleratorKeyEvent called.");
153         }
154 
endExecute()155         public void endExecute() {
156             System.out.println("endExecute called.");
157         }
158 
isInExecute()159         public boolean isInExecute() {
160             System.out.println("isInExecute called.");
161             return false;
162         }
163 
isPopupMenu()164         public boolean isPopupMenu() {
165             System.out.println("isPopupMenu called.");
166             return true;
167         }
168 
getTipHelpText(short param )169         public String getTipHelpText(short param ) {
170             System.out.println("getTipHelpText called.");
171             return null;
172         }
173 
setTipHelpText(short param, String param1 )174         public void setTipHelpText(short param, String param1 ) {
175             System.out.println("setTipHelpText called.");
176         }
177 
getHelpText(short param )178         public String getHelpText(short param ) {
179             System.out.println("getHelpText called.");
180             return null;
181         }
182 
setHelpText(short param, String param1 )183         public void setHelpText(short param, String param1 ) {
184             System.out.println("setHelpText called.");
185         }
186 
getHelpCommand(short param )187         public String getHelpCommand(short param ) {
188             System.out.println("getHelpCommand called.");
189             return null;
190         }
191 
setHelpCommand(short param, String param1 )192         public void setHelpCommand(short param, String param1 ) {
193             System.out.println("setHelpCommand called.");
194         }
195 
getCommand(short param )196         public String getCommand(short param ) {
197             System.out.println("getCommand called.");
198             return null;
199         }
200 
setCommand(short param, String param1 )201         public void setCommand(short param, String param1 ) {
202             System.out.println("setCommand called.");
203         }
204 
enableAutoMnemonics(boolean param )205         public void enableAutoMnemonics(boolean param ) {
206             System.out.println("enableAutoMnemonics called.");
207         }
208 
hideDisabledEntries(boolean param )209         public void hideDisabledEntries(boolean param ) {
210             System.out.println("hideDisabledEntries called.");
211         }
212 
getItemType(short param )213         public com.sun.star.awt.MenuItemType getItemType(short param ) {
214             System.out.println("getItemType called.");
215             return com.sun.star.awt.MenuItemType.DONTKNOW;
216         }
217 
setItemType(com.sun.star.awt.MenuItemType param )218         public void setItemType(com.sun.star.awt.MenuItemType param ) {
219             System.out.println("setItemType called.");
220         }
221 
clear()222         public void clear() {
223             System.out.println("clear called.");
224         }
225     }
226 }
227