Package nextapp.echo2.app

Examples of nextapp.echo2.app.Insets


        if (fillImageBorderElement.hasAttribute("color")) {
            Color color = ColorPeer.toColor(fillImageBorderElement.getAttribute("color"));
            fillImageBorder.setColor(color);
        }
        if (fillImageBorderElement.hasAttribute("border-insets")) {
            Insets insets = InsetsPeer.toInsets(fillImageBorderElement.getAttribute("border-insets"));
            fillImageBorder.setBorderInsets(insets);
        }
        if (fillImageBorderElement.hasAttribute("content-insets")) {
            Insets insets = InsetsPeer.toInsets(fillImageBorderElement.getAttribute("content-insets"));
            fillImageBorder.setContentInsets(insets);
        }
       
        NodeList borderPartList = fillImageBorderElement.getElementsByTagName("border-part");
        int borderPartCount = borderPartList.getLength();
View Full Code Here


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

    public void testSimple() {
        Style alphaStyle = styleSheet.getStyle(WindowPane.class, "alpha");
        FillImageBorder fillImageBorder = (FillImageBorder) alphaStyle.getProperty(WindowPane.PROPERTY_BORDER);
        assertEquals(new Color(0xabcdef), fillImageBorder.getColor());
        assertEquals(new Insets(12), fillImageBorder.getContentInsets());
        assertEquals(new Insets(6, 4), fillImageBorder.getBorderInsets());
       
        FillImage topLeftFillImage = fillImageBorder.getFillImage(FillImageBorder.TOP_LEFT);
        assertNotNull(topLeftFillImage);
        ImageReference imageReference = topLeftFillImage.getImage();
        assertNotNull(imageReference);
View Full Code Here

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

                public void actionPerformed(ActionEvent e) {
                    if (testPane.getComponentCount() < paneNumber + 1) {
                        return;
                    }
                    SplitPaneLayoutData splitPaneLayoutData = getLayoutData(paneNumber);
                    splitPaneLayoutData.setInsets(new Insets(0));
                    testPane.getComponent(paneNumber).setLayoutData(splitPaneLayoutData);
                }
            });
            addButton("Insets = 5px", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if (testPane.getComponentCount() < paneNumber + 1) {
                        return;
                    }
                    SplitPaneLayoutData splitPaneLayoutData = getLayoutData(paneNumber);
                    splitPaneLayoutData.setInsets(new Insets(5));
                    testPane.getComponent(paneNumber).setLayoutData(splitPaneLayoutData);
                }
            });
            addButton("Insets = 10/20/30/40px", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if (testPane.getComponentCount() < paneNumber + 1) {
                        return;
                    }
                    SplitPaneLayoutData splitPaneLayoutData = getLayoutData(paneNumber);
                    splitPaneLayoutData.setInsets(new Insets(10, 20, 30, 40));
                    testPane.getComponent(paneNumber).setLayoutData(splitPaneLayoutData);
                }
            });
            addButton("Overflow = Auto", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
View Full Code Here

        });

        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

        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

        });
        controlPane.add(cancelButton);

        Column layoutColumn = new Column();
        layoutColumn.setCellSpacing(new Extent(10));
        layoutColumn.setInsets(new Insets(10));
        mainPane.add(layoutColumn);
       
        Grid headerGrid = new Grid();
        headerGrid.setInsets(new Insets(0, 2));
        layoutColumn.add(headerGrid);
       
        Label label;
       
        label = new Label(Messages.getString("Message.PromptLabel.To"));
View Full Code Here

    public MessagePane() {
        super();
        setVisible(false);
       
        setCellSpacing(new Extent(10));
        setInsets(new Insets(3));
       
        Grid headerGrid = new Grid();
        headerGrid.setStyleName("Message.HeaderGrid");
        add(headerGrid);
View Full Code Here

    /**
     * Creates a new <code>TestGrid</code>.
     */
    public TestGrid() {
        super(2);
        setInsets(new Insets(10, 5));
        setBorder(BORDER);
    }
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.