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.awt.XPopupMenu; 27 import com.sun.star.frame.XPopupMenuController; 28 import lib.MultiMethodTest; 29 30 public class _XPopupMenuController extends MultiMethodTest { 31 public XPopupMenuController oObj = null; 32 33 public void before() { 34 35 } 36 37 public void _setPopupMenu() { 38 XPopupMenu xMenu = new PopupMenuImpl(); 39 oObj.setPopupMenu(xMenu); 40 tRes.tested("setPopupMenu()", true); 41 } 42 43 public void _updatePopupMenu() { 44 oObj.updatePopupMenu(); 45 tRes.tested("updatePopupMenu()", true); 46 } 47 48 private class PopupMenuImpl implements XPopupMenu { 49 50 public void addMenuListener(com.sun.star.awt.XMenuListener xMenuListener) { 51 System.out.println("addMenuListener called."); 52 } 53 54 public void checkItem(short param, boolean param1) { 55 System.out.println("checkItemListener called."); 56 } 57 58 public void enableItem(short param, boolean param1) { 59 System.out.println("enableItem called."); 60 } 61 62 public short execute(com.sun.star.awt.XWindowPeer xWindowPeer, com.sun.star.awt.Rectangle rectangle, short param) { 63 System.out.println("execute called."); 64 return 0; 65 } 66 67 public short getDefaultItem() { 68 System.out.println("getDefaultItem called."); 69 return 0; 70 } 71 72 public short getItemCount() { 73 System.out.println("getItemCount called."); 74 return 0; 75 } 76 77 public short getItemId(short param) { 78 System.out.println("getItemId called."); 79 return 0; 80 } 81 82 public short getItemPos(short param) { 83 System.out.println("getItemPos called."); 84 return 0; 85 } 86 87 public String getItemText(short param) { 88 System.out.println("getItemText called."); 89 return "Hi."; 90 } 91 92 public com.sun.star.awt.XPopupMenu getPopupMenu(short param) { 93 System.out.println("getPopupMenu called."); 94 return this; 95 } 96 97 public void insertItem(short param, String str, short param2, short param3) { 98 System.out.println("insertItem called."); 99 } 100 101 public void insertSeparator(short param) { 102 System.out.println("insertSeparator called."); 103 } 104 105 public boolean isItemChecked(short param) { 106 System.out.println("isItemChecked called."); 107 return false; 108 } 109 110 public boolean isItemEnabled(short param) { 111 System.out.println("isItemEnabled called."); 112 return false; 113 } 114 115 public void removeItem(short param, short param1) { 116 System.out.println("removeItem called."); 117 } 118 119 public void removeMenuListener(com.sun.star.awt.XMenuListener xMenuListener) { 120 System.out.println("removeMenuListener called."); 121 } 122 123 public void setDefaultItem(short param) { 124 System.out.println("setDefaultItem called."); 125 } 126 127 public void setItemText(short param, String str) { 128 System.out.println("setItemText called."); 129 } 130 131 public void setPopupMenu(short param, com.sun.star.awt.XPopupMenu xPopupMenu) { 132 System.out.println("setPopupMenu called."); 133 } 134 } 135 } 136