Package nextapp.echo2.app

Examples of nextapp.echo2.app.Window


     */
    public void testRegistration() {
        ColumnApp columnApp = new ColumnApp();
        ApplicationInstance.setActive(columnApp);
       
        Window window = columnApp.doInit();
        assertTrue(window.isRegistered());
        assertTrue(columnApp.getColumn().isRegistered());
        Label label = new Label();
        assertFalse(label.isRegistered());
        columnApp.getColumn().add(label);
        assertTrue(label.isRegistered());
View Full Code Here


        assertEquals(0, rtc.disposeCount);
       
        ColumnApp columnApp = new ColumnApp(){
       
            public Window init() {
                Window window = super.init();
                getColumn().add(rtc);
                return window;
            }
        };
        ApplicationInstance.setActive(columnApp);
View Full Code Here

     */
    public void testValidation() {
        final ValidatingLabel validatingLabel = new ValidatingLabel();
        ColumnApp app = new ColumnApp() {
            public Window init() {
                Window window = super.init();
                getColumn().add(validatingLabel);
                return window;
            }
        };
       
View Full Code Here

   
    /**
     * @see nextapp.echo2.app.ApplicationInstance#init()
     */
    public Window init() {
        window = new Window();
        contentPane = window.getContent();
        column = new Column();
        label = new Label("Label");
        column.add(label);
        contentPane.add(column);
View Full Code Here

    /**
     * Retrieves all buttons currently displayed in the user-interface and
     * programmatically clicks one.
     */
    public static void clickRandomButton() {
        Window window = ApplicationInstance.getActive().getDefaultWindow();
        List buttonList = new ArrayList();
        findButtons(buttonList, window);
        AbstractButton button = (AbstractButton) buttonList.get((int) (buttonList.size() * Math.random()));
        button.doAction();
    }
View Full Code Here

   
    /**
     * Tests changing content of window.
     */
    public void testChangeContent() {
        Window window = new Window();
        window.setContent(new ContentPane());
        ContentPane content = new ContentPane();
        window.setContent(content);
        assertEquals(content, window.getContent());
    }
View Full Code Here

    /**
     * Attempts to illegally add more than one <code>ContentPane</code>s to a
     * <code>Window</code>, tests for failure.
     */
    public void testOverload() {
        Window window = new Window();
        window.removeAll();
        window.add(new ContentPane());
        boolean exceptionThrown = false;
        try {
            window.add(new ContentPane());
        } catch (IllegalChildException ex) {
            exceptionThrown = true;
        }
        assertTrue(exceptionThrown);
    }
View Full Code Here

    /**
     * Attempts to illegally add a <code>Label</code> to a
     * <code>Window</code>, tests for failure.
     */
    public void testInvalidChild() {
        Window window = new Window();
        window.removeAll();
        boolean exceptionThrown = false;
        try {
            window.add(new Label());
        } catch (IllegalChildException ex) {
            exceptionThrown = true;
        }
        assertTrue(exceptionThrown);
    }
View Full Code Here

   
    /**
     * Tests property accessors and mutators.
     */
    public void testProperties() {
        Window window = new Window();
        window.setTitle("Title!!!");
        assertEquals("Title!!!", window.getTitle());
    }
View Full Code Here

    /**
     * @see nextapp.echo2.app.ApplicationInstance#init()
     */
    public Window init() {
        Window window = new Window();
        window.setTitle("Hello, world!");
       
        ContentPane contentPane = new ContentPane();
        window.setContent(contentPane);
       
        contentPane.add(new Label("Hello, world!"));
       
        return window;
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.Window

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.