< prev index next >

tests/system/src/test/java/test/robot/javafx/embed/swing/RT30650GUI.java

Print this page
rev 9491 : 8145203: Refactor systemTests for clear separation of tests
Reviewed-by: kcr


   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.embed.swing;
  27 
  28 import com.sun.glass.ui.Robot;
  29 import static com.sun.javafx.application.PlatformImpl.runAndWait;
  30 import com.sun.javafx.tk.TKPulseListener;
  31 import java.awt.AWTException;
  32 import java.awt.Color;
  33 import javafx.animation.AnimationTimer;
  34 import javafx.scene.Scene;
  35 
  36 import javax.swing.SwingUtilities;
  37 
  38 import javafx.application.Application;
  39 import javafx.application.Platform;

  40 import javafx.scene.layout.Background;
  41 import javafx.scene.layout.BackgroundFill;
  42 import javafx.scene.layout.Pane;
  43 import javafx.scene.layout.StackPane;
  44 import javafx.stage.Stage;
  45 import javax.swing.JPanel;
  46 
  47 /**
  48  * RT-30650: SwingNode is not Resizable
  49  * 
  50  * The scenario: SwingNode contains JPanel. It should be initialized with the same layout bounds.
  51  * SwingNode is added to StackPane. The JPanel's max size is unbounded, so SwingNode is expected
  52  * to fill the whole space.
  53  */
  54 public class RT30650GUI extends Application {
  55     SwingNode swingNode;
  56     
  57     private final static int SIZE = 400;
  58     
  59     // 100 pulses is not enough for the interop case, so we wait for 400 instead




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package test.robot.javafx.embed.swing;
  27 
  28 import com.sun.glass.ui.Robot;
  29 import static com.sun.javafx.application.PlatformImpl.runAndWait;
  30 import com.sun.javafx.tk.TKPulseListener;
  31 import java.awt.AWTException;
  32 import java.awt.Color;
  33 import javafx.animation.AnimationTimer;
  34 import javafx.scene.Scene;
  35 
  36 import javax.swing.SwingUtilities;
  37 
  38 import javafx.application.Application;
  39 import javafx.application.Platform;
  40 import javafx.embed.swing.SwingNode;
  41 import javafx.scene.layout.Background;
  42 import javafx.scene.layout.BackgroundFill;
  43 import javafx.scene.layout.Pane;
  44 import javafx.scene.layout.StackPane;
  45 import javafx.stage.Stage;
  46 import javax.swing.JPanel;
  47 
  48 /**
  49  * RT-30650: SwingNode is not Resizable
  50  * 
  51  * The scenario: SwingNode contains JPanel. It should be initialized with the same layout bounds.
  52  * SwingNode is added to StackPane. The JPanel's max size is unbounded, so SwingNode is expected
  53  * to fill the whole space.
  54  */
  55 public class RT30650GUI extends Application {
  56     SwingNode swingNode;
  57     
  58     private final static int SIZE = 400;
  59     
  60     // 100 pulses is not enough for the interop case, so we wait for 400 instead


< prev index next >