Examples of minimumLayoutSize()


Examples of javax.swing.OverlayLayout.minimumLayoutSize()

  {
    h.checkPoint("withoutChildren");
    JPanel c = new JPanel();
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.minimumLayoutSize(c).width, 0);
    h.check(l.minimumLayoutSize(c).height, 0);
  }

  /**
   * Tests this method with one child component.
   *
 
View Full Code Here

Examples of javax.swing.OverlayLayout.minimumLayoutSize()

    c1.setMinimumSize(new Dimension(10, 10));
    c1.setPreferredSize(new Dimension(20, 20));
    c1.setMaximumSize(new Dimension(30, 30));
    c.add(c1);
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.minimumLayoutSize(c).width, 10);
    h.check(l.minimumLayoutSize(c).height, 10);
  }

  /**
   * Tests this method with two child components.
View Full Code Here

Examples of javax.swing.OverlayLayout.minimumLayoutSize()

    c1.setPreferredSize(new Dimension(20, 20));
    c1.setMaximumSize(new Dimension(30, 30));
    c.add(c1);
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.minimumLayoutSize(c).width, 10);
    h.check(l.minimumLayoutSize(c).height, 10);
  }

  /**
   * Tests this method with two child components.
   *
 
View Full Code Here

Examples of javax.swing.OverlayLayout.minimumLayoutSize()

    c2.setMinimumSize(new Dimension(40, 40));
    c2.setPreferredSize(new Dimension(50, 50));
    c2.setMaximumSize(new Dimension(60, 60));
    c.add(c2);
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.minimumLayoutSize(c).width, 40);
    h.check(l.minimumLayoutSize(c).height, 40);
  }

  /**
   * Tests this method with 3 children with differen alignment values.
View Full Code Here

Examples of javax.swing.OverlayLayout.minimumLayoutSize()

    c2.setPreferredSize(new Dimension(50, 50));
    c2.setMaximumSize(new Dimension(60, 60));
    c.add(c2);
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.minimumLayoutSize(c).width, 40);
    h.check(l.minimumLayoutSize(c).height, 40);
  }

  /**
   * Tests this method with 3 children with differen alignment values.
   *
 
View Full Code Here

Examples of javax.swing.OverlayLayout.minimumLayoutSize()

    c3.setPreferredSize(new Dimension(50, 50));
    c3.setMaximumSize(new Dimension(60, 60));
    c3.setAlignmentX(1.0F);
    c.add(c3);
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.minimumLayoutSize(c).width, 60);
    h.check(l.minimumLayoutSize(c).height, 40);
  }

  /**
   * Tests this method with the wrong container.
View Full Code Here

Examples of javax.swing.OverlayLayout.minimumLayoutSize()

    c3.setMaximumSize(new Dimension(60, 60));
    c3.setAlignmentX(1.0F);
    c.add(c3);
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.minimumLayoutSize(c).width, 60);
    h.check(l.minimumLayoutSize(c).height, 40);
  }

  /**
   * Tests this method with the wrong container.
   *
 
View Full Code Here

Examples of javax.swing.OverlayLayout.minimumLayoutSize()

    JPanel c1 = new JPanel();
    JPanel c2 = new JPanel();
    OverlayLayout l = new OverlayLayout(c1);
    try
      {
        h.check(l.minimumLayoutSize(c2).width, 30);
        h.fail("minimumLayoutSize must throw AWTError when "
               + "called with wrong container.");
      }
    catch (AWTError ex)
      {
View Full Code Here

Examples of javax.swing.ScrollPaneLayout.minimumLayoutSize()

    sp.getViewport().add(view);
    Insets i = sp.getInsets();
    Component[] c = sp.getComponents();
    // Check ScrollPane size < view size.
    sp.setSize(50, 50);
    h.check(l.minimumLayoutSize(sp),
            new Dimension(i.left + i.right + c[0].getMinimumSize().width,
                          i.top + i.bottom + c[0].getMinimumSize().height
                          + c[2].getMinimumSize().height));
    // Check ScrollPane size > view size.
    sp.setSize(150, 150);
View Full Code Here

Examples of javax.swing.ScrollPaneLayout.minimumLayoutSize()

            new Dimension(i.left + i.right + c[0].getMinimumSize().width,
                          i.top + i.bottom + c[0].getMinimumSize().height
                          + c[2].getMinimumSize().height));
    // Check ScrollPane size > view size.
    sp.setSize(150, 150);
    h.check(l.minimumLayoutSize(sp),
            new Dimension(i.left + i.right + c[0].getMinimumSize().width,
                          i.top + i.bottom + c[0].getMinimumSize().height
                          + c[2].getMinimumSize().height));
  }
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.