UnoMenu2.java (ae15d43a) UnoMenu2.java (d026be40)
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

--- 6 unchanged lines hidden (view full) ---

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
22import com.sun.star.awt.MouseEvent;
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

--- 6 unchanged lines hidden (view full) ---

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
22import com.sun.star.awt.MouseEvent;
23import com.sun.star.awt.Rectangle;
23import com.sun.star.awt.Point;
24import com.sun.star.awt.XControl;
25import com.sun.star.awt.XMouseListener;
26import com.sun.star.awt.XTopWindow;
27import com.sun.star.awt.XWindow;
28import com.sun.star.beans.XMultiPropertySet;
29import com.sun.star.lang.EventObject;
30import com.sun.star.lang.XMultiComponentFactory;
31import com.sun.star.uno.UnoRuntime;

--- 62 unchanged lines hidden (view full) ---

94 xDialog.endExecute();
95 }
96
97 public void mouseReleased(MouseEvent mouseEvent) {
98 }
99
100 public void mousePressed(MouseEvent mouseEvent) {
101 if (mouseEvent.PopupTrigger){
24import com.sun.star.awt.XControl;
25import com.sun.star.awt.XMouseListener;
26import com.sun.star.awt.XTopWindow;
27import com.sun.star.awt.XWindow;
28import com.sun.star.beans.XMultiPropertySet;
29import com.sun.star.lang.EventObject;
30import com.sun.star.lang.XMultiComponentFactory;
31import com.sun.star.uno.UnoRuntime;

--- 62 unchanged lines hidden (view full) ---

94 xDialog.endExecute();
95 }
96
97 public void mouseReleased(MouseEvent mouseEvent) {
98 }
99
100 public void mousePressed(MouseEvent mouseEvent) {
101 if (mouseEvent.PopupTrigger){
102 Rectangle aRectangle = new Rectangle(mouseEvent.X, mouseEvent.Y, 0, 0);
102 Point aPos = new Point(mouseEvent.X, mouseEvent.Y);
103 XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, mouseEvent.Source);
103 XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, mouseEvent.Source);
104 getPopupMenu().execute( xControl.getPeer(), aRectangle, com.sun.star.awt.PopupMenuDirection.DEFAULT);
104 getPopupMenu().execute( xControl.getPeer(), aPos, com.sun.star.awt.PopupMenuDirection.EXECUTE_DEFAULT);
105 }
106 }
107
108 public void mouseExited(MouseEvent mouseEvent) {
109 }
110
111 public void mouseEntered(MouseEvent mouseEvent) {
112 }
113
114 public void disposing(EventObject eventObject) {
115 }
116}
105 }
106 }
107
108 public void mouseExited(MouseEvent mouseEvent) {
109 }
110
111 public void mouseEntered(MouseEvent mouseEvent) {
112 }
113
114 public void disposing(EventObject eventObject) {
115 }
116}