Package nextapp.echo2.app.layout

Examples of nextapp.echo2.app.layout.SplitPaneLayoutData


            }
        });

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


    public ContainerContextTest() {
        super();
       
        setCellSpacing(new Extent(10));
       
        SplitPaneLayoutData splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(10));
        setLayoutData(splitPaneLayoutData);
       
        ApplicationInstance app = ApplicationInstance.getActive();
        ContainerContext containerContext
                = (ContainerContext) app.getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
View Full Code Here

                column.removeAll();
            }
        });
        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);
        splitPane.add(logPane);
       
        column = new Column();
        column.setInsets(new Insets(5));
View Full Code Here

        });
        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

        add(testPane);
    }
   
    private Label createPaneLabel(String text) {
        Label label = new Label(text);
        SplitPaneLayoutData splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(StyleUtil.randomBrightColor());
        label.setLayoutData(splitPaneLayoutData);
        return label;
    }
View Full Code Here

     * @param containerElement the container element
     * @param component the child component
     * @param index the child index
     */
    private void renderLayoutData(RenderContext rc, Element containerElement, Component component, int index) {
        SplitPaneLayoutData layoutData = (SplitPaneLayoutData) component.getRenderProperty(SplitPane.PROPERTY_LAYOUT_DATA);
        if (layoutData == null) {
            return;
        }
        Element layoutDataElement = rc.getServerMessage().getDocument().createElement("layout-data");
        layoutDataElement.setAttribute("index", Integer.toString(index));
        if (layoutData.getAlignment() != null) {
            CssStyle alignmentStyle = new CssStyle();
            AlignmentRender.renderToStyle(alignmentStyle, layoutData.getAlignment(), component);
            layoutDataElement.setAttribute("alignment", alignmentStyle.renderInline());
        }
        if (layoutData.getBackground() != null) {
            layoutDataElement.setAttribute("background", ColorRender.renderCssAttributeValue(layoutData.getBackground()));
        }
        if (layoutData.getBackgroundImage() != null) {
            CssStyle backgroundImageStyle = new CssStyle();
            FillImageRender.renderToStyle(backgroundImageStyle, rc, this, component.getParent()
                    index == 0 ? IMAGE_ID_PANE_0_BACKGROUND : IMAGE_ID_PANE_1_BACKGROUND, layoutData.getBackgroundImage(), 0);
            layoutDataElement.setAttribute("background-image", backgroundImageStyle.renderInline());
        }
        if (!(component instanceof Pane) && layoutData.getInsets() != null) {
            layoutDataElement.setAttribute("insets", InsetsRender.renderCssAttributeValue(layoutData.getInsets()));
        }
        switch (layoutData.getOverflow()) {
        case SplitPaneLayoutData.OVERFLOW_AUTO:
            layoutDataElement.setAttribute("overflow", "auto");
            break;
        case SplitPaneLayoutData.OVERFLOW_HIDDEN:
            layoutDataElement.setAttribute("overflow", "hidden");
            break;
        case SplitPaneLayoutData.OVERFLOW_SCROLL:
            layoutDataElement.setAttribute("overflow", "scroll");
            break;
        }
        if (layoutData.getMinimumSize() != null) {
            layoutDataElement.setAttribute("min-size", Integer.toString(ExtentRender.toPixels(layoutData.getMinimumSize(), -1)));
        }
        if (layoutData.getMaximumSize() != null) {
            layoutDataElement.setAttribute("max-size", Integer.toString(ExtentRender.toPixels(layoutData.getMaximumSize(), -1)));
        }
       
        containerElement.appendChild(layoutDataElement);
    }
View Full Code Here

    /**
     * Default constructor.
     */
    public ClientConfigurationTest() {
        super();
        SplitPaneLayoutData splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(10));
        setLayoutData(splitPaneLayoutData);
        setCellSpacing(new Extent(20));
       
        Grid grid = new Grid(2);
        grid.setBorder(new Border(2, Color.BLUE, Border.STYLE_GROOVE));
View Full Code Here

   
    public TextComponentTest() {
        super(SplitPane.ORIENTATION_HORIZONTAL, new Extent(250, Extent.PX));
        setStyleName("DefaultResizable");

        SplitPaneLayoutData splitPaneLayoutData;
       
        ButtonColumn controlsColumn = new ButtonColumn();
        controlsColumn.setStyleName("TestControlsColumn");
        add(controlsColumn);

        Column testColumn = new Column();
        testColumn.setCellSpacing(new Extent(15));
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(15));
        testColumn.setLayoutData(splitPaneLayoutData);
        add(testColumn);
       
        final TextField textField = new TextField();
        textField.setBorder(new Border(1, Color.BLUE, Border.STYLE_SOLID));
View Full Code Here

        super(SplitPane.ORIENTATION_VERTICAL, paneSize);
        setStyleName("DefaultResizable");
        setFont(BIG_FONT);
       
        Label label;
        SplitPaneLayoutData splitPaneLayoutData;
       
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(COLOR_A);
        splitPaneLayoutData.setInsets(INSETS_10);
        label = new Label("A");
        label.setLayoutData(splitPaneLayoutData);
        add(label);
        SplitPane splitPaneAlpha = new SplitPane(SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING, paneSize);
        splitPaneAlpha.setStyleName("DefaultResizable");
        add(splitPaneAlpha);
       
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(COLOR_B);
        splitPaneLayoutData.setInsets(INSETS_10);
        label = new Label("B");
        label.setLayoutData(splitPaneLayoutData);
        splitPaneAlpha.add(label);
        SplitPane splitPaneBravo = new SplitPane(SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP, paneSize);
        splitPaneBravo.setStyleName("DefaultResizable");
        splitPaneAlpha.add(splitPaneBravo);
       
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(COLOR_C);
        splitPaneLayoutData.setInsets(INSETS_10);
        label = new Label("C");
        label.setLayoutData(splitPaneLayoutData);
        splitPaneBravo.add(label);
        SplitPane splitPaneCharlie = new SplitPane(SplitPane.ORIENTATION_HORIZONTAL_TRAILING_LEADING, paneSize);
        splitPaneCharlie.setStyleName("DefaultResizable");
        splitPaneBravo.add(splitPaneCharlie);
       
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(COLOR_D);
        splitPaneLayoutData.setInsets(INSETS_10);
        label = new Label("D");
        label.setLayoutData(splitPaneLayoutData);
        splitPaneCharlie.add(label);
        SplitPane splitPaneDelta = new SplitPane(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM, paneSize);
        splitPaneDelta.setStyleName("DefaultResizable");
        splitPaneCharlie.add(splitPaneDelta);
       
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(COLOR_E);
        splitPaneLayoutData.setInsets(INSETS_10);
        label = new Label("E");
        label.setLayoutData(splitPaneLayoutData);
        splitPaneDelta.add(label);
        SplitPane splitPaneEcho = new SplitPane(SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING, paneSize);
        splitPaneEcho.setStyleName("DefaultResizable");
        splitPaneDelta.add(splitPaneEcho);

        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(COLOR_F);
        splitPaneLayoutData.setInsets(INSETS_10);
        label = new Label("F");
        label.setLayoutData(splitPaneLayoutData);
        splitPaneEcho.add(label);
        SplitPane splitPaneFoxtrot = new SplitPane(SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP, paneSize);
        splitPaneFoxtrot.setStyleName("DefaultResizable");
        splitPaneEcho.add(splitPaneFoxtrot);

        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(COLOR_G);
        splitPaneLayoutData.setInsets(INSETS_10);
        label = new Label("G");
        label.setLayoutData(splitPaneLayoutData);
        splitPaneFoxtrot.add(label);
        SplitPane splitPaneGolf = new SplitPane(SplitPane.ORIENTATION_HORIZONTAL_TRAILING_LEADING, paneSize);
        splitPaneGolf.setStyleName("DefaultResizable");
        splitPaneFoxtrot.add(splitPaneGolf);

        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(COLOR_H);
        splitPaneLayoutData.setInsets(INSETS_10);
        label = new Label("H");
        label.setLayoutData(splitPaneLayoutData);
        splitPaneGolf.add(label);
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(COLOR_I);
        splitPaneLayoutData.setInsets(INSETS_10);
        label = new Label("I");
        label.setLayoutData(splitPaneLayoutData);
        splitPaneGolf.add(label);
    }
View Full Code Here

public class ExceptionTest extends Column {

    public ExceptionTest() {
        super();
       
        SplitPaneLayoutData splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(10));
        setLayoutData(splitPaneLayoutData);
       
        Button button = new Button("Throw a RuntimeException");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
View Full Code Here

TOP

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

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.