Examples of layoutContainer()


Examples of java.awt.LayoutManager2.layoutContainer()

    JDesktopPane desktop = getDesktopPane(frame);
    LayoutManager2 layoutManager = (LayoutManager2)desktop.getLayout();
    Component componentToDock = desktop.getComponentAt(newX, newY);
    if (componentToDock != null && componentToDock != frame) {
      layoutManager.addLayoutComponent(frame, new DockConstraints(componentToDock, getDockLocation(componentToDock, newX, newY)));
      layoutManager.layoutContainer(desktop);
    }
    if (frame instanceof JInternalFrame) {
      setSelected((JInternalFrame)frame);
    }
    }
View Full Code Here

Examples of javax.swing.BoxLayout.layoutContainer()

    JComponent c2 = new JComponent(){};
    comp.add(c1);
    comp.add(c2);
   
    comp.setSize(400, 400);
    layout.layoutContainer(comp);
   
    Rectangle b1 = c1.getBounds();
    Rectangle b2 = c2.getBounds();
    h.check(b1.x, 0, String.valueOf(b1.x));
    h.check(b1.y, 0, String.valueOf(b1.y));  
View Full Code Here

Examples of javax.swing.BoxLayout.layoutContainer()

    JComponent c2 = new JComponent(){};
    comp.add(c1);
    comp.add(c2);

    comp.setSize(400, 400);
    layout.layoutContainer(comp);

    Rectangle b1 = c1.getBounds();
    Rectangle b2 = c2.getBounds();
    h.check(b1.x, 0, String.valueOf(b1.x));
    h.check(b1.y, 0, String.valueOf(b1.y));
View Full Code Here

Examples of javax.swing.BoxLayout.layoutContainer()

   
    comp.add(c1);
    comp.add(c2);

    comp.setSize(400, 400);
    layout.layoutContainer(comp);

    Rectangle b1 = c1.getBounds();
    Rectangle b2 = c2.getBounds();
    h.check(b1.x, 0, String.valueOf(b1.x));
    h.check(b1.y, 0, String.valueOf(b1.y));
View Full Code Here

Examples of javax.swing.BoxLayout.layoutContainer()

   
    // must call with original container
    boolean pass = false;
    try
      {
        layout.layoutContainer(new JPanel());
      }
    catch (AWTError e)
      {
        pass = true;
      }
View Full Code Here

Examples of javax.swing.BoxLayout.layoutContainer()

    c.add(c1);
    c.add(c2);
    c.add(c3);
    c.setSize(670, 46);
    l.invalidateLayout(c);
    l.layoutContainer(c);
    harness.check(c1.getX(), 0);
    harness.check(c1.getY(), 0);
    harness.check(c1.getWidth(), 223);
    harness.check(c1.getHeight(), 46);
    harness.check(c2.getX(), 223);
View Full Code Here

Examples of javax.swing.OverlayLayout.layoutContainer()

    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

Examples of javax.swing.OverlayLayout.layoutContainer()

    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

Examples of javax.swing.OverlayLayout.layoutContainer()

    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

Examples of javax.swing.OverlayLayout.layoutContainer()

    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
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.