Package javax.swing

Examples of javax.swing.OverlayLayout


  public CrossfadePanel()
  {
    super();
   
    setLayout( new OverlayLayout( this ));
   
    timer = new javax.swing.Timer( 50, this );
  }
View Full Code Here


    JPanel c1 = new JPanel();
    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);
    l.layoutContainer(c);
    h.check(c1.getX(), 35);
    h.check(c1.getY(), 35);
    h.check(c1.getWidth(), 30);
    h.check(c1.getHeight(), 30);
  }
View Full Code Here

    JPanel c2 = new JPanel();
    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);
    l.layoutContainer(c);
    h.check(c1.getX(), 35);
    h.check(c1.getY(), 35);
    h.check(c1.getWidth(), 30);
    h.check(c1.getHeight(), 30);
    h.check(c2.getX(), 20);
View Full Code Here

    c3.setMinimumSize(new Dimension(40, 40));
    c3.setPreferredSize(new Dimension(50, 50));
    c3.setMaximumSize(new Dimension(60, 60));
    c3.setAlignmentY(1.0F);
    c.add(c3);
    OverlayLayout l = new OverlayLayout(c);
    l.layoutContainer(c);
    h.check(c1.getX(), 35);
    h.check(c1.getY(), 66);
    h.check(c1.getWidth(), 30);
    h.check(c1.getHeight(), 30);
    h.check(c2.getX(), 20);
View Full Code Here

  void testWrongContainer(TestHarness h)
  {
    h.checkPoint("wrongContainer");
    JPanel c1 = new JPanel();
    JPanel c2 = new JPanel();
    OverlayLayout l = new OverlayLayout(c1);
    try
      {
        l.layoutContainer(c2);
        h.fail("getLayoutAlignmentX must throw AWTError when "
               + "called with wrong container.");
      }
    catch (AWTError ex)
      {
View Full Code Here

   */
  void testWithoutChildren(TestHarness h)
  {
    h.checkPoint("withoutChildren");
    JPanel c = new JPanel();
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.getLayoutAlignmentY(c), 0.0F);
  }
View Full Code Here

    JPanel c1 = new JPanel();
    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.getLayoutAlignmentY(c), 0.5F);
  }
View Full Code Here

    JPanel c2 = new JPanel();
    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.getLayoutAlignmentY(c), 0.5F);
  }
View Full Code Here

    c3.setMinimumSize(new Dimension(40, 40));
    c3.setPreferredSize(new Dimension(50, 50));
    c3.setMaximumSize(new Dimension(60, 60));
    c3.setAlignmentY(1.0F);
    c.add(c3);
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.getLayoutAlignmentY(c), 0.6666666865348816F);
  }
View Full Code Here

  void testWrongContainer(TestHarness h)
  {
    h.checkPoint("wrongContainer");
    JPanel c1 = new JPanel();
    JPanel c2 = new JPanel();
    OverlayLayout l = new OverlayLayout(c1);
    try
      {
        h.check(l.getLayoutAlignmentY(c2), 0.5F);
        h.fail("getLayoutAlignmentX must throw AWTError when "
               + "called with wrong container.");
      }
    catch (AWTError ex)
      {
View Full Code Here

TOP

Related Classes of javax.swing.OverlayLayout

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.