< prev index next >

test/java/awt/GridLayout/ChangeGridSize/ChangeGridSize.java

Print this page
rev 14989 : 8160974: [TESTBUG] Mark more headful tests with @key headful.


   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.awt.*;
  25 import java.awt.event.*;
  26 
  27 /*
  28  * @test

  29  * @summary Have different components having different preferred sizes
  30  *          added to a grid layout. Change the rows and columns of the
  31  *          grid layout and check the components are re-laid out.
  32  *          The strategy followed is to calculate the component location
  33  *          depending on the preferred sizes and gaps and click the cornors
  34  *          of the components to check if events are triggered
  35  * @library ../../../../lib/testlibrary/
  36  * @build ExtendedRobot
  37  * @run main ChangeGridSize
  38  * @run main ChangeGridSize -hg 20 -vg 20
  39  */
  40 
  41 public class ChangeGridSize {
  42 
  43     private int width = 200;
  44     private int height = 200;
  45     private final int hGap, vGap;
  46     private final int rows = 3;
  47     private final int columns = 2;
  48     private final int componentCount = 6;




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.awt.*;
  25 import java.awt.event.*;
  26 
  27 /*
  28  * @test
  29  * @key headful
  30  * @summary Have different components having different preferred sizes
  31  *          added to a grid layout. Change the rows and columns of the
  32  *          grid layout and check the components are re-laid out.
  33  *          The strategy followed is to calculate the component location
  34  *          depending on the preferred sizes and gaps and click the cornors
  35  *          of the components to check if events are triggered
  36  * @library ../../../../lib/testlibrary/
  37  * @build ExtendedRobot
  38  * @run main ChangeGridSize
  39  * @run main ChangeGridSize -hg 20 -vg 20
  40  */
  41 
  42 public class ChangeGridSize {
  43 
  44     private int width = 200;
  45     private int height = 200;
  46     private final int hGap, vGap;
  47     private final int rows = 3;
  48     private final int columns = 2;
  49     private final int componentCount = 6;


< prev index next >