Package nextapp.echo2.app

Examples of nextapp.echo2.app.Insets


   
    /**
     * Test all-margins specific constructor.
     */
    public void testConstructorSpecific() {
        Insets insets = new Insets(PX_1, PX_2, PX_3, PX_4);
        assertEquals(insets.getLeft(), PX_1);
        assertEquals(insets.getTop(), PX_2);
        assertEquals(insets.getRight(), PX_3);
        assertEquals(insets.getBottom(), PX_4);
    }
View Full Code Here


   
    /**
     * Test integer/pixel all-margins equal constructor.
     */
    public void testConstructorPixelEqual() {
        Insets insets = new Insets(1);
        assertEquals(insets.getLeft(), PX_1);
        assertEquals(insets.getTop(), PX_1);
        assertEquals(insets.getRight(), PX_1);
        assertEquals(insets.getBottom(), PX_1);
    }
View Full Code Here

   
    /**
     * Test integer/pixel horizontal = vertical constructor.
     */
    public void testConstructorPixelHV() {
        Insets insets = new Insets(1, 2);
        assertEquals(insets.getLeft(), PX_1);
        assertEquals(insets.getTop(), PX_2);
        assertEquals(insets.getRight(), PX_1);
        assertEquals(insets.getBottom(), PX_2);
    }
View Full Code Here

     */
    public ClientExceptionTest() {
        super();
       
        SplitPaneLayoutData splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(10));
        setLayoutData(splitPaneLayoutData);
       
        Button button;
       
        button = new Button("Add working component (Control Case)");
View Full Code Here

        Style alphaStyle = styleSheet.getStyle(Column.class, "alpha");
        GridLayoutData layoutData = (GridLayoutData) alphaStyle.getProperty(Component.PROPERTY_LAYOUT_DATA);
        assertEquals(2, layoutData.getColumnSpan());
        assertEquals(1, layoutData.getRowSpan());
        assertEquals(new Color(0xabcdef), layoutData.getBackground());
        assertEquals(new Insets(20, 30), layoutData.getInsets());
        assertNotNull(layoutData.getBackgroundImage());
        ImageReference imageReference = layoutData.getBackgroundImage().getImage();
        assertNotNull(imageReference);
        assertTrue(imageReference instanceof ResourceImageReference);
        assertEquals("nextapp/echo2/test/componentxml/BackgroundImage.png",
View Full Code Here

   
    /**
     * Test integer/pixel all-margins specific constructor.
     */
    public void testConstructorPixelSpecific() {
        Insets insets = new Insets(1, 2, 3, 4);
        assertEquals(insets.getLeft(), PX_1);
        assertEquals(insets.getTop(), PX_2);
        assertEquals(insets.getRight(), PX_3);
        assertEquals(insets.getBottom(), PX_4);
    }
View Full Code Here

   
    /**
     * Test <code>equals()</code> method.
     */
    public void testEquals() {
        assertEquals(new Insets(1), new Insets(1));
        assertEquals(new Insets(1, 2), new Insets(1, 2));
        assertEquals(new Insets(1, 2, 3, 4), new Insets(1, 2, 3, 4));
        assertEquals(new Insets(null, null, null, null), new Insets(null, null, null, null));
        assertFalse(new Insets(1, 2, 3, 4).equals(new Insets(1, 2, 3, 5)));
        assertFalse(new Insets(1, 2, 3, 4).equals(new Insets(1, 2, 5, 4)));
        assertFalse(new Insets(1, 2, 3, 4).equals(new Insets(1, 5, 3, 4)));
        assertFalse(new Insets(1, 2, 3, 4).equals(new Insets(5, 2, 3, 4)));
        assertTrue(new Insets(PX_1, PX_2, PX_3, PX_4).equals(new Insets(PX_1, PX_2, PX_3, PX_4)));
        assertFalse(new Insets(PX_1, PX_2, PX_3, PX_4).equals(new Insets(null, PX_2, PX_3, PX_4)));
        assertFalse(new Insets(PX_1, PX_2, PX_3, PX_4).equals(new Insets(PX_1, null, PX_3, PX_4)));
        assertFalse(new Insets(PX_1, PX_2, PX_3, PX_4).equals(new Insets(PX_1, PX_2, null, PX_4)));
        assertFalse(new Insets(PX_1, PX_2, PX_3, PX_4).equals(new Insets(PX_1, PX_2, PX_3, null)));
        assertFalse(new Insets(null, PX_2, PX_3, PX_4).equals(new Insets(PX_1, PX_2, PX_3, PX_4)));
        assertFalse(new Insets(PX_1, null, PX_3, PX_4).equals(new Insets(PX_1, PX_2, PX_3, PX_4)));
        assertFalse(new Insets(PX_1, PX_2, null, PX_4).equals(new Insets(PX_1, PX_2, PX_3, PX_4)));
        assertFalse(new Insets(PX_1, PX_2, PX_3, null).equals(new Insets(PX_1, PX_2, PX_3, PX_4)));
    }
View Full Code Here

        add(controlsColumn);

        testColumn = new Column();
        testColumn.setCellSpacing(new Extent(15));
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(15));
        testColumn.setLayoutData(splitPaneLayoutData);
        add(testColumn);

        listBox1 = new ListBox(NUMBERS);
        testColumn.add(listBox1);
View Full Code Here

   
    public void testBasic() {
        Style alphaStyle = styleSheet.getStyle(Column.class, "alpha");
        SplitPaneLayoutData layoutData = (SplitPaneLayoutData) alphaStyle.getProperty(Component.PROPERTY_LAYOUT_DATA);
        assertEquals(new Color(0xabcdef), layoutData.getBackground());
        assertEquals(new Insets(20, 30), layoutData.getInsets());
        assertNotNull(layoutData.getBackgroundImage());
        ImageReference imageReference = layoutData.getBackgroundImage().getImage();
        assertNotNull(imageReference);
        assertTrue(imageReference instanceof ResourceImageReference);
        assertEquals("nextapp/echo2/test/componentxml/BackgroundImage.png",
View Full Code Here

                testContentPane.setInsets(null);
            }
        });
        controlsColumn.addButton("Insets -> 0px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testContentPane.setInsets(new Insets(0));
            }
        });
        controlsColumn.addButton("Insets -> 5px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testContentPane.setInsets(new Insets(5));
            }
        });
        controlsColumn.addButton("Insets -> 10/20/30/40px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testContentPane.setInsets(new Insets(10, 20, 30, 40));
            }
        });
    }
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.