Examples of preferredLayoutSize()


Examples of javax.swing.BoxLayout.preferredLayoutSize()

    p2.setPreferredSize(new Dimension(33, 44));
    p3.setPreferredSize(new Dimension(55, 66));
    container.add(p1);
    container.add(p2);
    container.add(p3);
    harness.check(layout.preferredLayoutSize(container), new Dimension(99, 66));
  }
 
  private void testYAxis(TestHarness harness)
  {
    harness.checkPoint("testYAxis");
View Full Code Here

Examples of javax.swing.BoxLayout.preferredLayoutSize()

    p3.setPreferredSize(new Dimension(55, 66));
    container.add(p1);
    container.add(p2);
    container.add(p3);
    container.doLayout();
    harness.check(layout.preferredLayoutSize(container), new Dimension(55, 132));
  }

  private void testLineAxis(TestHarness harness)
  {
    harness.checkPoint("testLineAxis");
View Full Code Here

Examples of javax.swing.BoxLayout.preferredLayoutSize()

    p3.setPreferredSize(new Dimension(55, 66));
    container.add(p1);
    container.add(p2);
    container.add(p3);
    container.doLayout();
    harness.check(layout.preferredLayoutSize(container), new Dimension(99, 66));
  }

  private void testPageAxis(TestHarness harness)
  {
    harness.checkPoint("testPageAxis");
View Full Code Here

Examples of javax.swing.BoxLayout.preferredLayoutSize()

    p3.setPreferredSize(new Dimension(55, 66));
    container.add(p1);
    container.add(p2);
    container.add(p3);
    container.doLayout();
    harness.check(layout.preferredLayoutSize(container), new Dimension(55, 132));
  }

  private void testJSeparator(TestHarness harness)
  {
    harness.checkPoint("testJSeparator");
View Full Code Here

Examples of javax.swing.BoxLayout.preferredLayoutSize()

    BoxLayout layout = new BoxLayout(container, BoxLayout.Y_AXIS);
    container.setLayout(layout);
    JSeparator s1 = new JSeparator();
    container.add(s1);
    container.doLayout();
    harness.check(layout.preferredLayoutSize(container), new Dimension(0, 2));
  }


}
View Full Code Here

Examples of javax.swing.BoxLayout.preferredLayoutSize()

        component21.setPreferredSize(new Dimension(60, 60));
        component31.setPreferredSize(new Dimension(70, 70));
        container1.add(component11);
        container1.add(component21);
        assertEquals(new Dimension(110, 60), layout1.preferredLayoutSize(container1));
        assertEquals(new Dimension(60, 110), layout2.preferredLayoutSize(container1));
        layout1.invalidateLayout(container1);
        layout2.invalidateLayout(container1);
        container1.add(component31);
        assertEquals(new Dimension(180, 70), layout1.preferredLayoutSize(container1));
        assertEquals(new Dimension(70, 180), layout2.preferredLayoutSize(container1));
View Full Code Here

Examples of javax.swing.BoxLayout.preferredLayoutSize()

        assertEquals(new Dimension(60, 110), layout2.preferredLayoutSize(container1));
        layout1.invalidateLayout(container1);
        layout2.invalidateLayout(container1);
        container1.add(component31);
        assertEquals(new Dimension(180, 70), layout1.preferredLayoutSize(container1));
        assertEquals(new Dimension(70, 180), layout2.preferredLayoutSize(container1));
    }

    /*
     * Test method for 'javax.swing.plaf.basic.DefaultMenuLayout.DefaultMenuLayout(Container, int)'
     */
 
View Full Code Here

Examples of javax.swing.BoxLayout.preferredLayoutSize()

        component21.setPreferredSize(new Dimension(60, 60));
        component31.setPreferredSize(new Dimension(70, 70));
        container1.add(component11);
        container1.add(component21);
        assertEquals(new Dimension(110, 60), layout1.preferredLayoutSize(container1));
        assertEquals(new Dimension(60, 110), layout2.preferredLayoutSize(container1));
        layout1.invalidateLayout(container1);
        layout2.invalidateLayout(container1);
        container1.add(component31);
        assertEquals(new Dimension(180, 70), layout1.preferredLayoutSize(container1));
        assertEquals(new Dimension(70, 180), layout2.preferredLayoutSize(container1));
View Full Code Here

Examples of javax.swing.BoxLayout.preferredLayoutSize()

        assertEquals(new Dimension(60, 110), layout2.preferredLayoutSize(container1));
        layout1.invalidateLayout(container1);
        layout2.invalidateLayout(container1);
        container1.add(component31);
        assertEquals(new Dimension(180, 70), layout1.preferredLayoutSize(container1));
        assertEquals(new Dimension(70, 180), layout2.preferredLayoutSize(container1));
    }

    /*
     * Test method for 'javax.swing.plaf.basic.DefaultMenuLayout.DefaultMenuLayout(Container, int)'
     */
 
View Full Code Here

Examples of javax.swing.JSpinner.DefaultEditor.preferredLayoutSize()

    public void testDefaultEditor_LayoutSizes() {
        DefaultEditor defaultEditor = (DefaultEditor) spinner.createEditor(abstractModel);
        spinner.setEditor(defaultEditor);
        assertEquals(defaultEditor.minimumLayoutSize(spinner), Utilities.addInsets(
                defaultEditor.getTextField().getMinimumSize(), spinner.getInsets()));
        assertEquals(defaultEditor.preferredLayoutSize(spinner), Utilities.addInsets(
                defaultEditor.getTextField().getPreferredSize(), spinner.getInsets()));
    }

    public void testNumberEditor_NumberEditor() {
        spinner.getModel().setValue(new Integer(5));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.