Package util

Examples of util.UITools


            log.println("createMessageBox() thread was interrupted") ;
            result = false ;
        }
        result &= execThread.isAlive() ;
       
        UITools oUITools = new UITools((XMultiServiceFactory) tParam.getMSF(), xModel);
       
        XWindow xWindow = null;
        try{
            xWindow = oUITools.getActiveTopWindow();
           
            oUITools.printAccessibleTree(log, tParam.getBool("DebugIsActive"));
           
            oUITools.clickButton("OK");
           
        } catch (java.lang.Exception e) {
            e.printStackTrace((PrintWriter) log);
            log.println("Could not cklick 'OK' on messagebox: " + e.toString());
            result = false;
View Full Code Here


  log.println("Opening document with label wizard");
  xTextDoc = wHelper.openFromDialog("private:factory/swriter?slot=21051", "", false);
        shortWait();
        XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, wHelper.getToolkit ().getActiveTopWindow ());
        UITools ut = new UITools(m_xMSF,xWindow);
        notifyEvents.clear();
        log.println("pressing button 'New Document'");
        try{
            ut.clickButton ("New Document");
        } catch (Exception e) {
            log.println("Couldn't press Button");
        }
        log.println("... done");
        shortWait();
View Full Code Here

  log.println("Opening document with label wizard");
  xTextDoc = wHelper.openFromDialog("private:factory/swriter?slot=21051", "", false);
        shortWait();
        XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, wHelper.getToolkit ().getActiveTopWindow ());
        UITools ut = new UITools(m_xMSF,xWindow);
        notifyEvents.clear();
        log.println("pressing button 'New Document'");
        try{
            ut.clickButton ("New Document");
        } catch (Exception e) {
            log.println("Couldn't press Button");
        }
        log.println("... done");
        shortWait();
View Full Code Here

        sleep();

        try
        {
            final XWindow dialog = getActiveWindow();
            final UITools uiTools = new UITools(getORB(), dialog);
            final XAccessible root = uiTools.getRoot();
            final XAccessibleContext accContext = root.getAccessibleContext();
            final int count = accContext.getAccessibleChildCount();
            String buttonName = "Create";
            final XAccessibleContext childContext = accContext.getAccessibleChild(count - 3).getAccessibleContext();
            final String name = childContext.getAccessibleName();
            if (name != null && !"".equals(name))
            {
                buttonName = name;
            }
            try
            {
                uiTools.clickButton(buttonName);
            }
            catch (java.lang.Exception exception)
            {
                exception.printStackTrace();
            }
View Full Code Here

        }
    }
   
    private XAccessibleContext getAccessibleContext(XMutableTreeNode xNode ){
       
        UITools oDocUITools = new UITools(this.mxMSF, this.xTextDoc);
       
        XWindow xDialogWindow = null;
        try {
           
            xDialogWindow = oDocUITools.getActiveTopWindow();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
       
        UITools oDialog = new UITools(mxMSF, xDialogWindow);
       
        oDialog.printAccessibleTree(log, debug);
       
        return null;
       
    }
View Full Code Here

        if (false) {
            System.out.println("Opening document with label wizard");
            XTextDocument xTextDoc = wHelper.openFromDialog("private:factory/swriter?slot=21051", "", false);
            shortWait();
            XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, wHelper.getToolkit().getActiveTopWindow());
            UITools ut = new UITools(m_xMSF,xWindow);
            notifyEvents.clear();
            System.out.println("pressing button 'New Document'");
            try{
                ut.clickButton ("New Document");
            } catch (Exception e) {
                System.out.println("Couldn't press Button");
            }
            System.out.println("... done");
            shortWait();
View Full Code Here

        sleep();

        try
        {
            final XWindow dialog = getActiveWindow();
            final UITools uiTools = new UITools(getMSF(), dialog);
            final XAccessible root = uiTools.getRoot();
            final XAccessibleContext accContext = root.getAccessibleContext();
            final int count = accContext.getAccessibleChildCount();
            String buttonName = "Create";
            final XAccessibleContext childContext = accContext.getAccessibleChild(count - 3).getAccessibleContext();
            final String name = childContext.getAccessibleName();
            if (name != null && !"".equals(name))
            {
                buttonName = name;
            }
            try
            {
                uiTools.clickButton(buttonName);
            }
            catch (java.lang.Exception exception)
            {
                exception.printStackTrace( System.err );
            }
View Full Code Here

    public void _createMessageBox() {
        final XMessageBox mb = oObj.createMessageBox(
            (XWindowPeer) tEnv.getObjRelation("WINPEER"),
            new Rectangle(0, 0, 100, 100), "errorbox", 1, "The Title",
            "The Message");
        final UITools tools = new UITools(
            (XMultiServiceFactory) tParam.getMSF(),
            UnoRuntime.queryInterface(XWindow.class, mb));
        final boolean[] done = new boolean[] { false };
        final boolean[] good = new boolean[] { false };
        XRequestCallback async = AsyncCallback.create(
            tParam.getComponentContext());
        async.addCallback(
            new XCallback() {
                public void notify(Object aData) {
                    mb.execute();
                    synchronized (done) {
                        done[0] = true;
                        done.notifyAll();
                    }
                }
            },
            Any.VOID);
        async.addCallback(
            new XCallback() {
                public void notify(Object aData) {
                    try {
                        tools.clickButton("OK");
                    } catch (RuntimeException e) {
                        throw e;
                    } catch (Exception e) {
                        throw new RuntimeException(e);
                    }
View Full Code Here

        this.buttonName = buttonName;
    }

    public void run() {
        try{
            UITools oUITools = new UITools(xMSF, xWindow);
           
            oUITools.clickButton(buttonName);
           
        } catch (Exception e){}
    }
View Full Code Here

        XWindow oDialog = getActiveWindow(xMSF);

        if (oDialog == null) throw new com.sun.star.accessibility.IllegalAccessibleComponentStateException("could not get modal Dialog");


        UITools oUITools = new UITools(xMSF, oDialog);
        oUITools.printAccessibleTree((PrintWriter) log, param.getBool(PropertyName.DEBUG_IS_ACTIVE));

        try{
            log.println("click ' " + buttonName + "' button..");
            oUITools.clickButton(buttonName);
        } catch ( java.lang.Exception e){
            throw new com.sun.star.accessibility.IllegalAccessibleComponentStateException("Could not klick '"+buttonName +"' at modal dialog: " + e.toString());
        }
        pause();
    }
View Full Code Here

TOP

Related Classes of util.UITools

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.