Package java.awt

Examples of java.awt.LayoutManager2.maximumLayoutSize()


    LayoutManager2 lm = (LayoutManager2) borderPanel.getLayout();
    Dimension max = new Dimension (Integer.MAX_VALUE, Integer.MAX_VALUE);

    // Check that the layout manager returns Integer.MAX_VALUE for both
    // max dimensions, regardless of whether or not there's a border
    harness.check (lm.maximumLayoutSize(borderPanel), max);
    borderPanel.setBorder(new javax.swing.border.TitledBorder("HELLO WORLD"));   
    harness.check (lm.maximumLayoutSize(borderPanel), max);

    // Check that maximumLayoutSize isn't affected by the layout size of
    // the contained components
View Full Code Here


    // Check that the layout manager returns Integer.MAX_VALUE for both
    // max dimensions, regardless of whether or not there's a border
    harness.check (lm.maximumLayoutSize(borderPanel), max);
    borderPanel.setBorder(new javax.swing.border.TitledBorder("HELLO WORLD"));   
    harness.check (lm.maximumLayoutSize(borderPanel), max);

    // Check that maximumLayoutSize isn't affected by the layout size of
    // the contained components
    ftf.setMaximumSize(new Dimension (0,0));
    harness.check (lm.maximumLayoutSize(borderPanel), max);
View Full Code Here

    harness.check (lm.maximumLayoutSize(borderPanel), max);

    // Check that maximumLayoutSize isn't affected by the layout size of
    // the contained components
    ftf.setMaximumSize(new Dimension (0,0));
    harness.check (lm.maximumLayoutSize(borderPanel), max);

    // Check that maximumLayoutSize returns Integer.MAX_VALUE even for null
    // arguments
    harness.check (lm.maximumLayoutSize(null), max);
View Full Code Here

    ftf.setMaximumSize(new Dimension (0,0));
    harness.check (lm.maximumLayoutSize(borderPanel), max);

    // Check that maximumLayoutSize returns Integer.MAX_VALUE even for null
    // arguments
    harness.check (lm.maximumLayoutSize(null), max);

    // Check that a brand new BorderLayout unassociated with any Component
    // also returns Integer.MAX_VALUE for a null argument.
    BorderLayout bl = new BorderLayout();
    harness.check (bl.maximumLayoutSize(null), max);
View Full Code Here

    borderPanel.setLayout(new BoxLayout(borderPanel, BoxLayout.Y_AXIS));   
    borderPanel.add(ftf);
    LayoutManager2 lm = (LayoutManager2) borderPanel.getLayout();
    Dimension max = new Dimension (Integer.MAX_VALUE, Integer.MAX_VALUE);

    harness.check (lm.maximumLayoutSize(borderPanel), max);
    borderPanel.setBorder(new javax.swing.border.TitledBorder("HELLO WORLD"));   
    harness.check (lm.maximumLayoutSize(borderPanel), max);
  }
}
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.