Package net.sourceforge.marathon.api

Examples of net.sourceforge.marathon.api.WindowId


        WindowState windowState = new WindowState(window);
        if (windowState.isEmpty())
            return;

        WindowId id = WindowIdCreator.createWindowId(window, windowMonitor);
        WindowStateAction action = new WindowStateAction(id, windowState, scriptModel, windowMonitor);

        if (lastWindowStateAction != null && lastWindowStateAction.equals(action))
            recorder.record(new UndoOperation(lastWindowStateAction, scriptModel, windowMonitor).enscript(id));
        recorder.record(action.enscript(id));
View Full Code Here


public class WindowIdCreator {

    private static List<Integer> windowList = new ArrayList<Integer>();

    public static WindowId createWindowId(Component window, WindowMonitor windowMonitor) {
        return new WindowId(getId(window), windowMonitor.getNamingStrategy().getName(window), getParentTitleForWindow(
                window, windowMonitor), window instanceof JInternalFrame);
    }
View Full Code Here

    }

    @Test
    public void testRecordWindowTagOnSelect() {
        MButton button = new MButton(new JButton("text"), "button1", null, WindowMonitor.getInstance());
        WindowId windowId = new WindowIdMock("dialog1");
        button.setWindowId(windowId);
        recorder.record(new MockRecordedSelect(button.getComponentId(), windowId, "text"));
        AWTSync.sync();
        assertScriptEquals(i1 + "if window('dialog1'):\n" + i2 + "select('button1', 'text')\n" + i1 + "close()\n");
    }
View Full Code Here

        JDialog child = new JDialog(parent, "child");
        grandParent.show();
        parent.show();
        new Snooze(500);
        WindowMonitor windowMonitor = WindowMonitor.getInstance();
        WindowId parentId = WindowIdCreator.createWindowId(parent, windowMonitor);
        child.show();
        new Snooze(500);
        WindowId childId = WindowIdCreator.createWindowId(child, windowMonitor);
        WindowElement parentAction = new WindowElement(parentId);
        WindowElement childAction = new WindowElement(childId);
        Window w = windowMonitor.getWindow(parentId.getTitle());
        assertEquals("parent", windowMonitor.getNamingStrategy().getName(w));
        assertTrue("Parent owns the child", parentAction.owns(childAction));
View Full Code Here

        grandParent.show();
        AWTSync.sync();
        parent.show();
        AWTSync.sync();
        new Snooze(500);
        WindowId parentId = WindowIdCreator.createWindowId(parent, WindowMonitor.getInstance());
        parent.dispose();
        AWTSync.sync();
        new Snooze(500);
        child.show();
        AWTSync.sync();
        new Snooze(500);
        WindowId childId = WindowIdCreator.createWindowId(child, WindowMonitor.getInstance());
        WindowElement parentAction = new WindowElement(parentId);
        WindowElement childAction = new WindowElement(childId);
        assertTrue("Parent does not own the child", !parentAction.owns(childAction));
        child.dispose();
        AWTSync.sync();
View Full Code Here

            return null;
        return runtime.getModuleFunctions();
    }

    public String insertScript(String function) {
        WindowId topWindowId = runtime.getTopWindowId();
        runtime.insertScript(function);
        String s = recorder.recordInsertScriptElement(topWindowId, function);
        return s;
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.marathon.api.WindowId

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.