Package nextapp.echo2.app

Examples of nextapp.echo2.app.Column


     *        * Column1 [REMOVED]
     *          X Column2 [REMOVED DESCENDANT]
     *            X label [REMOVED DESCENDANT]
     */
    public void testRemove2() {
        Column column1 = new Column();
        Column column2 = new Column();
        column1.add(column2);
        Label label = new Label();
        column2.add(label);
        columnApp.getColumn().add(column1);
        manager.purge();
       
        column1.remove(column2);
        columnApp.getColumn().remove(column1);
View Full Code Here


    /**
     * Ensure updates are returned sorted by component depth.
     */
    public void testUpdateSorting2() {
        ServerComponentUpdate[] componentUpdates;
        Column column2 = new Column();
        columnApp.getColumn().add(column2);
        Label label2 = new Label();
        column2.add(label2);
        manager.purge();

        columnApp.getLabel().setBackground(Color.BLUE);
        columnApp.getContentPane().setBackground(Color.RED);
        columnApp.getColumn().setBackground(Color.GREEN);
        label2.setBackground(Color.YELLOW);
        column2.setBackground(Color.ORANGE);

        componentUpdates = manager.getServerUpdateManager().getComponentUpdates();
        assertEquals(5, componentUpdates.length);
        assertEquals(columnApp.getContentPane(), componentUpdates[0].getParent());
        assertEquals(columnApp.getColumn(), componentUpdates[1].getParent());
        assertTrue(columnApp.getLabel().equals(componentUpdates[2].getParent())
                || columnApp.getLabel().equals(componentUpdates[3].getParent()));
        assertTrue(column2.equals(componentUpdates[2].getParent())
                || column2.equals(componentUpdates[3].getParent()));
        assertEquals(label2, componentUpdates[4].getParent());
    }
View Full Code Here

        ServerComponentUpdate[] componentUpdates;
        manager.purge();
       
        // Setup.
        Column column = new Column();
        columnApp.getColumn().add(column);
        Label label1 = new Label("Label1");
        column.add(label1);
        Label label2 = new Label("Label2");
        label2.setVisible(false);
        column.add(label2);
        label2.setLayoutData(new ColumnLayoutData());

        manager.purge();
       
        label1.setVisible(false);
View Full Code Here

    /**
     * Test property getter/setter methods.
     */
    public void testProperties() {
        Column column = new Column();
        column.setBorder(TestConstants.BORDER_THICK_ORANGE);
        column.setCellSpacing(TestConstants.EXTENT_100_PX);
        column.setInsets(TestConstants.INSETS_1234);
        assertEquals(TestConstants.BORDER_THICK_ORANGE, column.getBorder());
        assertEquals(TestConstants.EXTENT_100_PX, column.getCellSpacing());
        assertEquals(TestConstants.INSETS_1234, column.getInsets());
    }
View Full Code Here

                    final WindowPane windowPane = new WindowPane();
                    positionWindowPane(windowPane);
                    windowPane.setTitle("Default-Border Window #" + windowNumber++);
                    targetContentPane.add(windowPane);
                   
                    Column windowPaneColumn = new Column();
                    windowPane.add(windowPaneColumn);
                    windowPaneColumn.add(new Label("First Name:"));
                    windowPaneColumn.add(new TextField());
                    windowPaneColumn.add(new Label("Last Name:"));
                    windowPaneColumn.add(new TextField());
                }
            });
            addButton("Add Immovable Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    WindowPane windowPane = createSimpleWindow("Immovable");
                    windowPane.setMovable(false);
                    targetContentPane.add(windowPane);
                }
            });
            addButton("Add Fixed Size Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    WindowPane windowPane = createSimpleWindow("Fixed Size");
                    windowPane.setResizable(false);
                    targetContentPane.add(windowPane);
                }
            });
            addButton("Add Immovable Fixed Size Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    WindowPane windowPane = createSimpleWindow("Immovable Fixed Size");
                    windowPane.setMovable(false);
                    windowPane.setResizable(false);
                    targetContentPane.add(windowPane);
                }
            });
            addButton("Add SplitPane Window (No Close Icon)", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    final WindowPane windowPane = new WindowPane();
                    windowPane.setClosable(false);
                    positionWindowPane(windowPane);
                    targetContentPane.add(windowPane);
                    windowPane.setTitle("SplitPane Window #" + windowNumber++);
                    windowPane.setTitleInsets(new Insets(10, 5));
                    windowPane.setStyleName("Default");
                    windowPane.setTitleBackground(new Color(0x2f2f4f));
                    windowPane.setWidth(new Extent(500, Extent.PX));
                    windowPane.setHeight(new Extent(300, Extent.PX));
                    SplitPane splitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP, new Extent(42));
                    SplitPaneLayoutData splitPaneLayoutData;
                   
                    Button okButton = new Button("Ok");
                    okButton.addActionListener(new ActionListener() {
                        /**
                         * @see nextapp.echo2.app.event.ActionListener#actionPerformed(nextapp.echo2.app.event.ActionEvent)
                         */
                        public void actionPerformed(ActionEvent e) {
                            windowPane.getParent().remove(windowPane);
                        }
                    });
                    splitPaneLayoutData = new SplitPaneLayoutData();
                    splitPaneLayoutData.setBackground(new Color(0x5f5f9f));
                    splitPaneLayoutData.setInsets(new Insets(8));
                    splitPaneLayoutData.setAlignment(new Alignment(Alignment.CENTER, Alignment.DEFAULT));
                    splitPaneLayoutData.setOverflow(SplitPaneLayoutData.OVERFLOW_HIDDEN);
                    okButton.setLayoutData(splitPaneLayoutData);
                    okButton.setWidth(new Extent(100));
                    okButton.setStyleName("Default");
                    splitPane.add(okButton);
                   
                    Label contentLabel = new Label(StyleUtil.QUASI_LATIN_TEXT_1);
                    splitPaneLayoutData = new SplitPaneLayoutData();
                    splitPaneLayoutData.setBackground(new Color(0xefefff));
                    contentLabel.setLayoutData(splitPaneLayoutData);
                    splitPane.add(contentLabel);
                   
                    windowPane.add(splitPane);
                }
            });
   
            addButton("Add Multiple SplitPane Nautilus Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    final WindowPane windowPane = new WindowPane();
                    windowPane.setStyleName("Default");
                    windowPane.setWidth(new Extent(500, Extent.PX));
                    windowPane.setHeight(new Extent(500, Extent.PX));
                    windowPane.setTitle("SP Nautilus Window #" + windowNumber++);
                    windowPane.add(new SplitPaneNestedTest(new Extent(50)));
                    positionWindowPane(windowPane);
                    targetContentPane.add(windowPane);
                }
            });
           
            addButton("Add Multiple SplitPane Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    final WindowPane windowPane = new WindowPane();
                    positionWindowPane(windowPane);
                    targetContentPane.add(windowPane);
                    windowPane.setTitle("Multiple SplitPane Window #" + windowNumber++);
                    windowPane.setTitleInsets(new Insets(10, 5));
                    windowPane.setStyleName("Default");
                    windowPane.setTitleBackground(new Color(0x2f2f4f));
                    windowPane.setWidth(new Extent(700, Extent.PX));
                    windowPane.setHeight(new Extent(500, Extent.PX));
                   
                    SplitPane splitPane1 = new SplitPane(SplitPane.ORIENTATION_HORIZONTAL, new Extent(100));
                    splitPane1.setStyleName("DefaultResizable");
                    SplitPaneLayoutData splitPaneLayoutData;
                   
                    Label label;
                   
                    label = new Label(StyleUtil.QUASI_LATIN_TEXT_1);
                    splitPaneLayoutData = new SplitPaneLayoutData();
                    splitPaneLayoutData.setBackground(new Color(0x3fbf5f));
                    splitPaneLayoutData.setInsets(new Insets(5));
                    label.setLayoutData(splitPaneLayoutData);
                    splitPane1.add(label);

                    SplitPane splitPane2 = new SplitPane(SplitPane.ORIENTATION_VERTICAL, new Extent(120));
                    splitPane2.setStyleName("DefaultResizable");
                   
                    SplitPane splitPane3 = new SplitPane(SplitPane.ORIENTATION_HORIZONTAL, new Extent(200));
                    splitPane3.setStyleName("DefaultResizable");
                    splitPane2.add(splitPane3);
                   
                    SplitPane splitPane4 = new SplitPane(SplitPane.ORIENTATION_HORIZONTAL, new Extent(300));
                    splitPane4.setStyleName("DefaultResizable");
                    splitPane2.add(splitPane4);
                   
                    label = new Label(StyleUtil.QUASI_LATIN_TEXT_1);
                    splitPaneLayoutData = new SplitPaneLayoutData();
                    splitPaneLayoutData.setBackground(new Color(0x5f3fbf));
                    splitPaneLayoutData.setInsets(new Insets(5));
                    label.setLayoutData(splitPaneLayoutData);
                    splitPane3.add(label);
                   
                    label = new Label(StyleUtil.QUASI_LATIN_TEXT_1);
                    splitPaneLayoutData = new SplitPaneLayoutData();
                    splitPaneLayoutData.setBackground(new Color(0x3f5fbf));
                    splitPaneLayoutData.setInsets(new Insets(5));
                    label.setLayoutData(splitPaneLayoutData);
                    splitPane3.add(label);
                   
                    label = new Label(StyleUtil.QUASI_LATIN_TEXT_1);
                    splitPaneLayoutData = new SplitPaneLayoutData();
                    splitPaneLayoutData.setBackground(new Color(0xbf5f3f));
                    splitPaneLayoutData.setInsets(new Insets(5));
                    label.setLayoutData(splitPaneLayoutData);
                    splitPane4.add(label);
                   
                    label = new Label(StyleUtil.QUASI_LATIN_TEXT_1);
                    splitPaneLayoutData = new SplitPaneLayoutData();
                    splitPaneLayoutData.setBackground(new Color(0xbf3f5f));
                    splitPaneLayoutData.setInsets(new Insets(5));
                    label.setLayoutData(splitPaneLayoutData);
                    splitPane4.add(label);
   
                    splitPane1.add(splitPane2);
                   
                    windowPane.add(splitPane1);
                }
            });

            addButton("Add Mozilla TextField Quirk Workaround Test Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    targetContentPane.add(createMozillaTextFieldQuirkTestWindow());
                }
            });
           
            addButton("Add init() bug-fix test Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    WindowPane windowPane = new WindowPane();
                    windowPane.add(new Column() {
                        public void init() {
                            super.init();
                            add(new Label("Test"));
                        }
                        public void dispose() {
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                getApplicationInstance().setLocale(new Locale("ar"));
            }
        });

        testColumn = new Column();
        testColumn.setCellSpacing(new Extent(5));
        SplitPaneLayoutData splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(10));
        testColumn.setLayoutData(splitPaneLayoutData);
        add(testColumn);
View Full Code Here

       
        horizontalPane = new SplitPane(SplitPane.ORIENTATION_HORIZONTAL, new Extent(215));
        horizontalPane.setStyleName("DefaultResizable");
        verticalPane.add(horizontalPane);
       
        Column controlsColumn = new Column();
        controlsColumn.setStyleName("ApplicationControlsColumn");
        controlsColumn.setCellSpacing(new Extent(5));
       
        horizontalPane.add(controlsColumn);
       
        testLaunchButtonsColumn = new Column();
        controlsColumn.add(testLaunchButtonsColumn);

        addTest("Button", "ButtonTest");
        addTest("Client Configuration", "ClientConfigurationTest");
        addTest("Client Exception", "ClientExceptionTest");
        addTest("Column", "ColumnTest");
        addTest("Command", "CommandTest");
        addTest("Composite", "CompositeTest");
        addTest("Container Context", "ContainerContextTest");
        addTest("ContentPane", "ContentPaneTest");
        addTest("Delay", "DelayTest");
        addTest("Exception", "ExceptionTest");
        addTest("Grid", "GridTest");
        addTest("Hierarchy", "HierarchyTest");
        addTest("Image", "ImageReferenceTest");
        addTest("Label", "LabelTest");
        addTest("ListBox", "ListBoxTest");
        addTest("ListBox (Large Quantity)", "ListRenderTableTest");
        addTest("Localization", "LocalizationTest");
        addTest("Panel", "PanelTest");
        addTest("Push (Basic)", "PushTest");
        addTest("Push (Ghost Test)", "PushGhostTest");
        addTest("Random Click", "RandomClickTest");
        addTest("Row", "RowTest");
        addTest("SplitPane (Basic)", "SplitPaneTest");
        addTest("SplitPane (Nested)", "SplitPaneNestedTest");
        addTest("StyleSheet", "StyleSheetTest");
        addTest("Table", "TableTest");
        addTest("Table (Performance)", "TablePerformanceTest");
        addTest("TextComponent", "TextComponentTest");
        addTest("Text Sync", "TextSyncTest");
        addTest("Visibility", "VisibilityTest");
        addTest("Window", "WindowTest");
        addTest("WindowPane", "WindowPaneTest");
        addTest("WindowPane Examples", "WindowPaneExamplesTest");
       
        Column applicationControlsColumn = new Column();
        controlsColumn.add(applicationControlsColumn);

        Button button = new Button("Exit");
        button.setRenderId("Exit");
        button.setId("ExitTestApplication");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                InteractiveApp.getApp().displayWelcomePane();
            }
        });
        applicationControlsColumn.add(button);
    }
View Full Code Here

                InteractiveApp.getApp().displayTestPane();
            }
        });
        controlRow.add(button);
       
        Column infoColumn = new Column();
        infoColumn.setInsets(new Insets(20, 5));
        infoColumn.setCellSpacing(new Extent(10));
        splitPane.add(infoColumn);
       
        label = new Label("Please read the following before using the test application:");
        label.setFont(new Font(null, Font.BOLD, null));
        infoColumn.add(label);
       
        label = new Label("This application was built to interactively test components of Echo2 during development.  "
                + "It is also being (mis)used as a public demonstration of Echo2's capabilities. "
                + "Note that if this is a development version of Echo, then some "
                + "of the features and capabilities demonstrated in this application may not be complete.");
        infoColumn.add(label);
       
        label = new Label("Note that you may watch the AJAX XML messages being sent between the client and server by "
                + "enabling \"Debug Mode\".  Debug Mode may be enabled "
                + "by appending \"?debug\" to the end of the URL of this application (for example: "
                + "\"http://demo.nextapp.com/InteractiveTest/ia?debug\"). "
                + "Please be aware that Debug Mode will in most cases result in EXTREMELY SLOW PERFORMANCE. "
                + "You may exit Debug Mode at any time by simply closing the Debug window.");
        infoColumn.add(label);

        label = new Label("Please visit the Echo2 Home Page @ http://echo.nextapp.com for more information.");
        infoColumn.add(label);
       
        Column column = new Column();
        column.setRenderId("MainColumn");
        column.setStyleName("WelcomePane.Column");
        add(column);
       
        label = new Label(Styles.NEXTAPP_LOGO);
        column.add(label);
       
        label = new Label(Styles.ECHO2_IMAGE);
        column.add(label);
       
        label = new Label(Styles.INTERACTIVE_TEST_APPLICATION_IMAGE);
        column.add(label);
    }
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                adjustVisibility(false);
            }
        });

        testColumn = new Column();
        testColumn.setCellSpacing(new Extent(5));
        SplitPaneLayoutData splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(10));
        testColumn.setLayoutData(splitPaneLayoutData);
        add(testColumn);
View Full Code Here

       
        ApplicationInstance app = ApplicationInstance.getActive();
        ContainerContext containerContext
                = (ContainerContext) app.getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
       
        Column clientPropertiesColumn = new Column();
        add(clientPropertiesColumn);
        clientPropertiesColumn.add(new Label("Client Properties"));
        clientPropertiesColumn.add(createClientPropertiesTable(containerContext));
       
        Column initialParametersColumn = new Column();
        add(initialParametersColumn);
        initialParametersColumn.add(new Label("Initial Parameters"));
        initialParametersColumn.add(createInitialParametersTable(containerContext));
       
        Column applicationPropertiesColumn = new Column();
        add(applicationPropertiesColumn);
        applicationPropertiesColumn.add(new Label("ApplicationInstance Properties"));
        applicationPropertiesColumn.add(createApplicationPropertiesTable(app));
       
        Column cookiesColumn = new Column();
        add(cookiesColumn);
        cookiesColumn.add(new Label("Cookies"));
        cookiesColumn.add(createCookieTable(containerContext));
        Button setCookieButton = new Button("Set Cookie");
        setCookieButton.setStyleName("Default");
        setCookieButton.addActionListener(new ActionListener() {
       
            public void actionPerformed(ActionEvent e) {
                int value = (int) (Math.random() * 3);
                Cookie cookie = new Cookie("TestCookie" + value, "Mmmmm Cookies " + value);
                BrowserSetCookieCommand command = new BrowserSetCookieCommand(cookie);
                ApplicationInstance.getActive().enqueueCommand(command);
            }
        });
        cookiesColumn.add(setCookieButton);
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.Column

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.