Package com.sun.star.ui

Examples of com.sun.star.ui.XContextMenuInterception


            {
            }

            // reuse the frame
            com.sun.star.frame.XController xController = xFrame.getController();
            XContextMenuInterception xContextMenuInterception = null;
            XContextMenuInterceptor xContextMenuInterceptor = null;

            if (xController != null)
            {
                System.out.println("Creating context menu interceptor");

                // add our context menu interceptor
                xContextMenuInterception =
                        UnoRuntime.queryInterface(XContextMenuInterception.class, xController);

                if (xContextMenuInterception != null)
                {
                    ContextMenuInterceptor aContextMenuInterceptor = new ContextMenuInterceptor(xBitmap);
                    xContextMenuInterceptor =
                            UnoRuntime.queryInterface(XContextMenuInterceptor.class, aContextMenuInterceptor);

                    System.out.println("Register context menu interceptor");
                    xContextMenuInterception.registerContextMenuInterceptor(xContextMenuInterceptor);
                }
            }

            //  utils.shortWait(10000);

            openContextMenu(UnoRuntime.queryInterface(XModel.class, xDrawDoc));

            checkHelpEntry();

            // remove our context menu interceptor
            if (xContextMenuInterception != null
                    && xContextMenuInterceptor != null)
            {
                System.out.println("Release context menu interceptor");
                xContextMenuInterception.releaseContextMenuInterceptor(
                        xContextMenuInterceptor);
            }
        }
        catch (com.sun.star.uno.RuntimeException ex)
        {
View Full Code Here


                if(m_Controller == null)
                    m_Controller = new Controller( this, m_xContext, m_xFrame );
               
                _frameObjectList.add(new FrameObject(m_xFrame, m_Controller));

                XContextMenuInterception xContextMenuInterception = (XContextMenuInterception)UnoRuntime.queryInterface(XContextMenuInterception.class, m_xFrame.getController());
                if(xContextMenuInterception != null)
                    xContextMenuInterception.registerContextMenuInterceptor(new ContextMenuInterceptor(m_xContext, m_xFrame, this));
            }else{
                for(FrameObject frameObj : _frameObjectList)
                    if(m_xFrame.equals(frameObj.getXFrame()))
                       m_Controller =  frameObj.getController();
            }
View Full Code Here

TOP

Related Classes of com.sun.star.ui.XContextMenuInterception

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.