Package nextapp.echo2.app

Examples of nextapp.echo2.app.Insets


        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);
       
View Full Code Here


        splitPaneLayoutData.setBackground(Color.BLACK);
        logPane.setLayoutData(splitPaneLayoutData);
        splitPane.add(logPane);
       
        column = new Column();
        column.setInsets(new Insets(5));
        logPane.add(column);
    }
View Full Code Here

        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);
View Full Code Here

    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

                if (container.getComponentCount() > 0) {
                    container.removeAll();
                }
                Grid grid = new Grid();
                grid.setBorder(StyleUtil.randomBorder());
                grid.setInsets(new Insets(StyleUtil.randomExtent(8)));
                grid.add(new Label("A label"));
                grid.add(new Label("A label"));
                grid.add(new Label("A label"));
                grid.add(new Label("A label"));
                grid.add(new Label("A label"));
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() < 2) {
                    Row row = new Row();
                    row.setBorder(new Border(new Extent(1), Color.BLACK, Border.STYLE_SOLID));
                    row.setCellSpacing(new Extent(5));
                    row.setInsets(new Insets(10, 5));
                    row.add(new Label("Alpha"));
                    row.add(new Label("Bravo"));
                    row.add(new Label("Charlie"));
                    testPane.add(row);
                }
            }
        });
        controlsColumn.addButton("Add-Remove-Add", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() < 2) {
                    Label label = createPaneLabel("Added at End, Removed, Re-Added");
                    testPane.add(label);
                    testPane.remove(label);
                    testPane.add(label);
                }
            }
        });
        controlsColumn.addButton("Add Button", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() < 2) {
                    Button testButton = new Button("Test Button");
                    SplitPaneLayoutData layoutData = new SplitPaneLayoutData();
                    layoutData.setInsets(new Insets(10));
                    testButton.setLayoutData(layoutData);
                    testButton.setStyleName("Default");
                    testPane.add(testButton);
                }
            }
View Full Code Here

     */
    GamePane() {
        super();
       
        Column layoutColumn = new Column();
        layoutColumn.setInsets(new Insets(30));
        layoutColumn.setCellSpacing(new Extent(10));
        add(layoutColumn);
       
        layoutColumn.add(new Label(new ResourceImageReference("/echo2tutorial/numberguess/TitleBanner.png")));
        layoutColumn.add(statusLabel);
        layoutColumn.add(countLabel);
        layoutColumn.add(promptLabel);
       
        guessEntryField = new TextField();
       
        guessEntryField.setForeground(Color.WHITE);
        guessEntryField.setBackground(Color.BLUE);
        ColumnLayoutData columnLayoutData = new ColumnLayoutData();
        columnLayoutData.setInsets(new Insets(20, 0));
        guessEntryField.setLayoutData(columnLayoutData);
        layoutColumn.add(guessEntryField);
       
        Button submitButton = new Button("Submit Your Guess");
        submitButton.setActionCommand("submit guess");
View Full Code Here

     * @param numberOfTries the number of tries it took the user to guess the
     *        correct answer.
     */
    CongratulationsPane(int numberOfTries) {
        Column layoutColumn = new Column();
        layoutColumn.setInsets(new Insets(30));
        layoutColumn.setCellSpacing(new Extent(30));
        add(layoutColumn);
       
        layoutColumn.add(new Label(new ResourceImageReference("/echo2tutorial/numberguess/CongratulationsBanner.png")));
        layoutColumn.add(new Label("You got the correct answer in " + numberOfTries + (numberOfTries == 1 ? " try." : " tries.")));
View Full Code Here

    private static final Extent EXTENT_4_PX = new Extent(4, Extent.PX);
    private static final Extent EXTENT_2_PT = new Extent(2, Extent.PT);
   
    public void testRenderUnique() {
        CssStyle cssStyle = new CssStyle();
        InsetsRender.renderToStyle(cssStyle, "padding", new Insets(EXTENT_1_PX, EXTENT_2_PX, EXTENT_3_PX, EXTENT_4_PX));
        assertEquals("2px 3px 4px 1px", cssStyle.getAttribute("padding"));
    }
View Full Code Here

        assertEquals("2px 3px 4px 1px", cssStyle.getAttribute("padding"));
    }

    public void testRenderHV() {
        CssStyle cssStyle = new CssStyle();
        InsetsRender.renderToStyle(cssStyle, "padding", new Insets(EXTENT_2_PX, EXTENT_2_PT));
        assertEquals("2pt 2px 2pt 2px", cssStyle.getAttribute("padding"));
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.Insets

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.