Package com.sun.star.awt

Examples of com.sun.star.awt.XMessageBox


            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


  oDescriptor.WindowServiceName = WindowServiceName;
  oDescriptor.Parent = xWindowPeer;
  oDescriptor.Type = com.sun.star.awt.WindowClass.MODALTOP;
  oDescriptor.WindowAttributes = WindowAttribute;
  XWindowPeer xMsgPeer = xToolkit.createWindow(oDescriptor);
  XMessageBox xMsgbox = (XMessageBox) UnoRuntime.queryInterface(XMessageBox.class, xMsgPeer);
  xMsgbox.setMessageText(MessageText);
  iMessage = xMsgbox.execute();
    }
    catch(Exception exception){
        exception.printStackTrace(System.out);
    }
    return iMessage;
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.BORDER | WindowAttribute.MOVEABLE | WindowAttribute.CLOSEABLE;

            XWindowPeer xPeer = 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)
View Full Code Here

                     WindowAttribute.BORDER | WindowAttribute.MOVEABLE | WindowAttribute.CLOSEABLE;

            XWindowPeer xPeer = xToolkit.createWindow(aDescriptor);
            if (null != xPeer)
            {
               XMessageBox xMsgBox = (XMessageBox) UnoRuntime.queryInterface(XMessageBox.class, xPeer);
               if (null != xMsgBox)
               {
                  xMsgBox.setCaptionText("eXo-Platform OOPlug-In.");
                  xMsgBox.setMessageText(sMessage);
                  xMsgBox.execute();
               }
            }
         }
      }
      catch (com.sun.star.uno.Exception e)
View Full Code Here

                              | VclWindowPeerAttribute.YES_NO_CANCEL;

            XWindowPeer xPeer = xToolkit.createWindow(aDescriptor);
            if (null != xPeer)
            {
               XMessageBox xMsgBox = (XMessageBox) UnoRuntime.queryInterface(XMessageBox.class, xPeer);
               if (null != xMsgBox)
               {
                  xMsgBox.setCaptionText("eXo-Platform OOPlug-In.");
                  xMsgBox.setMessageText(sMessage);
                  return xMsgBox.execute();
               }
            }
         }
      }
      catch (com.sun.star.uno.Exception e)
View Full Code Here

                aDescriptor.ParentIndex       = -1;
                aDescriptor.Parent            = (XWindowPeer)UnoRuntime.queryInterface(XWindowPeer.class, m_xFrame.getContainerWindow());
                XWindowPeer xPeer = xToolkit.createWindow( aDescriptor );
                if ( null != xPeer ) {
                    Rectangle aRectangle = new Rectangle();
                    XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox( xPeer, aRectangle, "warningbox", com.sun.star.awt.MessageBoxButtons.BUTTONS_OK_CANCEL, sTitle, sMessage);
                    if (xMessageBox != null){
                        m_sMessageValue = xMessageBox.execute();
                        XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMessageBox);
                        if(xComponent != null)
                            xComponent.dispose();
                    }
                }
View Full Code Here

                aDescriptor.ParentIndex       = -1;
                aDescriptor.Parent            = (XWindowPeer)UnoRuntime.queryInterface(XWindowPeer.class, m_xFrame.getContainerWindow());
                XWindowPeer xPeer = xToolkit.createWindow( aDescriptor );
                if ( null != xPeer ) {
                    Rectangle aRectangle = new Rectangle();
                    XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox( xPeer, aRectangle, "messbox", com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, sTitle, sMessage);
                    if (xMessageBox != null){
                        xMessageBox.execute();
                        XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMessageBox);
                        if(xComponent != null)
                            xComponent.dispose();
                    }
                }
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

        public void showErrorMessageBox(XWindowPeer _xWindowPeer, String _sTitle, String _sMessage){
        try {
            Object oToolkit = m_xComponentContext.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit", m_xComponentContext);
            XMessageBoxFactory xMessageBoxFactory = (XMessageBoxFactory) UnoRuntime.queryInterface(XMessageBoxFactory.class, oToolkit);
            Rectangle aRectangle = new Rectangle();
            XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xWindowPeer, aRectangle, "errorbox", com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle, _sMessage);
            XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMessageBox);
            if (xMessageBox != null){
                short nResult = xMessageBox.execute();
                xComponent.dispose();
            }
        } catch (com.sun.star.uno.Exception ex) {
            ex.printStackTrace(System.out);
        }}
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.