Package net.sourceforge.marathon.event

Examples of net.sourceforge.marathon.event.FireableMouseClickEvent.fire()


        pane.setSelectedIndex(0);
        Rectangle tabBounds = pane.getUI().getTabBounds(pane, 1);
        Point p = SwingUtilities.convertPoint(pane, (tabBounds.x + tabBounds.width) / 2, (tabBounds.y + tabBounds.height) / 2,
                _dialog);
        FireableMouseClickEvent e = new FireableMouseClickEvent(_dialog);
        e.fire(p, 1);
        Thread.sleep(500);
        // assertFalse (_mouseReceiver instanceof JTabbedPane);
        MComponent component = _finder.getMComponentByComponent((Component) _mouseReceiver);
        assertEquals("Component class", MTabbedPane.class, component.getClass());
    }
View Full Code Here


        table.setColumnSelectionAllowed(true);
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        FireableMouseClickEvent event = new FireableMouseClickEvent(table);
        Rectangle r = table.getCellRect(1, 0, false);
        Point p = new Point((int) r.getCenterX(), (int) r.getCenterY());
        event.fire(p, 1);
        assertEquals("rows:[1],columns:[col1]", mTable.getText());
    }
}
View Full Code Here

        dialog.show();
        JTabbedPane pane = dialog.getTabbedPane();
        Rectangle tabBounds = pane.getUI().getTabBounds(pane, 1);
        Point p = new Point(tabBounds.x + 1, tabBounds.y + 1);
        FireableMouseClickEvent e = new FireableMouseClickEvent(pane);
        e.fire(p, 1);
        new Snooze(1000);
        assertEquals(i1 + "if window('tab1'):\n" + i2 + "select('TabPane', 'tab2')\n" + i1 + "close()\n", scriptListener.script);
    }

    private void assertRecorded(String recorded) {
View Full Code Here

        if (r == null)
            throw new ComponentException("Failed to get rowBounds for tree '" + getMComponentName() + "' for row " + row,
                    finder.getScriptModel(), windowMonitor);
        Point p = new Point((int) r.getCenterX(), (int) r.getCenterY());
        if (firstItem)
            event.fire(p, 1);
        else
            event.fire(p, 1, OSUtils.MOUSE_MENU_MASK);
        swingWait();
    }
View Full Code Here

                    finder.getScriptModel(), windowMonitor);
        Point p = new Point((int) r.getCenterX(), (int) r.getCenterY());
        if (firstItem)
            event.fire(p, 1);
        else
            event.fire(p, 1, OSUtils.MOUSE_MENU_MASK);
        swingWait();
    }

    public int clickNeeded(MouseEvent e) {
        return isPopupTrigger(e) ? ClickAction.RECORD_CLICK : ClickAction.RECORD_NONE;
View Full Code Here

    private void createClick(int row, int column, int modifiers) {
        JTable table = getTable();
        FireableMouseClickEvent event = new FireableMouseClickEvent(table);
        Rectangle r = table.getCellRect(row, column, false);
        Point p = new Point((int) r.getCenterX(), (int) r.getCenterY());
        event.fire(p, 1, modifiers);
        swingWait();
    }

    private void createClick(int row, int column) {
        createClick(row, column, 0);
View Full Code Here

        Point p = new Point((int) r.getCenterX(), (int) r.getCenterY());
        eventQueueRunner.invoke(getList(), "ensureIndexIsVisible", new Object[] { Integer.valueOf(index) },
                new Class[] { Integer.TYPE });
        swingWait();
        if (firstItem)
            event.fire(p, 1);
        else
            event.fire(p, 1, OSUtils.MOUSE_MENU_MASK);
        swingWait();
    }
View Full Code Here

                new Class[] { Integer.TYPE });
        swingWait();
        if (firstItem)
            event.fire(p, 1);
        else
            event.fire(p, 1, OSUtils.MOUSE_MENU_MASK);
        swingWait();
    }

    private class MListCellIterator implements Iterator<MComponent> {
        private int totalItems = getRowCount();
View Full Code Here

    public void hover(int hoverDelay) {
        swingWait();
        FireableMouseClickEvent event = new FireableMouseClickEvent(getComponent(), 0, false);
        event.setHoverDelay(hoverDelay);
        event.fire(null, 0, 0);
        swingWait();
    }

    public void mousePressed(int modifiers, Point position) {
        swingWait();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.