Package nextapp.echo2.app.layout

Examples of nextapp.echo2.app.layout.ColumnLayoutData


       
        ks.addActionListener(this);
        topRow.add(ks);

        ButtonPanel buttonPanel = new ButtonPanel();
        ColumnLayoutData buttonPanelLayout = new ColumnLayoutData();
        buttonPanelLayout.setAlignment(new Alignment(Alignment.CENTER, Alignment.TOP));
        buttonPanel.setLayoutData(buttonPanelLayout);
        for (int i = 0; i < buttons.size(); i++) {
            buttonPanel.add((AbstractButton) buttons.get(i));
        }
View Full Code Here


        this.setText(text);
    }
   
    public void addBlankLine() {
        Row row = new Row();
        ColumnLayoutData layout = new ColumnLayoutData();
        layout.setHeight(new JbsExtent(15,JbsExtent.PX));
        row.setLayoutData(layout);
        colText.add(row);
    }
View Full Code Here

     * these properties correctly register updates for the
     * <strong>parent</strong> <code>Component</code>.
     */
    public void testLayoutDataUpdate() {
        ServerComponentUpdate[] componentUpdates;
        ColumnLayoutData columnLayoutData;
        manager.purge();
       
        // Setup.
        Column column = new Column();
        columnApp.getColumn().add(column);
        Label label1 = new Label("Label1");
        column.add(label1);
        Label label2 = new Label("Label2");
        column.add(label2);
        label2.setLayoutData(new ColumnLayoutData());

        componentUpdates = manager.getServerUpdateManager().getComponentUpdates();
        assertEquals(1, componentUpdates.length);
        assertEquals(false, componentUpdates[0].hasUpdatedLayoutDataChildren());
       
        manager.purge();
       
        columnLayoutData = new ColumnLayoutData();
        columnLayoutData.setAlignment(new Alignment(Alignment.CENTER, Alignment.DEFAULT));
        label1.setLayoutData(columnLayoutData);
        componentUpdates = manager.getServerUpdateManager().getComponentUpdates();
        assertEquals(1, componentUpdates.length);
        assertEquals(column, componentUpdates[0].getParent());
        assertFalse(componentUpdates[0].hasAddedChildren());
View Full Code Here

        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);
        componentUpdates = manager.getServerUpdateManager().getComponentUpdates();
View Full Code Here

       
        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

                windowPane.setStyleName("Default");
                windowPane.setDefaultCloseOperation(WindowPane.DISPOSE_ON_CLOSE);
                InteractiveApp.getApp().getDefaultWindow().getContent().add(windowPane);
               
                GridLayoutData gld;
                ColumnLayoutData cld;
               
                Grid grid0 = new Grid();
                grid0.setInsets(new Insets(5));
               
                grid0.add(new Label("Grid 0 Label"));
                grid0.add(new Label("Grid 0 Label"));
                grid0.add(new Label("Grid 0 Label"));
               
                Column column = new Column();
                column.setInsets(new Insets(5));
                grid0.add(column);
               
                column.add(new Label("Column Label"));
                column.add(new Label("Column Label"));
                column.add(new Label("Column Label"));
               
                gld = new GridLayoutData();
                gld.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_50_PX_REPEAT);
                column.setLayoutData(gld);
                grid0.add(column);
               
                Grid grid1 = new Grid();
                grid1.setInsets(new Insets(5));
                cld = new ColumnLayoutData();
                cld.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_5_PX_REPEAT);
                grid1.setLayoutData(cld);
                column.add(grid1);

                grid1.add(new Label("Grid 1 Label"));
                grid1.add(new Label("Grid 1 Label"));
View Full Code Here

                int componentCount = testColumn.getComponentCount();
                if (componentCount == 0) {
                    return;
                }
                Component component =  testColumn.getComponent((int) (Math.random() * componentCount));
                ColumnLayoutData columnLayoutData = new ColumnLayoutData();
                columnLayoutData.setAlignment(StyleUtil.randomAlignmentHV());
                columnLayoutData.setBackground(StyleUtil.randomBrightColor());
                columnLayoutData.setInsets(new Insets((int) (Math.random() * 30)));
                switch((int) (Math.random() * 7)) {
                case 0:
                     columnLayoutData.setBackgroundImage(Styles.BG_SHADOW_DARK_BLUE);
                     break;
                case 1:
                     columnLayoutData.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE);
                     break;
                case 2:
                     columnLayoutData.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_5_PX_REPEAT);
                     break;
                case 3:
                     columnLayoutData.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_1_PERCENT_REPEAT);
                     break;
                default:
                     columnLayoutData.setBackgroundImage(null);
                }
               
                component.setLayoutData(columnLayoutData);
            }
        });
View Full Code Here

        String cellId = ContainerInstance.getElementId(component) + "_cell_" + childId;
        divElement.setAttribute("id", cellId);
       
        // Configure cell style.
        CssStyle cssStyle = new CssStyle();
        ColumnLayoutData layoutData = getLayoutData(child);
        CellLayoutDataRender.renderToElementAndStyle(divElement, cssStyle, child, layoutData, "0px");
        CellLayoutDataRender.renderBackgroundImageToStyle(cssStyle, rc, this, component, child);
        if (layoutData != null) {
            ExtentRender.renderToStyle(cssStyle, "height", layoutData.getHeight());
        }
        divElement.setAttribute("style", cssStyle.renderInline());
       
        parentNode.appendChild(divElement);
       
View Full Code Here

                    break;
                default :
                    align = Alignment.LEFT;
            }
           
            TableLayoutData layoutData = (TableLayoutData)((Label)component).getLayoutData();
            layoutData.setAlignment(new Alignment(align, Alignment.CENTER));
            ((Label)component).setLayoutData(layoutData);
        }
        return component;
    }
View Full Code Here

        //If nor group is found then create a new one:
        if (newColumn == null) {
            newColumn = new Column();
            newColumn.setId(groupName);
            newColumn.setStyleName("Default");
            AccordionPaneLayoutData layoutData = new AccordionPaneLayoutData();
            layoutData.setTitle(groupTitle);
            newColumn.setLayoutData(layoutData);
            this.add(newColumn);
        }
        return newColumn;
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.layout.ColumnLayoutData

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.