Package nextapp.echo2.app

Examples of nextapp.echo2.app.ContentPane


   
    /**
     * 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


        }
       
        Window mainWindow = new Window();
        mainWindow.setTitle("NextApp Echo2 Authentication Test Application");
       
        ContentPane content = new ContentPane();
        mainWindow.setContent(content);
       
        Column mainColumn = new Column();
        mainColumn.setBorder(new Border(new Extent(4), Color.BLUE, Border.STYLE_OUTSET));
        mainColumn.setInsets(new Insets(40));
        mainColumn.setCellSpacing(new Extent(20));
        content.add(mainColumn);
       
        ContainerContext containerContext = (ContainerContext) getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
       
        Principal principal = containerContext.getUserPrincipal();
        mainColumn.add(new Label("getUserPrincipal(): " + (principal == null ? "null" : principal.getName())));
View Full Code Here

            }
        });
        controlRow.add(button);
       
        SplitPaneLayoutData splitPaneLayoutData;
        logPane = new ContentPane();
        logPane.setFont(new Font(Font.MONOSPACE, Font.PLAIN, new Extent(10)));
        logPane.setForeground(Color.GREEN);
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(Color.BLACK);
        logPane.setLayoutData(splitPaneLayoutData);
View Full Code Here

        }
       
        mainWindow = new Window();
        mainWindow.setTitle("NextApp Echo2 Serialization Test Application");
       
        ContentPane content = new ContentPane();
        mainWindow.setContent(content);
       
        Column mainColumn = new Column();
        mainColumn.setBorder(new Border(new Extent(4), Color.BLUE, Border.STYLE_OUTSET));
        mainColumn.setInsets(new Insets(40));
        mainColumn.setCellSpacing(new Extent(20));
        content.add(mainColumn);
       
        Column serializeColumn = new Column();
        mainColumn.add(serializeColumn);
       
        Button button;
View Full Code Here

    /**
     * Test property getter/setter methods.
     */
    public void testProperties() {
        ContentPane contentPane = new ContentPane();
        contentPane.setBackgroundImage(TestConstants.BACKGROUND_IMAGE);
        assertEquals(TestConstants.BACKGROUND_IMAGE, contentPane.getBackgroundImage());
    }
View Full Code Here

     *
     * @param rc the relevant <code>RenderContext</code>
     * @param update the update
     */
    private void renderAddChildren(RenderContext rc, ServerComponentUpdate update) {
        ContentPane contentPane = (ContentPane) update.getParent();
        String elementId = ContainerInstance.getElementId(contentPane);
        Component[] components = update.getParent().getVisibleComponents();
        Component[] addedChildren = update.getAddedChildren();
       
        for (int componentIndex = components.length - 1; componentIndex >= 0; --componentIndex) {
View Full Code Here

    /**
     * @see nextapp.echo2.webcontainer.DomUpdateSupport#renderHtml(nextapp.echo2.webcontainer.RenderContext,
     *      nextapp.echo2.app.update.ServerComponentUpdate, org.w3c.dom.Node, nextapp.echo2.app.Component)
     */
    public void renderHtml(RenderContext rc, ServerComponentUpdate update, Node parentNode, Component component) {
        ContentPane contentPane = (ContentPane) component;
       
        ServerMessage serverMessage = rc.getServerMessage();
        serverMessage.addLibrary(CONTENT_PANE_SERVICE.getId());

        Document document = parentNode.getOwnerDocument();
        Element divElement = document.createElement("div");
        divElement.setAttribute("id", ContainerInstance.getElementId(component));
       
        CssStyle cssStyle = new CssStyle();
        cssStyle.setAttribute("position", "absolute");
        cssStyle.setAttribute("width", "100%");
        cssStyle.setAttribute("height", "100%");
        cssStyle.setAttribute("overflow", "hidden");
        cssStyle.setAttribute("z-index", "0");
        ColorRender.renderToStyle(cssStyle, (Color) contentPane.getRenderProperty(ContentPane.PROPERTY_FOREGROUND),
                (Color) contentPane.getRenderProperty(ContentPane.PROPERTY_BACKGROUND));
        FontRender.renderToStyle(cssStyle, (Font) contentPane.getRenderProperty(ContentPane.PROPERTY_FONT));
        FillImageRender.renderToStyle(cssStyle, rc, this, contentPane, IMAGE_ID_BACKGROUND,
                (FillImage) contentPane.getRenderProperty(ContentPane.PROPERTY_BACKGROUND_IMAGE), 0);
        divElement.setAttribute("style", cssStyle.renderInline());
       
        parentNode.appendChild(divElement);

        // Render initialization directive.
        renderInitDirective(rc, contentPane);
       
        Component[] children = contentPane.getVisibleComponents();
        for (int i = 0; i < children.length; ++i) {
            renderChild(rc, update, divElement, contentPane, children[i]);
        }
    }
View Full Code Here

                }
            });
            childSelectColumn.add(childSelectFields[i]);
        }
       
        testPane = new ContentPane();
        add(testPane);
    }
View Full Code Here

    protected JbsLangEntryHelper createTextField(JbsLanguage language) {
        return new JbsLangEntryTextField(language);
    }

    protected void initPanel() {
        Grid grdMain = new Grid(2);
        grdMain.setInsets(new nextapp.echo2.app.Insets(5, 5));
        grdMain.setColumnWidth(0, new JbsExtent(300));

        Iterator<JbsLangEntryHelper> it = this.getTextFields().iterator();
        while (it.hasNext()) {
            JbsLangEntryTextField txtField = (JbsLangEntryTextField) it.next();
            grdMain.add(new Label(txtField.getLanguage().getName()));
            grdMain.add(txtField);
        }

        this.getPnMain().add(grdMain);
    }
View Full Code Here

    protected JbsContentPane initPnButtons() {
        pnButtons = new JbsContentPane();
        Row mainRow = new Row();
        mainRow.setAlignment(new Alignment(Alignment.RIGHT, Alignment.DEFAULT));
        mainRow.setInsets(new Insets(new JbsExtent(5), new JbsExtent(5)));

        btnOK = new JbsButton(JbsL10N.getString("Generic.ok"));
        btnOK.setAlignmentHorizontal(Alignment.CENTER);
        btnOK.setWidth(new JbsExtent(80));
        btnOK.addActionListener(new ActionListener() {
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.ContentPane

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.