test/java/awt/Mixing/AWT_Mixing/GlassPaneOverlappingTestBase.java

Print this page




  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.Container;
  25 import java.awt.Point;
  26 import java.awt.event.MouseAdapter;
  27 import java.awt.event.MouseEvent;
  28 import java.awt.event.InputEvent;
  29 import java.lang.reflect.InvocationTargetException;
  30 import javax.swing.JFrame;
  31 import javax.swing.SpringLayout;
  32 import javax.swing.SwingUtilities;

  33 
  34 /**
  35  * Base class for testing overlapping of Swing and AWT component put into GlassPane.
  36  * Validates drawing and event delivery at the components intersection.
  37  * <p> See {@link OverlappingTestBase} for usage
  38  *
  39  * @author Sergey Grinev
  40  */
  41 public abstract class GlassPaneOverlappingTestBase extends SimpleOverlappingTestBase {
  42 
  43     /**
  44      * If true components is additionally tested to be correctly drawn after resize.
  45      */
  46     protected boolean testResize = true;
  47     private JFrame f = null;
  48     private volatile Point ancestorLoc;
  49 
  50     /**
  51      * Setups GlassPane with lightweight component returned by {@link SimpleOverlappingTestBase#getSwingComponent() }
  52      * Called by base class.




  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.Container;
  25 import java.awt.Point;
  26 import java.awt.event.MouseAdapter;
  27 import java.awt.event.MouseEvent;
  28 import java.awt.event.InputEvent;
  29 import java.lang.reflect.InvocationTargetException;
  30 import javax.swing.JFrame;
  31 import javax.swing.SpringLayout;
  32 import javax.swing.SwingUtilities;
  33 import test.java.awt.regtesthelpers.Util;
  34 
  35 /**
  36  * Base class for testing overlapping of Swing and AWT component put into GlassPane.
  37  * Validates drawing and event delivery at the components intersection.
  38  * <p> See {@link OverlappingTestBase} for usage
  39  *
  40  * @author Sergey Grinev
  41  */
  42 public abstract class GlassPaneOverlappingTestBase extends SimpleOverlappingTestBase {
  43 
  44     /**
  45      * If true components is additionally tested to be correctly drawn after resize.
  46      */
  47     protected boolean testResize = true;
  48     private JFrame f = null;
  49     private volatile Point ancestorLoc;
  50 
  51     /**
  52      * Setups GlassPane with lightweight component returned by {@link SimpleOverlappingTestBase#getSwingComponent() }
  53      * Called by base class.