Package com.sun.star.awt

Examples of com.sun.star.awt.XMessageBox


            WindowAttribute.MOVEABLE |
            WindowAttribute.CLOSEABLE;
               
          XWindowPeer xPeer = m_xToolkit.createWindow( aDescriptor );
          if ( null != xPeer ) {
            XMessageBox xMsgBox = (XMessageBox)UnoRuntime.queryInterface(
              XMessageBox.class, xPeer);
            if ( null != xMsgBox )
            {
              xMsgBox.setCaptionText( sTitle );
              xMsgBox.setMessageText( sMessage );
              xMsgBox.execute();
            }
          }
        }
      } catch ( com.sun.star.uno.Exception e) {
        // do your error handling
View Full Code Here


            oDescriptor.WindowServiceName = windowServiceName;
            oDescriptor.Parent = peer;
            oDescriptor.Type = com.sun.star.awt.WindowClass.MODALTOP;
            oDescriptor.WindowAttributes = windowAttribute;
            XWindowPeer xMsgPeer = xToolkit.createWindow(oDescriptor);
            XMessageBox xMsgbox = (XMessageBox) UnoRuntime.queryInterface(XMessageBox.class, xMsgPeer);
            XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMsgbox);
            xMsgbox.setMessageText(MessageText);
            iMessage = xMsgbox.execute();
            xComponent.dispose();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace(System.out);
        }
View Full Code Here

            XWindowPeer aWinPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xWin);
           
            Rectangle aRect = new Rectangle();
            int button = com.sun.star.awt.MessageBoxButtons.BUTTONS_OK;
            XMessageBoxFactory aMBF = (XMessageBoxFactory) UnoRuntime.queryInterface(XMessageBoxFactory.class, aToolKit);
            XMessageBox xMB = aMBF.createMessageBox(aWinPeer, aRect, "infobox" , button, "Event-Notify", "Listener was called, selcetion has changed");
            xMB.execute();
        }
View Full Code Here

                sError = "Error: " + nErrorID;

            if ( xParentPeer != null )
            {
                XMessageBoxFactory xMBFactory = null;
                XMessageBox xMB = null;
                try
                {
                    XMultiComponentFactory xFactory = xContext.getServiceManager();
                    if ( xFactory != null )
                        xMBFactory = (XMessageBoxFactory)UnoRuntime.queryInterface(
View Full Code Here

            oDescriptor.WindowServiceName = windowServiceName;
            oDescriptor.Parent = peer;
            oDescriptor.Type = com.sun.star.awt.WindowClass.MODALTOP;
            oDescriptor.WindowAttributes = windowAttribute;
            XWindowPeer xMsgPeer = xToolkit.createWindow(oDescriptor);
            XMessageBox xMsgbox = (XMessageBox) UnoRuntime.queryInterface(XMessageBox.class, xMsgPeer);
            XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMsgbox);
            xMsgbox.setMessageText(MessageText);
            iMessage = xMsgbox.execute();
            xComponent.dispose();
        }
        catch (Exception e)
        {
            // TODO Auto-generated catch block
View Full Code Here

                sError = "Error: " + nErrorID;

            if ( xParentPeer != null )
            {
                XMessageBoxFactory xMBFactory = null;
                XMessageBox xMB = null;
                try
                {
                    XMultiComponentFactory xFactory = xContext.getServiceManager();
                    if ( xFactory != null )
                        xMBFactory = (XMessageBoxFactory)UnoRuntime.queryInterface(
View Full Code Here

            WindowAttribute.MOVEABLE |
            WindowAttribute.CLOSEABLE;
               
          XWindowPeer xPeer = m_xToolkit.createWindow( aDescriptor );
          if ( null != xPeer ) {
            XMessageBox xMsgBox = (XMessageBox)UnoRuntime.queryInterface(
              XMessageBox.class, xPeer);
            if ( null != xMsgBox )
            {
              xMsgBox.setCaptionText( sTitle );
              xMsgBox.setMessageText( sMessage );
              xMsgBox.execute();
            }
          }
        }
      } catch ( com.sun.star.uno.Exception e) {
        // do your error handling
View Full Code Here

                sError = "Error: " + nErrorID;

            if ( xParentPeer != null )
            {
                XMessageBoxFactory xMBFactory = null;
                XMessageBox xMB = null;
                try
                {
                    XMultiComponentFactory xFactory = xContext.getServiceManager();
                    if ( xFactory != null )
                        xMBFactory = (XMessageBoxFactory)UnoRuntime.queryInterface(
View Full Code Here

            oDescriptor.WindowServiceName = windowServiceName;
            oDescriptor.Parent = peer;
            oDescriptor.Type = com.sun.star.awt.WindowClass.MODALTOP;
            oDescriptor.WindowAttributes = windowAttribute;
            XWindowPeer xMsgPeer = xToolkit.createWindow(oDescriptor);
            XMessageBox xMsgbox = UnoRuntime.queryInterface(XMessageBox.class, xMsgPeer);
            XComponent xComponent = UnoRuntime.queryInterface(XComponent.class, xMsgbox);
            xMsgbox.setMessageText(MessageText);
            iMessage = xMsgbox.execute();
            xComponent.dispose();
        }
        catch (Exception e)
        {
            // TODO Auto-generated catch block
View Full Code Here

    public void dispatch(URL URL, PropertyValue[] Arguments) {
        try {
            XMultiComponentFactory smgr = UnoRuntime.queryInterface(
                XMultiComponentFactory.class, context.getServiceManager());
            XMessageBox box = UnoRuntime.queryInterface(
                XMessageBoxFactory.class,
                smgr.createInstanceWithContext(
                    "com.sun.star.awt.Toolkit", context)).
                createMessageBox(
                    UnoRuntime.queryInterface(
                        XWindowPeer.class,
                        (UnoRuntime.queryInterface(
                            XDesktop.class,
                            smgr.createInstanceWithContext(
                                "com.sun.star.frame.Desktop", context)).
                         getCurrentFrame().getComponentWindow())),
                    new Rectangle(), "infobox", MessageBoxButtons.BUTTONS_OK,
                    "active", "java");
            box.execute();
            UnoRuntime.queryInterface(XComponent.class, box).dispose();
        } catch (com.sun.star.uno.RuntimeException e) {
            throw e;
        } catch (com.sun.star.uno.Exception e) {
            throw new WrappedTargetRuntimeException(
View Full Code Here

TOP

Related Classes of com.sun.star.awt.XMessageBox

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.