Examples of WindowPane


Examples of nextapp.echo2.app.WindowPane

   
    /**
     * Tests basic modal functionality.
     */
    public void testBasicModal() {
        WindowPane windowPane = new WindowPane();
        windowPane.setModal(true);

        assertNull(app.getModalContextRoot());

        app.getDefaultWindow().getContent().add(windowPane);
        assertEquals(windowPane, app.getModalContextRoot());

        app.getDefaultWindow().getContent().remove(windowPane);
        assertNull(app.getModalContextRoot());
       
        windowPane.setModal(false);
        app.getDefaultWindow().getContent().add(windowPane);
        assertNull(app.getModalContextRoot());
       
        windowPane.setModal(true);
        assertEquals(windowPane, app.getModalContextRoot());

        windowPane.setModal(false);
        assertNull(app.getModalContextRoot());
    }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

   
    /**
     * Ensure invisible objects are not in modal context.
     */
    public void testInvisibleModal() {
        WindowPane windowPane = new WindowPane();
        windowPane.setModal(true);
        app.getDefaultWindow().getContent().add(windowPane);
        assertEquals(windowPane, app.getModalContextRoot());
       
        windowPane.setVisible(false);
        assertEquals(null, app.getModalContextRoot());
       
        windowPane.setVisible(true);
        assertEquals(windowPane, app.getModalContextRoot());
       
        app.getDefaultWindow().getContent().remove(windowPane);
        windowPane.setVisible(false);
        app.getDefaultWindow().getContent().add(windowPane);
        assertEquals(null, app.getModalContextRoot());
    }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

        setStyleName("WelcomePane");
        setRenderId("WelcomePane");
       
        Label label;

        WindowPane loginWindow = new WindowPane();
        loginWindow.setTitle("Welcome to the NextApp Echo2 Test Application");
        loginWindow.setStyleName("WelcomePane");
        loginWindow.setClosable(false);
        add(loginWindow);
       
        SplitPane splitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP, new Extent(32));
        loginWindow.add(splitPane);
       
        Row controlRow = new Row();
        controlRow.setStyleName("ControlPane");
        splitPane.add(controlRow);
       
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

   
    /**
     * Test receiving input from client.
     */
    public void testInput() {
        WindowPane windowPane = new WindowPane();
        windowPane.add(new Label("a label"));
        windowPane.setPositionX(TestConstants.EXTENT_100_PX);
        windowPane.setPositionY(TestConstants.EXTENT_100_PX);
        windowPane.processInput(WindowPane.PROPERTY_POSITION_X, TestConstants.EXTENT_200_PX);
        windowPane.processInput(WindowPane.PROPERTY_POSITION_Y, TestConstants.EXTENT_30_PX);
        assertEquals(TestConstants.EXTENT_200_PX, windowPane.getPositionX());
        assertEquals(TestConstants.EXTENT_30_PX, windowPane.getPositionY());
    }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

    /**
     * Attempt to illegally add WindowPane to SplitPane, test for failure.
     */
    public void testInvalidParent() {
        SplitPane splitPane = new SplitPane();
        WindowPane windowPane = new WindowPane();
        boolean exceptionThrown = false;
        try {
            splitPane.add(windowPane);
        } catch (IllegalChildException ex) {
            exceptionThrown = true;
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

    /**
     * Ensure WindowPane can be legally added to a ContentPane.
     */
    public void testValidParent() {
        ContentPane contentPane = new ContentPane();
        WindowPane windowPane = new WindowPane();
        contentPane.add(windowPane);
    }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

   
    /**
     * Attempt to illegally add more than one child, test for failure.
     */
    public void testOverload() {
        WindowPane windowPane = new WindowPane();
        windowPane.add(new Label("one label"));
        boolean exceptionThrown = false;
        try {
            windowPane.add(new Label("one label too many"));
        } catch (IllegalChildException ex) {
            exceptionThrown = true;
        }
        assertTrue(exceptionThrown);
    }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

   
    /**
     * Test primary constructor.
     */
    public void testPrimaryConstructor() {
        WindowPane windowPane = new WindowPane("Hello", TestConstants.EXTENT_500_PX, TestConstants.EXTENT_200_PX);
        assertEquals(TestConstants.EXTENT_500_PX, windowPane.getWidth());
        assertEquals(TestConstants.EXTENT_200_PX, windowPane.getHeight());
        assertEquals("Hello", windowPane.getTitle());
    }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

   
    /**
     * Test property accessors and mutators.
     */
    public void testProperties() {
        WindowPane windowPane = new WindowPane();
        windowPane.setBorder(TestConstants.FILL_IMAGE_BORDER);
        assertEquals(TestConstants.FILL_IMAGE_BORDER, windowPane.getBorder());
        windowPane.setHeight(TestConstants.EXTENT_200_PX);
        assertEquals(TestConstants.EXTENT_200_PX, windowPane.getHeight());
        windowPane.setPositionX(TestConstants.EXTENT_100_PX);
        assertEquals(TestConstants.EXTENT_100_PX, windowPane.getPositionX());
        windowPane.setPositionY(TestConstants.EXTENT_30_PX);
        assertEquals(TestConstants.EXTENT_30_PX, windowPane.getPositionY());
        windowPane.setTitle("Title!");
        assertEquals("Title!", windowPane.getTitle());
        windowPane.setTitleBackground(Color.ORANGE);
        assertEquals(Color.ORANGE, windowPane.getTitleBackground());
        windowPane.setTitleFont(TestConstants.MONOSPACE_12);
        assertEquals(TestConstants.MONOSPACE_12, windowPane.getTitleFont());
        windowPane.setTitleForeground(Color.PINK);
        assertEquals(Color.PINK, windowPane.getTitleForeground());
        windowPane.setWidth(TestConstants.EXTENT_500_PX);
        assertEquals(TestConstants.EXTENT_500_PX, windowPane.getWidth());
        windowPane.setClosable(false);
        assertFalse(windowPane.isClosable());
    }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

       
        return mainWindow;
    }

    private void showDialog(boolean error, String message) {
         WindowPane windowPane = new WindowPane();
         windowPane.setModal(true);
         windowPane.setTitle(error ? "Error" : "Status");
         windowPane.setTitleBackground(error ? Color.RED : Color.GREEN);
         windowPane.setInsets(new Insets(20));
         windowPane.add(new Label(message));
         mainWindow.getContent().add(windowPane);
    }
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.