8074028: Remove API references to java.awt.peer
Reviewed-by: alanb, ant, yan, prr
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/Application.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/Application.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,18 @@
package com.apple.eawt;
-import java.awt.*;
-import java.awt.peer.*;
+import java.awt.Image;
+import java.awt.Point;
+import java.awt.PopupMenu;
+import java.awt.Toolkit;
+import java.awt.Window;
import java.beans.Beans;
import javax.swing.JMenuBar;
-import sun.lwawt.*;
-import sun.lwawt.macosx.*;
+import sun.awt.AWTAccessor;
+import sun.lwawt.LWWindowPeer;
+import sun.lwawt.macosx.CPlatformWindow;
/**
* The <code>Application</code> class allows you to integrate your Java application with the native Mac OS X environment.
@@ -385,10 +389,8 @@
*
* @since Java for Mac OS X 10.7 Update 1
*/
- @SuppressWarnings("deprecation")
public void requestToggleFullScreen(final Window window) {
- final ComponentPeer peer = window.getPeer();
-
+ final Object peer = AWTAccessor.getComponentAccessor().getPeer(window);
if (!(peer instanceof LWWindowPeer)) return;
Object platformWindow = ((LWWindowPeer) peer).getPlatformWindow();
if (!(platformWindow instanceof CPlatformWindow)) return;
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
import java.awt.*;
import java.lang.reflect.*;
+import sun.awt.AWTAccessor;
import sun.lwawt.macosx.*;
import sun.lwawt.macosx.CImage.Creator;
@@ -41,7 +42,6 @@
_AppDockIconHandler() { }
- @SuppressWarnings("deprecation")
public void setDockMenu(final PopupMenu menu) {
fDockMenu = menu;
@@ -61,8 +61,8 @@
// instantiate the menu peer and set the native fDockMenu ivar
menu.addNotify();
- final long nsMenuPtr = ((CMenu)fDockMenu.getPeer()).getNativeMenu();
- nativeSetDockMenu(nsMenuPtr);
+ CMenu peer = AWTAccessor.getMenuComponentAccessor().getPeer(fDockMenu);
+ nativeSetDockMenu(peer.getNativeMenu());
}
public PopupMenu getDockMenu() {
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
import javax.swing.plaf.MenuBarUI;
import com.apple.laf.ScreenMenuBar;
+import sun.awt.AWTAccessor;
import sun.lwawt.macosx.CMenuBar;
import com.apple.laf.AquaMenuBarUI;
@@ -49,7 +50,10 @@
}
// callback from the native delegate -init function
- private static void initMenuStates(final boolean aboutMenuItemVisible, final boolean aboutMenuItemEnabled, final boolean prefsMenuItemVisible, final boolean prefsMenuItemEnabled) {
+ private static void initMenuStates(final boolean aboutMenuItemVisible,
+ final boolean aboutMenuItemEnabled,
+ final boolean prefsMenuItemVisible,
+ final boolean prefsMenuItemEnabled) {
synchronized (instance) {
instance.aboutMenuItemVisible = aboutMenuItemVisible;
instance.aboutMenuItemEnabled = aboutMenuItemEnabled;
@@ -92,7 +96,6 @@
return (frame.getExtendedState() & Frame.ICONIFIED) != 0;
}
- @SuppressWarnings("deprecation")
static void installDefaultMenuBar(final JMenuBar menuBar) {
if (menuBar == null) {
// intentionally clearing the default menu
@@ -114,7 +117,7 @@
}
screenMenuBar.addNotify();
- final MenuComponentPeer peer = screenMenuBar.getPeer();
+ final Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(screenMenuBar);
if (!(peer instanceof CMenuBar)) {
// such a thing should not be possible
throw new IllegalStateException("Unable to determine native menu bar from provided JMenuBar");
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenu.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenu.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
import java.awt.*;
import java.awt.event.*;
-import java.awt.peer.MenuComponentPeer;
import java.util.Hashtable;
import javax.swing.*;
+import sun.awt.AWTAccessor;
import sun.awt.SunToolkit;
import sun.lwawt.LWToolkit;
import sun.lwawt.macosx.*;
@@ -212,24 +212,36 @@
// Send a mouseExited to the previously hilited item, if it wasn't 0.
if (target != fLastMouseEventTarget) {
if (fLastMouseEventTarget != null) {
- LWToolkit.postEvent(new MouseEvent(fLastMouseEventTarget, MouseEvent.MOUSE_EXITED, when, modifiers, x - fLastTargetRect.x, y - fLastTargetRect.y, 0, false));
+ LWToolkit.postEvent(
+ new MouseEvent(fLastMouseEventTarget,
+ MouseEvent.MOUSE_EXITED, when,
+ modifiers, x - fLastTargetRect.x,
+ y - fLastTargetRect.y, 0,
+ false));
}
- // Send a mouseEntered to the current hilited item, if it wasn't 0.
+ // Send a mouseEntered to the current hilited item, if it
+ // wasn't 0.
if (target != null) {
- LWToolkit.postEvent(new MouseEvent(target, MouseEvent.MOUSE_ENTERED, when, modifiers, x - targetRect.x, y - targetRect.y, 0, false));
+ LWToolkit.postEvent(
+ new MouseEvent(target, MouseEvent.MOUSE_ENTERED,
+ when, modifiers,
+ x - targetRect.x,
+ y - targetRect.y, 0, false));
}
fLastMouseEventTarget = target;
fLastTargetRect = targetRect;
}
// Post a mouse event to the current item.
if (target == null) return;
- LWToolkit.postEvent(new MouseEvent(target, kind, when, modifiers, x - targetRect.x, y - targetRect.y, 0, false));
+ LWToolkit.postEvent(
+ new MouseEvent(target, kind, when, modifiers,
+ x - targetRect.x, y - targetRect.y, 0,
+ false));
}
});
}
@Override
- @SuppressWarnings("deprecation")
public void addNotify() {
synchronized (getTreeLock()) {
super.addNotify();
@@ -248,7 +260,8 @@
if (tooltipText != null) {
setToolTipText(tooltipText);
}
- final MenuComponentPeer peer = getPeer();
+ final Object peer = AWTAccessor.getMenuComponentAccessor()
+ .getPeer(this);
if (peer instanceof CMenu) {
final CMenu menu = (CMenu) peer;
final long nativeMenu = menu.getNativeMenu();
@@ -355,9 +368,8 @@
public void setIndeterminate(boolean indeterminate) { }
@Override
- @SuppressWarnings("deprecation")
public void setToolTipText(final String text) {
- final MenuComponentPeer peer = getPeer();
+ Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(this);
if (!(peer instanceof CMenuItem)) return;
final CMenuItem cmi = (CMenuItem)peer;
@@ -365,9 +377,8 @@
}
@Override
- @SuppressWarnings("deprecation")
public void setIcon(final Icon i) {
- final MenuComponentPeer peer = getPeer();
+ Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(this);
if (!(peer instanceof CMenuItem)) return;
final CMenuItem cmi = (CMenuItem)peer;
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuBar.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuBar.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,19 +25,21 @@
package com.apple.laf;
-import sun.awt.AWTAccessor;
import sun.lwawt.macosx.CMenuBar;
import java.awt.*;
import java.awt.event.*;
-import java.lang.reflect.*;
-import java.security.*;
import java.util.*;
import javax.swing.*;
+import static sun.awt.AWTAccessor.*;
+
@SuppressWarnings("serial") // JDK implementation class
-public class ScreenMenuBar extends MenuBar implements ContainerListener, ScreenMenuPropertyHandler, ComponentListener {
+public class ScreenMenuBar extends MenuBar
+ implements ContainerListener, ScreenMenuPropertyHandler,
+ ComponentListener {
+
static boolean sJMenuBarHasHelpMenus = false; //$ could check by calling getHelpMenu in a try block
JMenuBar fSwingBar;
@@ -246,22 +248,23 @@
fSubmenus.remove(menu);
}
- @SuppressWarnings("deprecation")
public Menu add(final Menu m, final int index) {
synchronized (getTreeLock()) {
if (m.getParent() != null) {
m.getParent().remove(m);
}
- final Vector<Menu> menus = AWTAccessor.getMenuBarAccessor().getMenus(this);
+ final Vector<Menu> menus = getMenuBarAccessor().getMenus(this);
menus.insertElementAt(m, index);
- AWTAccessor.getMenuComponentAccessor().setParent(m, this);
+ final MenuComponentAccessor acc = getMenuComponentAccessor();
+ acc.setParent(m, this);
- final CMenuBar peer = (CMenuBar)getPeer();
+ final CMenuBar peer = acc.getPeer(this);
if (peer == null) return m;
peer.setNextInsertionIndex(index);
- if (m.getPeer() == null) {
+ final CMenuBar mPeer = acc.getPeer(m);
+ if (mPeer == null) {
m.addNotify();
}
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuItem.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuItem.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,15 +27,18 @@
import java.awt.*;
import java.awt.event.*;
-import java.awt.peer.MenuComponentPeer;
import javax.swing.*;
import javax.swing.plaf.ComponentUI;
+import sun.awt.AWTAccessor;
import sun.lwawt.macosx.CMenuItem;
@SuppressWarnings("serial") // JDK implementation class
-final class ScreenMenuItem extends MenuItem implements ActionListener, ComponentListener, ScreenMenuPropertyHandler {
+final class ScreenMenuItem extends MenuItem
+ implements ActionListener, ComponentListener,
+ ScreenMenuPropertyHandler {
+
ScreenMenuPropertyListener fListener;
JMenuItem fMenuItem;
@@ -97,9 +100,8 @@
fMenuItem.removeComponentListener(this);
}
- @SuppressWarnings("deprecation")
static void syncLabelAndKS(MenuItem menuItem, String label, KeyStroke ks) {
- final MenuComponentPeer peer = menuItem.getPeer();
+ Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(menuItem);
if (!(peer instanceof CMenuItem)) {
//Is it possible?
return;
@@ -166,18 +168,16 @@
}
}
- @SuppressWarnings("deprecation")
public void setToolTipText(final String text) {
- final MenuComponentPeer peer = getPeer();
+ Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(this);
if (!(peer instanceof CMenuItem)) return;
final CMenuItem cmi = (CMenuItem)peer;
cmi.setToolTipText(text);
}
- @SuppressWarnings("deprecation")
public void setIcon(final Icon i) {
- final MenuComponentPeer peer = getPeer();
+ Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(this);
if (!(peer instanceof CMenuItem)) return;
final CMenuItem cmi = (CMenuItem)peer;
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuItemCheckbox.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuItemCheckbox.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,17 +27,20 @@
import java.awt.*;
import java.awt.event.*;
-import java.awt.peer.MenuComponentPeer;
import javax.swing.*;
import javax.swing.plaf.ButtonUI;
import com.apple.laf.AquaMenuItemUI.IndeterminateListener;
+import sun.awt.AWTAccessor;
import sun.lwawt.macosx.*;
@SuppressWarnings("serial") // JDK implementation class
-final class ScreenMenuItemCheckbox extends CheckboxMenuItem implements ActionListener, ComponentListener, ScreenMenuPropertyHandler, ItemListener {
+final class ScreenMenuItemCheckbox extends CheckboxMenuItem
+ implements ActionListener, ComponentListener, ScreenMenuPropertyHandler,
+ ItemListener {
+
JMenuItem fMenuItem;
MenuContainer fParent;
@@ -57,12 +60,12 @@
}
ScreenMenuPropertyListener fPropertyListener;
- @SuppressWarnings("deprecation")
+
public void addNotify() {
super.addNotify();
// Avoid the Auto toggle behavior of AWT CheckBoxMenuItem
- CCheckboxMenuItem ccb = (CCheckboxMenuItem) getPeer();
+ CCheckboxMenuItem ccb = AWTAccessor.getMenuComponentAccessor().getPeer(this);
ccb.setAutoToggle(false);
fMenuItem.addComponentListener(this);
@@ -155,17 +158,15 @@
setVisible(false);
}
- @SuppressWarnings("deprecation")
public void setToolTipText(final String text) {
- final MenuComponentPeer peer = getPeer();
+ Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(this);
if (!(peer instanceof CMenuItem)) return;
((CMenuItem)peer).setToolTipText(text);
}
- @SuppressWarnings("deprecation")
public void setIcon(final Icon i) {
- final MenuComponentPeer peer = getPeer();
+ Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(this);
if (!(peer instanceof CMenuItem)) return;
final CMenuItem cmi = (CMenuItem)peer;
@@ -208,9 +209,8 @@
}
}
- @SuppressWarnings("deprecation")
public void setIndeterminate(final boolean indeterminate) {
- final MenuComponentPeer peer = getPeer();
+ Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(this);
if (peer instanceof CCheckboxMenuItem) {
((CCheckboxMenuItem)peer).setIsIndeterminate(indeterminate);
}
--- a/jdk/src/java.desktop/macosx/classes/sun/awt/CGraphicsDevice.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/awt/CGraphicsDevice.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -206,17 +206,15 @@
return true;
}
- @SuppressWarnings("deprecation")
private static void enterFullScreenExclusive(Window w) {
- FullScreenCapable peer = (FullScreenCapable)w.getPeer();
+ FullScreenCapable peer = AWTAccessor.getComponentAccessor().getPeer(w);
if (peer != null) {
peer.enterFullScreenMode();
}
}
- @SuppressWarnings("deprecation")
private static void exitFullScreenExclusive(Window w) {
- FullScreenCapable peer = (FullScreenCapable)w.getPeer();
+ FullScreenCapable peer = AWTAccessor.getComponentAccessor().getPeer(w);
if (peer != null) {
peer.exitFullScreenMode();
}
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLVolatileSurfaceManager.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLVolatileSurfaceManager.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,13 +33,14 @@
import java.awt.image.ColorModel;
import java.awt.peer.ComponentPeer;
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.awt.image.SunVolatileImage;
import sun.awt.image.VolatileSurfaceManager;
import sun.java2d.BackBufferCapsProvider;
import sun.java2d.SurfaceData;
import static sun.java2d.opengl.OGLContext.OGLContextCaps.*;
import sun.java2d.pipe.hw.ExtendedBufferCapabilities;
-import static sun.java2d.pipe.hw.AccelSurface.*;
import static sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.*;
public class CGLVolatileSurfaceManager extends VolatileSurfaceManager {
@@ -74,11 +75,11 @@
* Create a pbuffer-based SurfaceData object (or init the backbuffer
* of an existing window if this is a double buffered GraphicsConfig)
*/
- @SuppressWarnings("deprecation")
protected SurfaceData initAcceleratedSurface() {
SurfaceData sData = null;
Component comp = vImg.getComponent();
- final ComponentPeer peer = (comp != null) ? comp.getPeer() : null;
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ final ComponentPeer peer = (comp != null) ? acc.getPeer(comp) : null;
try {
boolean createVSynced = false;
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -930,8 +930,8 @@
return false;
}
final LWWindowPeer parentPeer =
- (LWWindowPeer) AWTAccessor.getComponentAccessor()
- .getPeer(parentWindow);
+ AWTAccessor.getComponentAccessor()
+ .getPeer(parentWindow);
if (parentPeer == null) {
focusLog.fine("request rejected, parentPeer is null");
LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget());
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -33,6 +33,7 @@
import javax.swing.*;
import sun.awt.*;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.java2d.*;
import sun.java2d.loops.Blit;
import sun.java2d.loops.CompositeType;
@@ -505,7 +506,7 @@
@Override
public void repositionSecurityWarning() {
if (warningWindow != null) {
- AWTAccessor.ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
+ ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
Window target = getTarget();
int x = compAccessor.getX(target);
int y = compAccessor.getY(target);
@@ -563,8 +564,7 @@
public void blockWindows(List<Window> windows) {
//TODO: LWX will probably need some collectJavaToplevels to speed this up
for (Window w : windows) {
- WindowPeer wp =
- (WindowPeer) AWTAccessor.getComponentAccessor().getPeer(w);
+ WindowPeer wp = AWTAccessor.getComponentAccessor().getPeer(w);
if (wp != null) {
wp.setModalBlocked((Dialog)getTarget(), true);
}
@@ -1247,7 +1247,8 @@
private boolean isOneOfOwnersOf(LWWindowPeer peer) {
Window owner = (peer != null ? peer.getTarget().getOwner() : null);
while (owner != null) {
- if ((LWWindowPeer)owner.getPeer() == this) {
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ if (acc.getPeer(owner) == this) {
return true;
}
owner = owner.getOwner();
@@ -1321,8 +1322,8 @@
while (owner != null && !(owner instanceof Frame || owner instanceof Dialog)) {
owner = owner.getOwner();
}
- return owner == null ? null :
- (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(owner);
+ return owner == null ? null : AWTAccessor.getComponentAccessor()
+ .getPeer(owner);
}
/**
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,7 @@
import java.util.Map;
import java.util.concurrent.Callable;
+import sun.awt.AWTAccessor;
import sun.awt.dnd.*;
import sun.lwawt.LWComponentPeer;
import sun.lwawt.LWWindowPeer;
@@ -88,7 +89,6 @@
super.startDrag(dsc, cursor, dragImage, dragImageOffset);
}
- @SuppressWarnings("deprecation")
protected void startDrag(Transferable transferable, long[] formats, Map<Long, DataFlavor> formatMap) {
DragGestureEvent trigger = getTrigger();
InputEvent triggerEvent = trigger.getTriggerEvent();
@@ -135,7 +135,9 @@
try {
//It sure will be LWComponentPeer instance as rootComponent is a Window
- PlatformWindow platformWindow = ((LWComponentPeer)rootComponent.getPeer()).getPlatformWindow();
+ LWComponentPeer<?, ?> peer = AWTAccessor.getComponentAccessor()
+ .getPeer(rootComponent);
+ PlatformWindow platformWindow = peer.getPlatformWindow();
long nativeViewPtr = CPlatformWindow.getNativeViewPtr(platformWindow);
if (nativeViewPtr == 0L) throw new InvalidDnDOperationException("Unsupported platform window implementation");
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
import java.awt.Point;
import java.awt.Toolkit;
+import sun.awt.AWTAccessor;
import sun.awt.EmbeddedFrame;
import sun.lwawt.LWWindowPeer;
@@ -46,9 +47,8 @@
show();
}
- @SuppressWarnings("deprecation")
public void addNotify() {
- if (getPeer() == null) {
+ if (!isDisplayable()) {
LWCToolkit toolkit = (LWCToolkit)Toolkit.getDefaultToolkit();
LWWindowPeer peer = toolkit.createEmbeddedFrame(this);
setPeer(peer);
@@ -61,10 +61,9 @@
public void unregisterAccelerator(AWTKeyStroke stroke) {}
- @SuppressWarnings("deprecation")
protected long getLayerPtr() {
- LWWindowPeer peer = (LWWindowPeer)getPeer();
- return peer.getLayerPtr();
+ return AWTAccessor.getComponentAccessor().<LWWindowPeer>getPeer(this)
+ .getLayerPtr();
}
// -----------------------------------------------------------------------
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -38,9 +38,12 @@
import java.text.*;
import javax.swing.text.JTextComponent;
+import sun.awt.AWTAccessor;
import sun.awt.im.InputMethodAdapter;
import sun.lwawt.*;
+import static sun.awt.AWTAccessor.ComponentAccessor;
+
public class CInputMethod extends InputMethodAdapter {
private InputMethodContext fIMContext;
private Component fAwtFocussedComponent;
@@ -385,12 +388,11 @@
// java.awt.Toolkit#getNativeContainer() is not available
// from this package
- @SuppressWarnings("deprecation")
private LWComponentPeer<?, ?> getNearestNativePeer(Component comp) {
if (comp==null)
return null;
-
- ComponentPeer peer = comp.getPeer();
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ ComponentPeer peer = acc.getPeer(comp);
if (peer==null)
return null;
@@ -398,7 +400,7 @@
comp = comp.getParent();
if (comp==null)
return null;
- peer = comp.getPeer();
+ peer = acc.getPeer(comp);
if (peer==null)
return null;
}
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuBar.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuBar.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,8 @@
import java.awt.MenuBar;
import java.awt.peer.MenuBarPeer;
+import sun.awt.AWTAccessor;
+
public class CMenuBar extends CMenuComponent implements MenuBarPeer {
private int nextInsertionIndex = -1;
@@ -43,9 +45,8 @@
}
@Override
- @SuppressWarnings("deprecation")
public void addHelpMenu(Menu m) {
- CMenu cMenu = (CMenu)m.getPeer();
+ CMenu cMenu = AWTAccessor.getMenuComponentAccessor().getPeer(m);
nativeSetHelpMenu(getModel(), cMenu.getModel());
}
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,12 +31,11 @@
import java.awt.peer.WindowPeer;
import java.beans.*;
import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-import java.util.Objects;
import javax.swing.*;
import sun.awt.*;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.java2d.SurfaceData;
import sun.java2d.opengl.CGLSurfaceData;
import sun.lwawt.*;
@@ -193,8 +192,9 @@
@SuppressWarnings("deprecation")
public CPlatformWindow convertJComponentToTarget(final JRootPane p) {
Component root = SwingUtilities.getRoot(p);
- if (root == null || (LWWindowPeer)root.getPeer() == null) return null;
- return (CPlatformWindow)((LWWindowPeer)root.getPeer()).getPlatformWindow();
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ if (root == null || acc.getPeer(root) == null) return null;
+ return (CPlatformWindow)((LWWindowPeer)acc.getPeer(root)).getPlatformWindow();
}
};
@@ -523,15 +523,15 @@
}
@Override // PlatformWindow
- @SuppressWarnings("deprecation")
public void setVisible(boolean visible) {
final long nsWindowPtr = getNSWindowPtr();
// Process parent-child relationship when hiding
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
if (!visible) {
// Unparent my children
for (Window w : target.getOwnedWindows()) {
- WindowPeer p = (WindowPeer)w.getPeer();
+ WindowPeer p = acc.getPeer(w);
if (p instanceof LWWindowPeer) {
CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow();
if (pw != null && pw.isVisible()) {
@@ -627,7 +627,7 @@
// Add my own children to myself
for (Window w : target.getOwnedWindows()) {
- WindowPeer p = (WindowPeer)w.getPeer();
+ final Object p = acc.getPeer(w);
if (p instanceof LWWindowPeer) {
CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow();
if (pw != null && pw.isVisible()) {
@@ -679,13 +679,13 @@
}
@Override // PlatformWindow
- @SuppressWarnings("deprecation")
public void toFront() {
final long nsWindowPtr = getNSWindowPtr();
LWCToolkit lwcToolkit = (LWCToolkit) Toolkit.getDefaultToolkit();
Window w = DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
- if( w != null && w.getPeer() != null
- && ((LWWindowPeer)w.getPeer()).getPeerType() == LWWindowPeer.PeerType.EMBEDDED_FRAME
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ if( w != null && acc.getPeer(w) != null
+ && ((LWWindowPeer)acc.getPeer(w)).getPeerType() == LWWindowPeer.PeerType.EMBEDDED_FRAME
&& !lwcToolkit.isApplicationActive()) {
lwcToolkit.activateApplicationIgnoringOtherApps();
}
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTrayIcon.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTrayIcon.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,8 @@
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import static sun.awt.AWTAccessor.*;
+
public class CTrayIcon extends CFRetainedResource implements TrayIconPeer {
private TrayIcon target;
private PopupMenu popup;
@@ -68,15 +70,15 @@
updateImage();
}
- @SuppressWarnings("deprecation")
private CPopupMenu checkAndCreatePopupPeer() {
CPopupMenu menuPeer = null;
if (popup != null) {
try {
- menuPeer = (CPopupMenu)popup.getPeer();
+ final MenuComponentAccessor acc = getMenuComponentAccessor();
+ menuPeer = acc.getPeer(popup);
if (menuPeer == null) {
popup.addNotify();
- menuPeer = (CPopupMenu)popup.getPeer();
+ menuPeer = acc.getPeer(popup);
}
} catch (Exception e) {
e.printStackTrace();
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
import java.awt.Toolkit;
import java.lang.reflect.InvocationTargetException;
+import sun.awt.AWTAccessor;
import sun.awt.EmbeddedFrame;
import sun.lwawt.LWWindowPeer;
@@ -48,10 +49,9 @@
this.nsViewPtr = nsViewPtr;
}
- @SuppressWarnings("deprecation")
@Override
public void addNotify() {
- if (getPeer() == null) {
+ if (!isDisplayable()) {
LWCToolkit toolkit = (LWCToolkit) Toolkit.getDefaultToolkit();
setPeer(toolkit.createEmbeddedFrame(this));
}
@@ -78,11 +78,12 @@
* Synthetic event delivery for focus management
*/
@Override
- @SuppressWarnings("deprecation")
public void synthesizeWindowActivation(boolean activated) {
if (isActive != activated) {
isActive = activated;
- ((LWWindowPeer)getPeer()).notifyActivation(activated, null);
+ final LWWindowPeer peer = AWTAccessor.getComponentAccessor()
+ .getPeer(this);
+ peer.notifyActivation(activated, null);
}
}
@@ -91,13 +92,14 @@
* Designed to be called from the main thread
* This method should be called once from the initialization of the SWT_AWT Bridge
*/
- @SuppressWarnings("deprecation")
public void validateWithBounds(final int x, final int y, final int width, final int height) {
try {
+ final LWWindowPeer peer = AWTAccessor.getComponentAccessor()
+ .getPeer(this);
LWCToolkit.invokeAndWait(new Runnable() {
@Override
public void run() {
- ((LWWindowPeer) getPeer()).setBoundsPrivate(0, 0, width, height);
+ peer.setBoundsPrivate(0, 0, width, height);
validate();
setVisible(true);
}
--- a/jdk/src/java.desktop/share/classes/java/awt/Canvas.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Canvas.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -70,10 +70,9 @@
}
@Override
- @SuppressWarnings("deprecation")
void setGraphicsConfiguration(GraphicsConfiguration gc) {
synchronized(getTreeLock()) {
- CanvasPeer peer = (CanvasPeer)getPeer();
+ CanvasPeer peer = (CanvasPeer) this.peer;
if (peer != null) {
gc = peer.getAppropriateGraphicsConfiguration(gc);
}
--- a/jdk/src/java.desktop/share/classes/java/awt/Component.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Component.java Fri Apr 17 16:54:13 2015 +0300
@@ -198,7 +198,7 @@
* @see #addNotify
* @see #removeNotify
*/
- transient ComponentPeer peer;
+ transient volatile ComponentPeer peer;
/**
* The parent of the object. It may be <code>null</code>
@@ -924,8 +924,9 @@
public Cursor getCursor(Component comp) {
return comp.getCursor_NoClientCode();
}
- public ComponentPeer getPeer(Component comp) {
- return comp.peer;
+ @SuppressWarnings("unchecked")
+ public <T extends ComponentPeer> T getPeer(Component comp) {
+ return (T) comp.peer;
}
public void setPeer(Component comp, ComponentPeer peer) {
comp.peer = peer;
@@ -1069,17 +1070,6 @@
}
/**
- * @deprecated As of JDK version 1.1,
- * programs should not directly manipulate peers;
- * replaced by <code>boolean isDisplayable()</code>.
- * @return the peer for this component
- */
- @Deprecated
- public ComponentPeer getPeer() {
- return peer;
- }
-
- /**
* Associate a <code>DropTarget</code> with this component.
* The <code>Component</code> will receive drops only if it
* is enabled.
@@ -1179,7 +1169,7 @@
graphicsConfig = gc;
- ComponentPeer peer = getPeer();
+ ComponentPeer peer = this.peer;
if (peer != null) {
return peer.updateGraphicsData(gc);
}
@@ -1281,7 +1271,7 @@
* @since 1.2
*/
public boolean isDisplayable() {
- return getPeer() != null;
+ return peer != null;
}
/**
@@ -2582,7 +2572,7 @@
* @since 1.2
*/
public boolean isOpaque() {
- if (getPeer() == null) {
+ if (peer == null) {
return false;
}
else {
@@ -2608,7 +2598,7 @@
* @since 1.2
*/
public boolean isLightweight() {
- return getPeer() instanceof LightweightPeer;
+ return peer instanceof LightweightPeer;
}
@@ -3126,7 +3116,6 @@
* obtained
* @return the font metrics for <code>font</code>
* @see #getFont
- * @see #getPeer
* @see java.awt.peer.ComponentPeer#getFontMetrics(Font)
* @see Toolkit#getFontMetrics(Font)
* @since 1.0
@@ -3186,7 +3175,7 @@
if (nativeContainer == null) return;
- ComponentPeer cPeer = nativeContainer.getPeer();
+ ComponentPeer cPeer = nativeContainer.peer;
if (cPeer != null) {
cPeer.updateCursorImmediately();
@@ -5019,7 +5008,7 @@
if (source != null) {
Container target = source.getNativeContainer();
if (target != null) {
- tpeer = target.getPeer();
+ tpeer = target.peer;
}
}
}
@@ -9851,7 +9840,7 @@
}
if (!isLightweight()) {
- ComponentPeer peer = getPeer();
+ ComponentPeer peer = this.peer;
if (peer != null) {
// The Region class has some optimizations. That's why
// we should manually check whether it's empty and
@@ -9975,7 +9964,7 @@
for (int i = indexAbove; i > -1; i--) {
Component comp = cont.getComponent(i);
if (comp != null && comp.isDisplayable() && !comp.isLightweight()) {
- return comp.getPeer();
+ return comp.peer;
}
}
// traversing the hierarchy up to the closest HW container;
--- a/jdk/src/java.desktop/share/classes/java/awt/Container.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Container.java Fri Apr 17 16:54:13 2015 +0300
@@ -820,7 +820,7 @@
}
} else {
// Q: Need to update NativeInLightFixer?
- comp.getPeer().reparent(parentPeer);
+ comp.peer.reparent(parentPeer);
}
}
}
@@ -840,10 +840,10 @@
// If component is lightweight container we need to reparent all its explicit heavyweight children
if (comp instanceof Container) {
// Traverse component's tree till depth-first until encountering heavyweight component
- reparentTraverse((ContainerPeer)getPeer(), (Container)comp);
+ reparentTraverse((ContainerPeer)peer, (Container)comp);
}
} else {
- comp.getPeer().reparent((ContainerPeer)getPeer());
+ comp.peer.reparent((ContainerPeer) peer);
}
}
@@ -4195,7 +4195,7 @@
}
} else {
if (comp.isVisible()) {
- ComponentPeer peer = comp.getPeer();
+ ComponentPeer peer = comp.peer;
if (peer != null) {
peer.setVisible(true);
}
@@ -4217,7 +4217,7 @@
}
} else {
if (comp.isVisible()) {
- ComponentPeer peer = comp.getPeer();
+ ComponentPeer peer = comp.peer;
if (peer != null) {
peer.setVisible(false);
}
@@ -4239,7 +4239,7 @@
((Container)comp).recursiveRelocateHeavyweightChildren(newOrigin);
}
} else {
- ComponentPeer peer = comp.getPeer();
+ ComponentPeer peer = comp.peer;
if (peer != null) {
peer.setBounds(origin.x + comp.getX(), origin.y + comp.getY(),
comp.getWidth(), comp.getHeight(),
--- a/jdk/src/java.desktop/share/classes/java/awt/DefaultFocusTraversalPolicy.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/DefaultFocusTraversalPolicy.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -93,7 +93,6 @@
* @return <code>true</code> if aComponent meets the above requirements;
* <code>false</code> otherwise
*/
- @SuppressWarnings("deprecation")
protected boolean accept(Component aComponent) {
if (!(aComponent.isVisible() && aComponent.isDisplayable() &&
aComponent.isEnabled()))
@@ -123,7 +122,7 @@
return focusable;
}
- ComponentPeer peer = aComponent.getPeer();
+ ComponentPeer peer = aComponent.peer;
return (peer != null && peer.isFocusable());
}
}
--- a/jdk/src/java.desktop/share/classes/java/awt/DefaultKeyboardFocusManager.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/DefaultKeyboardFocusManager.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -796,7 +796,6 @@
* @return <code>true</code>
* @see Component#dispatchEvent
*/
- @SuppressWarnings("deprecation")
public boolean dispatchKeyEvent(KeyEvent e) {
Component focusOwner = (((AWTEvent)e).isPosted) ? getFocusOwner() : e.getComponent();
@@ -824,14 +823,14 @@
// Allow the peer to process KeyEvent
Component source = e.getComponent();
- ComponentPeer peer = source.getPeer();
+ ComponentPeer peer = source.peer;
if (peer == null || peer instanceof LightweightPeer) {
// if focus owner is lightweight then its native container
// processes event
Container target = source.getNativeContainer();
if (target != null) {
- peer = target.getPeer();
+ peer = target.peer;
}
}
if (peer != null) {
@@ -1049,7 +1048,7 @@
Component source = (Component)ke.getSource();
Container target = source.getNativeContainer();
if (target != null) {
- ComponentPeer peer = target.getPeer();
+ ComponentPeer peer = target.peer;
if (peer != null) {
peer.handleEvent(ke);
/**
--- a/jdk/src/java.desktop/share/classes/java/awt/Dialog.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Dialog.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,11 +36,9 @@
import sun.awt.AppContext;
import sun.awt.AWTPermissions;
import sun.awt.SunToolkit;
-import sun.awt.PeerEvent;
import sun.awt.util.IdentityArrayList;
import sun.awt.util.IdentityLinkedList;
import java.security.AccessControlException;
-import java.util.function.BooleanSupplier;
/**
* A Dialog is a top-level window with a title and a border
@@ -749,10 +747,9 @@
* @see Component#isDisplayable
* @see #removeNotify
*/
- @SuppressWarnings("deprecation")
public void addNotify() {
synchronized (getTreeLock()) {
- if (parent != null && parent.getPeer() == null) {
+ if (parent != null && parent.peer == null) {
parent.addNotify();
}
--- a/jdk/src/java.desktop/share/classes/java/awt/FileDialog.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/FileDialog.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -314,10 +314,9 @@
* Creates the file dialog's peer. The peer allows us to change the look
* of the file dialog without changing its functionality.
*/
- @SuppressWarnings("deprecation")
public void addNotify() {
synchronized(getTreeLock()) {
- if (parent != null && parent.getPeer() == null) {
+ if (parent != null && parent.peer == null) {
parent.addNotify();
}
if (peer == null)
--- a/jdk/src/java.desktop/share/classes/java/awt/Font.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Font.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,6 @@
import java.security.PrivilegedExceptionAction;
import java.text.AttributedCharacterIterator.Attribute;
import java.text.CharacterIterator;
-import java.text.StringCharacterIterator;
import java.util.Hashtable;
import java.util.Locale;
import java.util.Map;
@@ -239,6 +238,11 @@
public boolean isCreatedFont(Font font) {
return font.createdFont;
}
+
+ @Override
+ public FontPeer getFontPeer(final Font font) {
+ return font.getFontPeer();
+ }
}
static {
@@ -434,24 +438,15 @@
private static final long serialVersionUID = -4206021311591459213L;
/**
- * Gets the peer of this <code>Font</code>.
- * @return the peer of the <code>Font</code>.
- * @since 1.1
- * @deprecated Font rendering is now platform independent.
+ * Gets the peer of this {@code Font}.
+ *
+ * @return the peer of the {@code Font}.
*/
- @Deprecated
- public FontPeer getPeer(){
- return getPeer_NoClientCode();
- }
- // NOTE: This method is called by privileged threads.
- // We implement this functionality in a package-private method
- // to insure that it cannot be overridden by client subclasses.
- // DO NOT INVOKE CLIENT CODE ON THIS THREAD!
@SuppressWarnings("deprecation")
- final FontPeer getPeer_NoClientCode() {
+ private FontPeer getFontPeer() {
if(peer == null) {
Toolkit tk = Toolkit.getDefaultToolkit();
- this.peer = tk.getFontPeer(name, style);
+ peer = tk.getFontPeer(name, style);
}
return peer;
}
--- a/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -3054,11 +3054,10 @@
return (wto != wfrom);
}
- @SuppressWarnings("deprecation")
static Component getHeavyweight(Component comp) {
- if (comp == null || comp.getPeer() == null) {
+ if (comp == null || comp.peer == null) {
return null;
- } else if (comp.getPeer() instanceof LightweightPeer) {
+ } else if (comp.peer instanceof LightweightPeer) {
return comp.getNativeContainer();
} else {
return comp;
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java Fri Apr 17 16:54:13 2015 +0300
@@ -57,7 +57,7 @@
}
}
- transient MenuComponentPeer peer;
+ transient volatile MenuComponentPeer peer;
transient MenuContainer parent;
/**
@@ -142,6 +142,11 @@
menuComp.appContext = appContext;
}
@Override
+ @SuppressWarnings("unchecked")
+ public <T extends MenuComponentPeer> T getPeer(MenuComponent menuComp) {
+ return (T) menuComp.peer;
+ }
+ @Override
public MenuContainer getParent(MenuComponent menuComp) {
return menuComp.parent;
}
@@ -226,16 +231,6 @@
}
/**
- * @deprecated As of JDK version 1.1,
- * programs should not directly manipulate peers.
- * @return the peer for this component
- */
- @Deprecated
- public MenuComponentPeer getPeer() {
- return peer;
- }
-
- /**
* Gets the font used for this menu component.
* @return the font used in this menu component, if there is one;
* <code>null</code> otherwise
--- a/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -153,7 +153,6 @@
* parent's hierarchy
* @exception RuntimeException if the parent is not showing on screen
*/
- @SuppressWarnings("deprecation")
public void show(Component origin, int x, int y) {
// Use localParent for thread safety.
MenuContainer localParent = parent;
@@ -177,7 +176,7 @@
throw new IllegalArgumentException("origin not in parent's hierarchy");
}
}
- if (compParent.getPeer() == null || !compParent.isShowing()) {
+ if (compParent.peer == null || !compParent.isShowing()) {
throw new RuntimeException("parent not showing on screen");
}
if (peer == null) {
--- a/jdk/src/java.desktop/share/classes/java/awt/Window.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Window.java Fri Apr 17 16:54:13 2015 +0300
@@ -29,7 +29,6 @@
import java.awt.geom.Point2D;
import java.awt.im.InputContext;
import java.awt.image.BufferStrategy;
-import java.awt.image.BufferedImage;
import java.awt.peer.ComponentPeer;
import java.awt.peer.WindowPeer;
import java.beans.PropertyChangeListener;
@@ -56,7 +55,6 @@
import sun.awt.CausedFocusEvent;
import sun.awt.SunToolkit;
import sun.awt.util.IdentityArrayList;
-import sun.java2d.Disposer;
import sun.java2d.pipe.Region;
import sun.security.action.GetPropertyAction;
import sun.util.logging.PlatformLogger;
@@ -755,11 +753,10 @@
* @see Container#removeNotify
* @since 1.0
*/
- @SuppressWarnings("deprecation")
public void addNotify() {
synchronized (getTreeLock()) {
Container parent = this.parent;
- if (parent != null && parent.getPeer() == null) {
+ if (parent != null && parent.peer == null) {
parent.addNotify();
}
if (peer == null) {
@@ -802,7 +799,7 @@
@SuppressWarnings("deprecation")
public void pack() {
Container parent = this.parent;
- if (parent != null && parent.getPeer() == null) {
+ if (parent != null && parent.peer == null) {
parent.addNotify();
}
if (peer == null) {
@@ -1072,10 +1069,9 @@
}
}
- @SuppressWarnings("deprecation")
static void updateChildFocusableWindowState(Window w) {
- if (w.getPeer() != null && w.isShowing()) {
- ((WindowPeer)w.getPeer()).updateFocusableWindowState();
+ if (w.peer != null && w.isShowing()) {
+ ((WindowPeer)w.peer).updateFocusableWindowState();
}
for (int i = 0; i < w.ownedWindowList.size(); i++) {
Window child = w.ownedWindowList.elementAt(i).get();
@@ -1160,10 +1156,9 @@
* as reported in javadoc. So we need to implement this functionality even if a
* child overrides dispose() in a wrong way without calling super.dispose().
*/
- @SuppressWarnings("deprecation")
void disposeImpl() {
dispose();
- if (getPeer() != null) {
+ if (peer != null) {
doDispose();
}
}
@@ -3651,7 +3646,7 @@
}
}
this.opacity = opacity;
- WindowPeer peer = (WindowPeer)getPeer();
+ WindowPeer peer = (WindowPeer) this.peer;
if (peer != null) {
peer.setOpacity(opacity);
}
@@ -3728,7 +3723,6 @@
*
* @since 1.7
*/
- @SuppressWarnings("deprecation")
public void setShape(Shape shape) {
synchronized (getTreeLock()) {
if (shape != null) {
@@ -3746,7 +3740,7 @@
}
}
this.shape = (shape == null) ? null : new Path2D.Float(shape);
- WindowPeer peer = (WindowPeer)getPeer();
+ WindowPeer peer = (WindowPeer) this.peer;
if (peer != null) {
peer.applyShape(shape == null ? null : Region.getInstance(shape, null));
}
@@ -3846,7 +3840,6 @@
* @see GraphicsConfiguration#isTranslucencyCapable()
*/
@Override
- @SuppressWarnings("deprecation")
public void setBackground(Color bgColor) {
Color oldBg = getBackground();
super.setBackground(bgColor);
@@ -3874,7 +3867,7 @@
} else if ((oldAlpha < 255) && (alpha == 255)) {
setLayersOpaque(this, true);
}
- WindowPeer peer = (WindowPeer)getPeer();
+ WindowPeer peer = (WindowPeer) this.peer;
if (peer != null) {
peer.setOpaque(alpha == 255);
}
@@ -3899,10 +3892,9 @@
return bg != null ? bg.getAlpha() == 255 : true;
}
- @SuppressWarnings("deprecation")
private void updateWindow() {
synchronized (getTreeLock()) {
- WindowPeer peer = (WindowPeer)getPeer();
+ WindowPeer peer = (WindowPeer) this.peer;
if (peer != null) {
peer.updateWindow();
}
@@ -4090,7 +4082,6 @@
window.securityWarningHeight = height;
}
- @SuppressWarnings("deprecation")
public void setSecurityWarningPosition(Window window,
Point2D point, float alignmentX, float alignmentY)
{
@@ -4100,7 +4091,7 @@
window.securityWarningAlignmentY = alignmentY;
synchronized (window.getTreeLock()) {
- WindowPeer peer = (WindowPeer)window.getPeer();
+ WindowPeer peer = (WindowPeer) window.peer;
if (peer != null) {
peer.repositionSecurityWarning();
}
--- a/jdk/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,9 @@
import java.awt.peer.LightweightPeer;
import java.awt.dnd.peer.DropTargetPeer;
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
+
/**
* The <code>DropTarget</code> is associated
@@ -499,15 +502,15 @@
*
*/
- @SuppressWarnings("deprecation")
public void addNotify(ComponentPeer peer) {
if (peer == componentPeer) return;
componentPeer = peer;
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
for (Component c = component;
c != null && peer instanceof LightweightPeer; c = c.getParent()) {
- peer = c.getPeer();
+ peer = acc.getPeer(c);
}
if (peer instanceof DropTargetPeer) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java Fri Apr 17 16:54:13 2015 +0300
@@ -57,6 +57,7 @@
import static javax.swing.ClientPropertyKey.*;
import javax.accessibility.*;
+import sun.awt.AWTAccessor;
import sun.awt.SunToolkit;
import sun.swing.SwingUtilities2;
import sun.swing.UIClientPropertyKey;
@@ -4218,9 +4219,10 @@
* @param c the {@code Component} to be checked
* @return true if this component is lightweight
*/
- @SuppressWarnings("deprecation")
public static boolean isLightweightComponent(Component c) {
- return c.getPeer() instanceof LightweightPeer;
+ // TODO we cannot call c.isLightweight() because it is incorrectly
+ // overriden in DelegateContainer on osx.
+ return AWTAccessor.getComponentAccessor().isLightweight(c);
}
@@ -5033,7 +5035,6 @@
this.paintingChild = paintingChild;
}
- @SuppressWarnings("deprecation")
void _paintImmediately(int x, int y, int w, int h) {
Graphics g;
Container c;
@@ -5159,7 +5160,7 @@
}
// If the clip width or height is negative, don't bother painting
- if(c == null || c.getPeer() == null ||
+ if(c == null || !c.isDisplayable() ||
paintImmediatelyClip.width <= 0 ||
paintImmediatelyClip.height <= 0) {
recycleRectangle(paintImmediatelyClip);
--- a/jdk/src/java.desktop/share/classes/javax/swing/JViewport.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JViewport.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,8 @@
import java.io.Serializable;
+import sun.awt.AWTAccessor;
+
/**
* The "viewport" or "porthole" through which you see the underlying
* information. When you scroll, what moves is the viewport. It is like
@@ -380,7 +382,6 @@
* @param contentRect the <code>Rectangle</code> to display
* @see JComponent#isValidateRoot
* @see java.awt.Component#isValid
- * @see java.awt.Component#getPeer
*/
public void scrollRectToVisible(Rectangle contentRect) {
Component view = getView();
@@ -1448,7 +1449,6 @@
* Returns true if the component needs to be completely repainted after
* a blit and a paint is received.
*/
- @SuppressWarnings("deprecation")
private boolean needsRepaintAfterBlit() {
// Find the first heavy weight ancestor. isObscured and
// canDetermineObscurity are only appropriate for heavy weights.
@@ -1459,7 +1459,8 @@
}
if (heavyParent != null) {
- ComponentPeer peer = heavyParent.getPeer();
+ ComponentPeer peer = AWTAccessor.getComponentAccessor()
+ .getPeer(heavyParent);
if (peer != null && peer.canDetermineObscurity() &&
!peer.isObscured()) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/RepaintManager.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/RepaintManager.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -401,7 +401,6 @@
*
* @see JComponent#repaint
*/
- @SuppressWarnings("deprecation")
private void addDirtyRegion0(Container c, int x, int y, int w, int h) {
/* Special cases we don't have to bother with.
*/
@@ -432,7 +431,7 @@
// it could lead to the possibility of getting locks out
// of order and deadlocking.
for (Container p = c; p != null; p = p.getParent()) {
- if (!p.isVisible() || (p.getPeer() == null)) {
+ if (!p.isVisible() || !p.isDisplayable()) {
return;
}
if ((p instanceof Window) || (p instanceof Applet)) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
package javax.swing.plaf.basic;
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.swing.DefaultLookup;
import sun.swing.UIAction;
import javax.swing.*;
@@ -1191,7 +1193,6 @@
* Should be messaged before the dragging session starts, resets
* lastDragLocation and dividerSize.
*/
- @SuppressWarnings("deprecation")
protected void startDragging() {
Component leftC = splitPane.getLeftComponent();
Component rightC = splitPane.getRightComponent();
@@ -1199,10 +1200,11 @@
beginDragDividerLocation = getDividerLocation(splitPane);
draggingHW = false;
- if(leftC != null && (cPeer = leftC.getPeer()) != null &&
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ if(leftC != null && (cPeer = acc.getPeer(leftC)) != null &&
!(cPeer instanceof LightweightPeer)) {
draggingHW = true;
- } else if(rightC != null && (cPeer = rightC.getPeer()) != null
+ } else if(rightC != null && (cPeer = acc.getPeer(rightC)) != null
&& !(cPeer instanceof LightweightPeer)) {
draggingHW = true;
}
--- a/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,8 +29,6 @@
import javax.accessibility.AccessibleContext;
import java.awt.*;
-import java.awt.KeyboardFocusManager;
-import java.awt.DefaultKeyboardFocusManager;
import java.awt.event.InputEvent;
import java.awt.event.InvocationEvent;
import java.awt.event.KeyEvent;
@@ -38,6 +36,7 @@
import java.awt.image.BufferStrategy;
import java.awt.peer.ComponentPeer;
+import java.awt.peer.MenuComponentPeer;
import java.lang.reflect.InvocationTargetException;
import java.security.AccessControlContext;
@@ -171,7 +170,7 @@
/**
* Returns the peer of the component.
*/
- ComponentPeer getPeer(Component comp);
+ <T extends ComponentPeer> T getPeer(Component comp);
/**
* Sets the peer of the component to the specified peer.
@@ -481,6 +480,11 @@
void setAppContext(MenuComponent menuComp, AppContext appContext);
/**
+ * Returns the peer of the menu component.
+ */
+ <T extends MenuComponentPeer> T getPeer(MenuComponent menuComp);
+
+ /**
* Returns the menu container of the menu component.
*/
MenuContainer getParent(MenuComponent menuComp);
--- a/jdk/src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java Fri Apr 17 16:54:13 2015 +0300
@@ -27,14 +27,12 @@
import java.awt.*;
import java.awt.event.*;
-import java.awt.image.*;
import java.awt.peer.*;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeEvent;
import java.util.Set;
import java.awt.AWTKeyStroke;
import java.applet.Applet;
-import sun.applet.AppletPanel;
/**
* A generic container used for embedding Java components, usually applets.
@@ -320,10 +318,9 @@
return true;
}
- @SuppressWarnings("deprecation")
public void addNotify() {
synchronized (getTreeLock()) {
- if (getPeer() == null) {
+ if (!isDisplayable()) {
setPeer(new NullEmbeddedFramePeer());
}
super.addNotify();
@@ -331,10 +328,10 @@
}
// These three functions consitute RFE 4100710. Do not remove.
- @SuppressWarnings("deprecation")
public void setCursorAllowed(boolean isCursorAllowed) {
this.isCursorAllowed = isCursorAllowed;
- getPeer().updateCursorImmediately();
+ final FramePeer peer = AWTAccessor.getComponentAccessor().getPeer(this);
+ peer.updateCursorImmediately();
}
public boolean isCursorAllowed() {
return isCursorAllowed;
@@ -345,7 +342,6 @@
: Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
}
- @SuppressWarnings("deprecation")
protected void setPeer(final ComponentPeer p){
AWTAccessor.getComponentAccessor().setPeer(EmbeddedFrame.this, p);
};
@@ -458,9 +454,8 @@
* @see #getBoundsPrivate
* @since 1.5
*/
- @SuppressWarnings("deprecation")
protected void setBoundsPrivate(int x, int y, int width, int height) {
- final FramePeer peer = (FramePeer)getPeer();
+ final FramePeer peer = AWTAccessor.getComponentAccessor().getPeer(this);
if (peer != null) {
peer.setBoundsPrivate(x, y, width, height);
}
@@ -490,9 +485,8 @@
* @see #setBoundsPrivate
* @since 1.6
*/
- @SuppressWarnings("deprecation")
protected Rectangle getBoundsPrivate() {
- final FramePeer peer = (FramePeer)getPeer();
+ final FramePeer peer = AWTAccessor.getComponentAccessor().getPeer(this);
if (peer != null) {
return peer.getBoundsPrivate();
}
--- a/jdk/src/java.desktop/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
package sun.awt;
import java.awt.Component;
-import java.awt.KeyboardFocusManager;
import java.awt.Window;
import java.awt.Canvas;
import java.awt.Scrollbar;
@@ -36,9 +35,7 @@
import java.awt.peer.KeyboardFocusManagerPeer;
import java.awt.peer.ComponentPeer;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.util.logging.PlatformLogger;
public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManagerPeer {
@@ -75,7 +72,6 @@
* 1) accepts focus on click (in general)
* 2) may be a focus owner (in particular)
*/
- @SuppressWarnings("deprecation")
public static boolean shouldFocusOnClick(Component component) {
boolean acceptFocusOnClick = false;
@@ -84,6 +80,7 @@
// CANVAS & SCROLLBAR accept focus on click
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
if (component instanceof Canvas ||
component instanceof Scrollbar)
{
@@ -96,11 +93,10 @@
// Other components
} else {
- ComponentPeer peer = (component != null ? component.getPeer() : null);
+ ComponentPeer peer = (component != null ? acc.getPeer(component) : null);
acceptFocusOnClick = (peer != null ? peer.isFocusable() : false);
}
- return acceptFocusOnClick &&
- AWTAccessor.getComponentAccessor().canBeFocusOwner(component);
+ return acceptFocusOnClick && acc.canBeFocusOwner(component);
}
/*
@@ -120,7 +116,7 @@
}
Component currentOwner = currentFocusOwner;
- if (currentOwner != null && currentOwner.getPeer() == null) {
+ if (currentOwner != null && !currentOwner.isDisplayable()) {
currentOwner = null;
}
if (currentOwner != null) {
--- a/jdk/src/java.desktop/share/classes/sun/awt/LightweightFrame.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/LightweightFrame.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -91,7 +91,7 @@
@SuppressWarnings("deprecation")
@Override public void addNotify() {
synchronized (getTreeLock()) {
- if (getPeer() == null) {
+ if (!isDisplayable()) {
SunToolkit stk = (SunToolkit)Toolkit.getDefaultToolkit();
try {
setPeer(stk.createLightweightFrame(this));
@@ -115,9 +115,9 @@
* @param activate if <code>true</code>, activates the frame;
* otherwise, deactivates the frame
*/
- @SuppressWarnings("deprecation")
public void emulateActivation(boolean activate) {
- ((FramePeer)getPeer()).emulateActivation(activate);
+ final FramePeer peer = AWTAccessor.getComponentAccessor().getPeer(this);
+ peer.emulateActivation(activate);
}
/**
--- a/jdk/src/java.desktop/share/classes/sun/awt/SunGraphicsCallback.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunGraphicsCallback.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -47,11 +47,10 @@
g.clipRect(0, 0, bounds.width, bounds.height);
}
- @SuppressWarnings("deprecation")
public final void runOneComponent(Component comp, Rectangle bounds,
Graphics g, Shape clip,
int weightFlags) {
- if (comp == null || comp.getPeer() == null || !comp.isVisible()) {
+ if (comp == null || !comp.isDisplayable() || !comp.isVisible()) {
return;
}
boolean lightweight = comp.isLightweight();
--- a/jdk/src/java.desktop/share/classes/sun/font/FontAccess.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/font/FontAccess.java Fri Apr 17 16:54:13 2015 +0300
@@ -26,6 +26,7 @@
package sun.font;
import java.awt.Font;
+import java.awt.peer.FontPeer;
public abstract class FontAccess {
@@ -45,4 +46,5 @@
public abstract void setFont2D(Font f, Font2DHandle h);
public abstract void setCreatedFont(Font f);
public abstract boolean isCreatedFont(Font f);
+ public abstract FontPeer getFontPeer(Font f);
}
--- a/jdk/src/java.desktop/share/classes/sun/print/PSPrinterJob.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/print/PSPrinterJob.java Fri Apr 17 16:54:13 2015 +0300
@@ -46,6 +46,7 @@
import java.awt.image.BufferedImage;
+import java.awt.peer.FontPeer;
import java.awt.print.Pageable;
import java.awt.print.PageFormat;
import java.awt.print.Paper;
@@ -93,6 +94,7 @@
import sun.awt.FontDescriptor;
import sun.awt.PlatformFont;
import sun.awt.SunToolkit;
+import sun.font.FontAccess;
import sun.font.FontManagerFactory;
import sun.font.FontUtilities;
@@ -1214,13 +1216,13 @@
* of distinct PS fonts needed to draw this text. This saves us
* doing this processing one extra time.
*/
- @SuppressWarnings("deprecation")
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
- CharsetString[] acs =
- ((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
+ PlatformFont peer = (PlatformFont) FontAccess.getFontAccess()
+ .getFontPeer(font);
+ CharsetString[] acs = peer.makeMultiCharsetString(str, false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
@@ -1229,7 +1231,6 @@
return (psFonts == null) ? 0 : psFonts.length;
}
- @SuppressWarnings("deprecation")
protected boolean textOut(Graphics g, String str, float x, float y,
Font mLastFont, FontRenderContext frc,
float width) {
@@ -1254,9 +1255,9 @@
if (str.length() == 0) {
return true;
}
- CharsetString[] acs =
- ((PlatformFont)
- (mLastFont.getPeer())).makeMultiCharsetString(str, false);
+ PlatformFont peer = (PlatformFont) FontAccess.getFontAccess()
+ .getFontPeer(mLastFont);
+ CharsetString[] acs = peer.makeMultiCharsetString(str, false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return false;
--- a/jdk/src/java.desktop/share/classes/sun/swing/JLightweightFrame.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/swing/JLightweightFrame.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -61,6 +61,7 @@
import javax.swing.RootPaneContainer;
import javax.swing.SwingUtilities;
+import sun.awt.AWTAccessor;
import sun.awt.DisplayChangedListener;
import sun.awt.LightweightFrame;
import sun.security.action.GetPropertyAction;
@@ -241,7 +242,6 @@
}
@Override
- @SuppressWarnings("deprecation")
public void notifyDisplayChanged(final int scaleFactor) {
if (scaleFactor != this.scaleFactor) {
if (!copyBufferEnabled) content.paintLock();
@@ -254,18 +254,19 @@
}
this.scaleFactor = scaleFactor;
}
- if (getPeer() instanceof DisplayChangedListener) {
- ((DisplayChangedListener)getPeer()).displayChanged();
+ final Object peer = AWTAccessor.getComponentAccessor().getPeer(this);
+ if (peer instanceof DisplayChangedListener) {
+ ((DisplayChangedListener) peer).displayChanged();
}
repaint();
}
@Override
- @SuppressWarnings("deprecation")
public void addNotify() {
super.addNotify();
- if (getPeer() instanceof DisplayChangedListener) {
- ((DisplayChangedListener)getPeer()).displayChanged();
+ final Object peer = AWTAccessor.getComponentAccessor().getPeer(this);
+ if (peer instanceof DisplayChangedListener) {
+ ((DisplayChangedListener) peer).displayChanged();
}
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -326,9 +326,8 @@
* check for adding duplicate items
* @param item item to add
*/
- @SuppressWarnings("deprecation")
public void addItem(MenuItem item) {
- XMenuItemPeer mp = (XMenuItemPeer)item.getPeer();
+ XMenuItemPeer mp = AWTAccessor.getMenuComponentAccessor().getPeer(item);
if (mp != null) {
mp.setContainer(this);
synchronized(getMenuTreeLock()) {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,6 @@
import java.awt.event.MouseWheelEvent;
import java.awt.event.PaintEvent;
import java.awt.event.WindowEvent;
-import java.awt.event.InvocationEvent;
import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
import java.awt.image.VolatileImage;
@@ -63,6 +62,8 @@
import java.util.Collection;
import java.util.Objects;
import java.util.Set;
+
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.util.logging.PlatformLogger;
import sun.awt.*;
import sun.awt.event.IgnorePaintEvent;
@@ -182,7 +183,8 @@
}
if (container instanceof Window) {
- XWindowPeer wpeer = (XWindowPeer)(container.getPeer());
+ XWindowPeer wpeer = AWTAccessor.getComponentAccessor()
+ .getPeer(container);
if (wpeer != null) {
return (wpeer.winAttr.visibilityState !=
XWindowAttributesData.AWT_UNOBSCURED);
@@ -319,7 +321,8 @@
if (parentWindow == null) {
return rejectFocusRequestHelper("WARNING: Parent window is null");
}
- XWindowPeer wpeer = (XWindowPeer)parentWindow.getPeer();
+ XWindowPeer wpeer = AWTAccessor.getComponentAccessor()
+ .getPeer(parentWindow);
if (wpeer == null) {
return rejectFocusRequestHelper("WARNING: Parent window's peer is null");
}
@@ -390,7 +393,6 @@
/**
* @see java.awt.peer.ComponentPeer
*/
- @SuppressWarnings("deprecation")
public void setEnabled(final boolean value) {
if (enableLog.isLoggable(PlatformLogger.Level.FINE)) {
enableLog.fine("{0}ing {1}", (value ? "Enabl" : "Disabl"), this);
@@ -399,8 +401,9 @@
// If any of our heavyweight ancestors are disable, we should be too
// See 6176875 for more information
final Container cp = SunToolkit.getNativeContainer(target);
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
if (cp != null) {
- status &= ((XComponentPeer) cp.getPeer()).isEnabled();
+ status &= acc.<XComponentPeer>getPeer(cp).isEnabled();
}
synchronized (getStateLock()) {
if (enabled == status) {
@@ -412,7 +415,7 @@
if (target instanceof Container) {
final Component[] list = ((Container) target).getComponents();
for (final Component child : list) {
- final ComponentPeer p = child.getPeer();
+ final ComponentPeer p = acc.getPeer(child);
if (p != null) {
p.setEnabled(status && child.isEnabled());
}
@@ -489,7 +492,7 @@
}
XWindowPeer getParentTopLevel() {
- AWTAccessor.ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
+ ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
Container parent = (target instanceof Container) ? ((Container)target) : (compAccessor.getParent(target));
// Search for parent window
while (parent != null && !(parent instanceof Window)) {
@@ -1327,11 +1330,10 @@
}
}
- @SuppressWarnings("deprecation")
private void addTree(Collection<Long> order, Set<Long> set, Container cont) {
for (int i = 0; i < cont.getComponentCount(); i++) {
Component comp = cont.getComponent(i);
- ComponentPeer peer = comp.getPeer();
+ Object peer = AWTAccessor.getComponentAccessor().getPeer(comp);
if (peer instanceof XComponentPeer) {
Long window = Long.valueOf(((XComponentPeer)peer).getWindow());
if (!set.contains(window)) {
@@ -1348,7 +1350,6 @@
/****** DropTargetPeer implementation ********************/
- @SuppressWarnings("deprecation")
public void addDropTarget(DropTarget dt) {
Component comp = target;
while(!(comp == null || comp instanceof Window)) {
@@ -1356,14 +1357,13 @@
}
if (comp instanceof Window) {
- XWindowPeer wpeer = (XWindowPeer)(comp.getPeer());
+ XWindowPeer wpeer = AWTAccessor.getComponentAccessor().getPeer(comp);
if (wpeer != null) {
wpeer.addDropTarget();
}
}
}
- @SuppressWarnings("deprecation")
public void removeDropTarget(DropTarget dt) {
Component comp = target;
while(!(comp == null || comp instanceof Window)) {
@@ -1371,7 +1371,8 @@
}
if (comp instanceof Window) {
- XWindowPeer wpeer = (XWindowPeer)(comp.getPeer());
+ XWindowPeer wpeer = AWTAccessor.getComponentAccessor()
+ .getPeer(comp);
if (wpeer != null) {
wpeer.removeDropTarget();
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1226,7 +1226,7 @@
Window owner = XWindowPeer.getDecoratedOwner(actualFocusedWindow);
if (owner != null && owner == target) {
- setActualFocusedWindow((XWindowPeer) AWTAccessor.getComponentAccessor().getPeer(actualFocusedWindow));
+ setActualFocusedWindow(AWTAccessor.getComponentAccessor().getPeer(actualFocusedWindow));
}
}
super.handleWindowFocusOut(oppositeWindow, serial);
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDialogPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDialogPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -117,7 +117,7 @@
try {
javaToplevels = XWindowPeer.collectJavaToplevels();
for (Window w : toBlock) {
- XWindowPeer wp = (XWindowPeer)AWTAccessor.getComponentAccessor().getPeer(w);
+ XWindowPeer wp = AWTAccessor.getComponentAccessor().getPeer(w);
if (wp != null) {
wp.setModalBlocked((Dialog)target, true, javaToplevels);
}
@@ -139,7 +139,7 @@
XWindowPeer focusedWindowPeer = null;
if (focusedWindow != null) {
- focusedWindowPeer = (XWindowPeer)AWTAccessor.getComponentAccessor().getPeer(focusedWindow);
+ focusedWindowPeer = AWTAccessor.getComponentAccessor().getPeer(focusedWindow);
} else {
/*
* For the case when a potential blocked window is not yet focused
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDragSourceContextPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDragSourceContextPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -110,7 +110,6 @@
return theInstance;
}
- @SuppressWarnings("deprecation")
protected void startDrag(Transferable transferable,
long[] formats, Map<Long, DataFlavor> formatMap) {
Component component = getTrigger().getComponent();
@@ -121,7 +120,7 @@
c = AWTAccessor.getComponentAccessor().getParent(c));
if (c instanceof Window) {
- wpeer = (XWindowPeer)c.getPeer();
+ wpeer = AWTAccessor.getComponentAccessor().getPeer(c);
}
if (wpeer == null) {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
import java.util.Iterator;
+import sun.awt.AWTAccessor;
import sun.util.logging.PlatformLogger;
import sun.awt.AppContext;
@@ -188,12 +189,12 @@
// If source is an XEmbedCanvasPeer, passes the event to it for processing and
// return true if the event is forwarded to the XEmbed child.
// Otherwise, does nothing and return false.
- @SuppressWarnings("deprecation")
private boolean processSunDropTargetEvent(SunDropTargetEvent event) {
Object source = event.getSource();
if (source instanceof Component) {
- ComponentPeer peer = ((Component)source).getPeer();
+ Object peer = AWTAccessor.getComponentAccessor()
+ .getPeer((Component) source);
if (peer instanceof XEmbedCanvasPeer) {
XEmbedCanvasPeer xEmbedCanvasPeer = (XEmbedCanvasPeer)peer;
/* The native context is the pointer to the XClientMessageEvent
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedChildProxyPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedChildProxyPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -166,7 +166,6 @@
XToolkit.postEvent(XToolkit.targetToAppContext(proxy), event);
}
- @SuppressWarnings("deprecation")
boolean simulateMotifRequestFocus(Component lightweightChild, boolean temporary,
boolean focusedWindowChangeAllowed, long time)
{
@@ -174,7 +173,7 @@
lightweightChild = (Component)proxy;
}
Component currentOwner = XKeyboardFocusManagerPeer.getInstance().getCurrentFocusOwner();
- if (currentOwner != null && currentOwner.getPeer() == null) {
+ if (currentOwner != null && !currentOwner.isDisplayable()) {
currentOwner = null;
}
FocusEvent fg = new FocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED, false, currentOwner );
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbeddedFrame.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbeddedFrame.java Fri Apr 17 16:54:13 2015 +0300
@@ -26,8 +26,11 @@
package sun.awt.X11;
import java.awt.AWTKeyStroke;
+import java.awt.Component;
import java.awt.Toolkit;
+import java.awt.peer.ComponentPeer;
+import sun.awt.AWTAccessor;
import sun.awt.EmbeddedFrame;
import sun.util.logging.PlatformLogger;
@@ -63,10 +66,9 @@
}
}
- @SuppressWarnings("deprecation")
public void addNotify()
{
- if (getPeer() == null) {
+ if (!isDisplayable()) {
XToolkit toolkit = (XToolkit)Toolkit.getDefaultToolkit();
setPeer(toolkit.createEmbeddedFrame(this));
}
@@ -80,9 +82,9 @@
/*
* The method shouldn't be called in case of active XEmbed.
*/
- @SuppressWarnings("deprecation")
public boolean traverseIn(boolean direction) {
- XEmbeddedFramePeer peer = (XEmbeddedFramePeer)getPeer();
+ XEmbeddedFramePeer peer = AWTAccessor.getComponentAccessor()
+ .getPeer(this);
if (peer != null) {
if (peer.supportsXEmbed() && peer.isXEmbedActive()) {
log.fine("The method shouldn't be called when XEmbed is active!");
@@ -93,9 +95,9 @@
return false;
}
- @SuppressWarnings("deprecation")
protected boolean traverseOut(boolean direction) {
- XEmbeddedFramePeer xefp = (XEmbeddedFramePeer) getPeer();
+ XEmbeddedFramePeer xefp = AWTAccessor.getComponentAccessor()
+ .getPeer(this);
if (direction == FORWARD) {
xefp.traverseOutForward();
}
@@ -108,9 +110,9 @@
/*
* The method shouldn't be called in case of active XEmbed.
*/
- @SuppressWarnings("deprecation")
public void synthesizeWindowActivation(boolean doActivate) {
- XEmbeddedFramePeer peer = (XEmbeddedFramePeer)getPeer();
+ XEmbeddedFramePeer peer = AWTAccessor.getComponentAccessor()
+ .getPeer(this);
if (peer != null) {
if (peer.supportsXEmbed() && peer.isXEmbedActive()) {
log.fine("The method shouldn't be called when XEmbed is active!");
@@ -120,16 +122,17 @@
}
}
- @SuppressWarnings("deprecation")
public void registerAccelerator(AWTKeyStroke stroke) {
- XEmbeddedFramePeer xefp = (XEmbeddedFramePeer) getPeer();
+ XEmbeddedFramePeer xefp = AWTAccessor.getComponentAccessor()
+ .getPeer(this);
if (xefp != null) {
xefp.registerAccelerator(stroke);
}
}
- @SuppressWarnings("deprecation")
+
public void unregisterAccelerator(AWTKeyStroke stroke) {
- XEmbeddedFramePeer xefp = (XEmbeddedFramePeer) getPeer();
+ XEmbeddedFramePeer xefp = AWTAccessor.getComponentAccessor()
+ .getPeer(this);
if (xefp != null) {
xefp.unregisterAccelerator(stroke);
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbeddingContainer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbeddingContainer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
import java.awt.*;
import java.util.HashMap;
import java.awt.event.KeyEvent;
-import java.lang.reflect.*;
import sun.awt.AWTAccessor;
public class XEmbeddingContainer extends XEmbedHelper implements XEventDispatcher {
@@ -46,13 +45,14 @@
XToolkit.removeEventDispatcher(embedder.getWindow(), this);
}
- @SuppressWarnings("deprecation")
void add(long child) {
if (checkXEmbed(child)) {
Component proxy = createChildProxy(child);
((Container)embedder.getTarget()).add("Center", proxy);
- if (proxy.getPeer() != null) {
- children.put(Long.valueOf(child), proxy.getPeer());
+ XEmbeddedFramePeer peer = AWTAccessor.getComponentAccessor()
+ .getPeer(proxy);
+ if (peer != null) {
+ children.put(Long.valueOf(child), peer);
}
}
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFileDialogPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFileDialogPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,15 +32,19 @@
import java.io.*;
import java.util.Locale;
import java.util.Arrays;
-import com.sun.java.swing.plaf.motif.*;
-import javax.swing.plaf.ComponentUI;
import java.security.AccessController;
import java.security.PrivilegedAction;
+
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.util.logging.PlatformLogger;
import sun.awt.AWTAccessor;
-class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListener, ItemListener, KeyEventDispatcher, XChoicePeerListener {
- private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XFileDialogPeer");
+class XFileDialogPeer extends XDialogPeer
+ implements FileDialogPeer, ActionListener, ItemListener,
+ KeyEventDispatcher, XChoicePeerListener {
+
+ private static final PlatformLogger log =
+ PlatformLogger.getLogger("sun.awt.X11.XFileDialogPeer");
FileDialog target;
@@ -286,7 +290,8 @@
fileDialog.setSize(400, 400);
// Update choice's popup width
- XChoicePeer choicePeer = (XChoicePeer)pathChoice.getPeer();
+ XChoicePeer choicePeer = AWTAccessor.getComponentAccessor()
+ .getPeer(pathChoice);
choicePeer.setDrawSelectedItem(false);
choicePeer.setAlignUnder(pathField);
@@ -642,7 +647,6 @@
}
}
- @SuppressWarnings("deprecation")
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
int id = keyEvent.getID();
int keyCode = keyEvent.getKeyCode();
@@ -653,13 +657,15 @@
while (comp != null) {
// Fix for 6240084 Disposing a file dialog when the drop-down is active does not dispose the dropdown menu, on Xtoolkit
// See also 6259493
+ ComponentAccessor acc = AWTAccessor.getComponentAccessor();
if (comp == pathChoice) {
- XChoicePeer choicePeer = (XChoicePeer)pathChoice.getPeer();
+ XChoicePeer choicePeer = acc.getPeer(pathChoice);
if (choicePeer.isUnfurled()){
return false;
}
}
- if (comp.getPeer() == this) {
+ Object peer = acc.getPeer(comp);
+ if (peer == this) {
handleCancel();
return true;
}
@@ -796,16 +802,18 @@
}
super.setVisible(b);
+ XChoicePeer choicePeer = AWTAccessor.getComponentAccessor()
+ .getPeer(pathChoice);
if (b == true){
// See 6240074 for more information
- XChoicePeer choicePeer = (XChoicePeer)pathChoice.getPeer();
choicePeer.addXChoicePeerListener(this);
- KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
+ KeyboardFocusManager.getCurrentKeyboardFocusManager()
+ .addKeyEventDispatcher(this);
}else{
// See 6240074 for more information
- XChoicePeer choicePeer = (XChoicePeer)pathChoice.getPeer();
choicePeer.removeXChoicePeerListener();
- KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(this);
+ KeyboardFocusManager.getCurrentKeyboardFocusManager()
+ .removeKeyEventDispatcher(this);
}
selectionField.requestFocusInWindow();
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFramePeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFramePeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -124,7 +124,8 @@
}
} else {
menubar = mb;
- menubarPeer = (XMenuBarPeer) mb.getPeer();
+ menubarPeer = AWTAccessor.getMenuComponentAccessor()
+ .getPeer(mb);
if (menubarPeer != null) {
menubarPeer.init((Frame)target);
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XInputMethod.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XInputMethod.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,8 @@
import java.awt.Rectangle;
import java.awt.im.spi.InputMethodContext;
import java.awt.peer.ComponentPeer;
+
+import sun.awt.AWTAccessor;
import sun.awt.X11InputMethod;
import sun.util.logging.PlatformLogger;
@@ -137,9 +139,10 @@
XToolkit.awtUnlock();
}
- @SuppressWarnings("deprecation")
long getCurrentParentWindow() {
- return ((XWindow)clientComponentWindow.getPeer()).getContentWindow();
+ XWindow peer = AWTAccessor.getComponentAccessor()
+ .getPeer(clientComponentWindow);
+ return peer.getContentWindow();
}
/*
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -70,13 +70,13 @@
synchronized(this) {
if (currentFocusedWindow != null) {
- from = (XWindowPeer)AWTAccessor.getComponentAccessor().getPeer(currentFocusedWindow);
+ from = AWTAccessor.getComponentAccessor().getPeer(currentFocusedWindow);
}
currentFocusedWindow = win;
if (currentFocusedWindow != null) {
- to = (XWindowPeer)AWTAccessor.getComponentAccessor().getPeer(currentFocusedWindow);
+ to = AWTAccessor.getComponentAccessor().getPeer(currentFocusedWindow);
}
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -163,9 +163,8 @@
postPaintEvent();
}
- @SuppressWarnings("deprecation")
public void addHelpMenu(Menu m) {
- XMenuPeer mp = (XMenuPeer)m.getPeer();
+ XMenuPeer mp = AWTAccessor.getMenuComponentAccessor().getPeer(m);
synchronized(getMenuTreeLock()) {
helpMenu = mp;
}
@@ -180,10 +179,9 @@
/**
* called from XFramePeer.setMenuBar
*/
- @SuppressWarnings("deprecation")
public void init(Frame frame) {
this.target = frame;
- this.framePeer = (XFramePeer)frame.getPeer();
+ this.framePeer = AWTAccessor.getComponentAccessor().getPeer(frame);
XCreateWindowParams params = getDelayedParams();
params.remove(DELAYED);
params.add(PARENT_WINDOW, framePeer.getShell());
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMouseInfoPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMouseInfoPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.awt.Point;
import java.awt.Window;
import java.awt.GraphicsEnvironment;
-import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.peer.MouseInfoPeer;
+import sun.awt.AWTAccessor;
+
public class XMouseInfoPeer implements MouseInfoPeer {
/**
@@ -83,8 +84,8 @@
// java.awt.Component.findUnderMouseInWindow checks that
// the peer is non-null by checking that the component
// is showing.
-
- long contentWindow = ((XWindow)w.getPeer()).getContentWindow();
+ XWindow peer = AWTAccessor.getComponentAccessor().getPeer(w);
+ long contentWindow = peer.getContentWindow();
long parent = XlibUtil.getParentWindow(contentWindow);
XToolkit.awtLock();
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPanelPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPanelPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
import java.awt.*;
import java.awt.peer.*;
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.awt.SunGraphicsCallback;
public class XPanelPeer extends XCanvasPeer implements PanelPeer {
@@ -76,17 +78,17 @@
}
- @SuppressWarnings("deprecation")
public void setBackground(Color c) {
Component comp;
int i;
Container cont = (Container) target;
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
synchronized(target.getTreeLock()) {
int n = cont.getComponentCount();
for(i=0; i < n; i++) {
comp = cont.getComponent(i);
- ComponentPeer peer = comp.getPeer();
+ ComponentPeer peer = acc.getPeer(comp);
if (peer != null) {
Color color = comp.getBackground();
if (color == null || color.equals(c)) {
@@ -102,15 +104,15 @@
setForegroundForHierarchy((Container) target, c);
}
- @SuppressWarnings("deprecation")
private void setForegroundForHierarchy(Container cont, Color c) {
synchronized(target.getTreeLock()) {
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
int n = cont.getComponentCount();
for(int i=0; i < n; i++) {
Component comp = cont.getComponent(i);
Color color = comp.getForeground();
if (color == null || color.equals(c)) {
- ComponentPeer cpeer = comp.getPeer();
+ ComponentPeer cpeer = acc.getPeer(comp);
if (cpeer != null) {
cpeer.setForeground(c);
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRepaintArea.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRepaintArea.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
import java.awt.Component;
import java.awt.Graphics;
+import sun.awt.AWTAccessor;
import sun.awt.RepaintArea;
/**
@@ -55,10 +56,10 @@
/**
* Calls <code>Component.paint(Graphics)</code> with given Graphics.
*/
- @SuppressWarnings("deprecation")
protected void paintComponent(Component comp, Graphics g) {
if (comp != null) {
- final XComponentPeer peer = (XComponentPeer) comp.getPeer();
+ final XComponentPeer peer = AWTAccessor.getComponentAccessor()
+ .getPeer(comp);
if (peer != null) {
peer.paintPeer(g);
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1164,12 +1164,6 @@
}
@Override
- @SuppressWarnings("deprecation")
- public ComponentPeer getPeer() {
- return (ComponentPeer) (xwin);
- }
-
- @Override
public void updateUI() {
ComponentUI ui = new XAWTScrollPaneUI();
setUI(ui);
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextFieldPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextFieldPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -547,71 +547,63 @@
implements ActionListener, DocumentListener {
private boolean isFocused = false;
- private final XComponentPeer peer;
+ private final XComponentPeer xwin;
- XAWTTextField(String text, XComponentPeer peer, Container parent) {
+ XAWTTextField(String text, XComponentPeer xwin, Container parent) {
super(text);
- this.peer = peer;
+ this.xwin = xwin;
setDoubleBuffered(true);
setFocusable(false);
AWTAccessor.getComponentAccessor().setParent(this,parent);
- setBackground(peer.getPeerBackground());
- setForeground(peer.getPeerForeground());
- setFont(peer.getPeerFont());
+ setBackground(xwin.getPeerBackground());
+ setForeground(xwin.getPeerForeground());
+ setFont(xwin.getPeerFont());
setCaretPosition(0);
addActionListener(this);
addNotify();
-
}
@Override
@SuppressWarnings("deprecation")
public void actionPerformed( ActionEvent actionEvent ) {
- peer.postEvent(new ActionEvent(peer.target,
- ActionEvent.ACTION_PERFORMED,
- getText(),
- actionEvent.getWhen(),
- actionEvent.getModifiers()));
+ xwin.postEvent(
+ new ActionEvent(xwin.target, ActionEvent.ACTION_PERFORMED,
+ getText(), actionEvent.getWhen(),
+ actionEvent.getModifiers()));
}
@Override
public void insertUpdate(DocumentEvent e) {
- if (peer != null) {
- peer.postEvent(new TextEvent(peer.target,
+ if (xwin != null) {
+ xwin.postEvent(new TextEvent(xwin.target,
TextEvent.TEXT_VALUE_CHANGED));
}
}
@Override
public void removeUpdate(DocumentEvent e) {
- if (peer != null) {
- peer.postEvent(new TextEvent(peer.target,
+ if (xwin != null) {
+ xwin.postEvent(new TextEvent(xwin.target,
TextEvent.TEXT_VALUE_CHANGED));
}
}
@Override
public void changedUpdate(DocumentEvent e) {
- if (peer != null) {
- peer.postEvent(new TextEvent(peer.target,
+ if (xwin != null) {
+ xwin.postEvent(new TextEvent(xwin.target,
TextEvent.TEXT_VALUE_CHANGED));
}
}
- @Override
- @SuppressWarnings("deprecation")
- public ComponentPeer getPeer() {
- return (ComponentPeer) peer;
- }
-
public void repaintNow() {
paintImmediately(getBounds());
}
@Override
public Graphics getGraphics() {
- return peer.getGraphics();
+ return xwin.getGraphics();
}
@Override
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java Fri Apr 17 16:54:13 2015 +0300
@@ -605,7 +605,7 @@
Component owner =
XKeyboardFocusManagerPeer.getInstance().getCurrentFocusOwner();
if (owner != null) {
- XWindow ownerWindow = (XWindow) AWTAccessor.getComponentAccessor().getPeer(owner);
+ XWindow ownerWindow = AWTAccessor.getComponentAccessor().getPeer(owner);
if (ownerWindow != null) {
w = ownerWindow.getContentWindow();
}
@@ -2449,17 +2449,17 @@
awtUnlock();
}
}
- @SuppressWarnings("deprecation")
public void grab(Window w) {
- if (w.getPeer() != null) {
- ((XWindowPeer)w.getPeer()).setGrab(true);
+ final Object peer = AWTAccessor.getComponentAccessor().getPeer(w);
+ if (peer != null) {
+ ((XWindowPeer) peer).setGrab(true);
}
}
- @SuppressWarnings("deprecation")
public void ungrab(Window w) {
- if (w.getPeer() != null) {
- ((XWindowPeer)w.getPeer()).setGrab(false);
+ final Object peer = AWTAccessor.getComponentAccessor().getPeer(w);
+ if (peer != null) {
+ ((XWindowPeer) peer).setGrab(false);
}
}
/**
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,8 +30,6 @@
import java.awt.peer.TrayIconPeer;
import sun.awt.*;
import java.awt.image.*;
-import java.text.BreakIterator;
-import java.util.concurrent.ArrayBlockingQueue;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.lang.reflect.InvocationTargetException;
@@ -347,7 +345,6 @@
}
// It's synchronized with disposal by EDT.
- @SuppressWarnings("deprecation")
public void showPopupMenu(int x, int y) {
if (isDisposed())
return;
@@ -366,7 +363,9 @@
}
if (popup != null) {
- Point loc = ((XBaseWindow)eframe.getPeer()).toLocal(new Point(x, y));
+ final XBaseWindow peer = AWTAccessor.getComponentAccessor()
+ .getPeer(eframe);
+ Point loc = peer.toLocal(new Point(x, y));
popup.show(eframe, loc.x, loc.y);
}
}
@@ -416,9 +415,9 @@
canvas.addMouseMotionListener(eventProxy);
}
- @SuppressWarnings("deprecation")
long getWindow() {
- return ((XEmbeddedFramePeer)eframe.getPeer()).getWindow();
+ return AWTAccessor.getComponentAccessor()
+ .<XEmbeddedFramePeer>getPeer(eframe).getWindow();
}
public boolean isDisposed() {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
import java.lang.reflect.Method;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.util.logging.PlatformLogger;
import sun.awt.*;
@@ -282,15 +283,15 @@
return reparented;
}
- @SuppressWarnings("deprecation")
static long getParentWindowID(Component target) {
- ComponentPeer peer = target.getParent().getPeer();
Component temp = target.getParent();
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ ComponentPeer peer = acc.getPeer(temp);
while (!(peer instanceof XWindow))
{
temp = temp.getParent();
- peer = temp.getPeer();
+ peer = acc.getPeer(temp);
}
if (peer != null && peer instanceof XWindow)
@@ -299,17 +300,17 @@
}
- @SuppressWarnings("deprecation")
static XWindow getParentXWindowObject(Component target) {
if (target == null) return null;
Component temp = target.getParent();
if (temp == null) return null;
- ComponentPeer peer = temp.getPeer();
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ ComponentPeer peer = acc.getPeer(temp);
if (peer == null) return null;
while ((peer != null) && !(peer instanceof XWindow))
{
temp = temp.getParent();
- peer = temp.getPeer();
+ peer = acc.getPeer(temp);
}
if (peer != null && peer instanceof XWindow)
return (XWindow) peer;
@@ -552,7 +553,7 @@
int h = xe.get_height();
Component target = getEventSource();
- AWTAccessor.ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
+ ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
if (!compAccessor.getIgnoreRepaint(target)
&& compAccessor.getWidth(target) != 0
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -46,6 +46,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.util.logging.PlatformLogger;
import sun.awt.AWTAccessor;
@@ -225,7 +226,7 @@
Window t_window = (Window)target;
Window owner = t_window.getOwner();
if (owner != null) {
- ownerPeer = (XWindowPeer)owner.getPeer();
+ ownerPeer = AWTAccessor.getComponentAccessor().getPeer(owner);
if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Owner is " + owner);
focusLog.finer("Owner peer is " + ownerPeer);
@@ -401,15 +402,15 @@
}
}
- @SuppressWarnings("deprecation")
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
dumpIcons(winAttr.icons);
setIconHints(icons);
Window target = (Window)this.target;
Window[] children = target.getOwnedWindows();
int cnt = children.length;
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
for (int i = 0; i < cnt; i++) {
- ComponentPeer childPeer = children[i].getPeer();
+ final ComponentPeer childPeer = acc.getPeer(children[i]);
if (childPeer != null && childPeer instanceof XWindowPeer) {
if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
((XWindowPeer)childPeer).winAttr.icons = icons;
@@ -1161,7 +1162,7 @@
if (warningWindow != null) {
// We can't use the coordinates stored in the XBaseWindow since
// they are zeros for decorated frames.
- AWTAccessor.ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
+ ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
int x = compAccessor.getX(target);
int y = compAccessor.getY(target);
int width = compAccessor.getWidth(target);
@@ -1486,7 +1487,7 @@
XToolkit.awtLock();
try {
if (isReparented() && delayedModalBlocking) {
- addToTransientFors((XDialogPeer) AWTAccessor.getComponentAccessor().getPeer(modalBlocker));
+ addToTransientFors(AWTAccessor.getComponentAccessor().getPeer(modalBlocker));
delayedModalBlocking = false;
}
} finally {
@@ -1570,7 +1571,7 @@
try {
// State lock should always be after awtLock
synchronized(getStateLock()) {
- XDialogPeer blockerPeer = (XDialogPeer) AWTAccessor.getComponentAccessor().getPeer(d);
+ XDialogPeer blockerPeer = AWTAccessor.getComponentAccessor().getPeer(d);
if (blocked) {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("{0} is blocked by {1}", this, blockerPeer);
@@ -1852,7 +1853,7 @@
// current chain iterator in the order from next to prev
XWindowPeer chainToSplit = prevTransientFor;
while (chainToSplit != null) {
- XWindowPeer blocker = (XWindowPeer) AWTAccessor.getComponentAccessor().getPeer(chainToSplit.modalBlocker);
+ XWindowPeer blocker = AWTAccessor.getComponentAccessor().getPeer(chainToSplit.modalBlocker);
if (thisChainBlockers.contains(blocker)) {
// add to this dialog's chain
setToplevelTransientFor(thisChain, chainToSplit, true, false);
@@ -1913,7 +1914,7 @@
}
focusLog.fine("Parent window is not active");
- XDecoratedPeer wpeer = (XDecoratedPeer)AWTAccessor.getComponentAccessor().getPeer(ownerWindow);
+ XDecoratedPeer wpeer = AWTAccessor.getComponentAccessor().getPeer(ownerWindow);
if (wpeer != null && wpeer.requestWindowFocus(this, time, timeProvided)) {
focusLog.fine("Parent window accepted focus request - generating focus for this window");
return true;
@@ -2259,7 +2260,7 @@
while (w != null && toplevel != this && !(toplevel instanceof XDialogPeer)) {
w = (Window) AWTAccessor.getComponentAccessor().getParent(w);
if (w != null) {
- toplevel = (XWindowPeer) AWTAccessor.getComponentAccessor().getPeer(w);
+ toplevel = AWTAccessor.getComponentAccessor().getPeer(w);
}
}
if (w == null || (w != this.target && w instanceof Dialog)) {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -326,18 +326,16 @@
return (isFullScreenSupported() && (getFullScreenWindow() != null));
}
- @SuppressWarnings("deprecation")
private static void enterFullScreenExclusive(Window w) {
- X11ComponentPeer peer = (X11ComponentPeer)w.getPeer();
+ X11ComponentPeer peer = AWTAccessor.getComponentAccessor().getPeer(w);
if (peer != null) {
enterFullScreenExclusive(peer.getContentWindow());
peer.setFullScreenExclusiveModeState(true);
}
}
- @SuppressWarnings("deprecation")
private static void exitFullScreenExclusive(Window w) {
- X11ComponentPeer peer = (X11ComponentPeer)w.getPeer();
+ X11ComponentPeer peer = AWTAccessor.getComponentAccessor().getPeer(w);
if (peer != null) {
peer.setFullScreenExclusiveModeState(false);
exitFullScreenExclusive(peer.getContentWindow());
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/opengl/GLXVolatileSurfaceManager.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/opengl/GLXVolatileSurfaceManager.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,9 @@
import java.awt.GraphicsConfiguration;
import java.awt.Transparency;
import java.awt.image.ColorModel;
+
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.awt.X11ComponentPeer;
import sun.awt.image.SunVolatileImage;
import sun.awt.image.VolatileSurfaceManager;
@@ -73,12 +76,11 @@
* Create a pbuffer-based SurfaceData object (or init the backbuffer
* of an existing window if this is a double buffered GraphicsConfig)
*/
- @SuppressWarnings("deprecation")
protected SurfaceData initAcceleratedSurface() {
SurfaceData sData;
Component comp = vImg.getComponent();
- X11ComponentPeer peer =
- (comp != null) ? (X11ComponentPeer)comp.getPeer() : null;
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ X11ComponentPeer peer = (comp != null) ? acc.getPeer(comp) : null;
try {
boolean createVSynced = false;
--- a/jdk/src/java.desktop/unix/native/common/awt/awt_Font.c Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/unix/native/common/awt/awt_Font.c Fri Apr 17 16:54:13 2015 +0300
@@ -84,12 +84,10 @@
(JNIEnv *env, jclass cls)
{
#ifndef HEADLESS
- /** We call "NoClientCode" methods because they won't invoke client
- code on the privileged toolkit thread **/
CHECK_NULL(fontIDs.pData = (*env)->GetFieldID(env, cls, "pData", "J"));
CHECK_NULL(fontIDs.style = (*env)->GetFieldID(env, cls, "style", "I"));
CHECK_NULL(fontIDs.size = (*env)->GetFieldID(env, cls, "size", "I"));
- CHECK_NULL(fontIDs.getPeer = (*env)->GetMethodID(env, cls, "getPeer_NoClientCode",
+ CHECK_NULL(fontIDs.getPeer = (*env)->GetMethodID(env, cls, "getFontPeer",
"()Ljava/awt/peer/FontPeer;"));
CHECK_NULL(fontIDs.getFamily = (*env)->GetMethodID(env, cls, "getFamily_NoClientCode",
"()Ljava/lang/String;"));
--- a/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -329,7 +329,6 @@
}
@Override
- @SuppressWarnings("deprecation")
public synchronized void setFullScreenWindow(Window w) {
Window old = getFullScreenWindow();
if (w == old) {
@@ -353,7 +352,7 @@
// entering the fullscreen mode.
defaultDisplayMode = null;
}
- WWindowPeer peer = (WWindowPeer)old.getPeer();
+ WWindowPeer peer = AWTAccessor.getComponentAccessor().getPeer(old);
if (peer != null) {
peer.setFullScreenExclusiveModeState(false);
// we used to destroy the buffers on exiting fs mode, this
@@ -372,7 +371,7 @@
defaultDisplayMode = getDisplayMode();
addFSWindowListener(w);
// Enter full screen exclusive mode.
- WWindowPeer peer = (WWindowPeer)w.getPeer();
+ WWindowPeer peer = AWTAccessor.getComponentAccessor().getPeer(w);
if (peer != null) {
synchronized(peer) {
enterFullScreenExclusive(screen, peer);
@@ -405,7 +404,6 @@
}
@Override
- @SuppressWarnings("deprecation")
public synchronized void setDisplayMode(DisplayMode dm) {
if (!isDisplayChangeSupported()) {
super.setDisplayMode(dm);
@@ -419,7 +417,7 @@
}
Window w = getFullScreenWindow();
if (w != null) {
- WWindowPeer peer = (WWindowPeer)w.getPeer();
+ WWindowPeer peer = AWTAccessor.getComponentAccessor().getPeer(w);
configDisplayMode(screen, peer, dm.getWidth(), dm.getHeight(),
dm.getBitDepth(), dm.getRefreshRate());
// resize the fullscreen window to the dimensions of the new
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WChoicePeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WChoicePeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,8 @@
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowAdapter;
+
+import sun.awt.AWTAccessor;
import sun.awt.SunToolkit;
final class WChoicePeer extends WComponentPeer implements ChoicePeer {
@@ -94,7 +96,6 @@
native void create(WComponentPeer parent);
@Override
- @SuppressWarnings("deprecation")
void initialize() {
Choice opt = (Choice)target;
int itemCount = opt.getItemCount();
@@ -111,7 +112,8 @@
Window parentWindow = SunToolkit.getContainingWindow((Component)target);
if (parentWindow != null) {
- WWindowPeer wpeer = (WWindowPeer)parentWindow.getPeer();
+ final WWindowPeer wpeer = AWTAccessor.getComponentAccessor()
+ .getPeer(parentWindow);
if (wpeer != null) {
windowListener = new WindowAdapter() {
@Override
@@ -130,13 +132,13 @@
}
@Override
- @SuppressWarnings("deprecation")
protected void disposeImpl() {
// TODO: we should somehow reset the listener when the choice
// is moved to another toplevel without destroying its peer.
Window parentWindow = SunToolkit.getContainingWindow((Component)target);
if (parentWindow != null) {
- WWindowPeer wpeer = (WWindowPeer)parentWindow.getPeer();
+ final WWindowPeer wpeer = AWTAccessor.getComponentAccessor()
+ .getPeer(parentWindow);
if (wpeer != null) {
wpeer.removeWindowListener(windowListener);
}
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -569,7 +569,6 @@
final static Font defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
@Override
- @SuppressWarnings("deprecation")
public Graphics getGraphics() {
if (isDisposed()) {
return null;
@@ -578,8 +577,9 @@
Component target = (Component)getTarget();
Window window = SunToolkit.getContainingWindow(target);
if (window != null) {
- Graphics g =
- ((WWindowPeer)window.getPeer()).getTranslucentGraphics();
+ final WWindowPeer wpeer = AWTAccessor.getComponentAccessor()
+ .getPeer(window);
+ Graphics g = wpeer.getTranslucentGraphics();
// getTranslucentGraphics() returns non-null value for non-opaque windows only
if (g != null) {
// Non-opaque windows do not support heavyweight children.
@@ -685,7 +685,6 @@
// TODO: consider moving it to KeyboardFocusManagerPeerImpl
@Override
- @SuppressWarnings("deprecation")
public boolean requestFocus(Component lightweightChild, boolean temporary,
boolean focusedWindowChangeAllowed, long time,
CausedFocusEvent.Cause cause)
@@ -713,7 +712,8 @@
if (parentWindow == null) {
return rejectFocusRequestHelper("WARNING: Parent window is null");
}
- WWindowPeer wpeer = (WWindowPeer)parentWindow.getPeer();
+ final WWindowPeer wpeer = AWTAccessor.getComponentAccessor()
+ .getPeer(parentWindow);
if (wpeer == null) {
return rejectFocusRequestHelper("WARNING: Parent window's peer is null");
}
@@ -1104,7 +1104,6 @@
// in the browser on Vista when DWM is enabled.
// @return true if the toplevel container is not an EmbeddedFrame or
// if this EmbeddedFrame is acceleration capable, false otherwise
- @SuppressWarnings("deprecation")
private static final boolean isContainingTopLevelAccelCapable(Component c) {
while (c != null && !(c instanceof WEmbeddedFrame)) {
c = c.getParent();
@@ -1112,7 +1111,9 @@
if (c == null) {
return true;
}
- return ((WEmbeddedFramePeer)c.getPeer()).isAccelCapable();
+ final WEmbeddedFramePeer peer = AWTAccessor.getComponentAccessor()
+ .getPeer(c);
+ return peer.isAccelCapable();
}
/**
@@ -1120,7 +1121,6 @@
* @since 1.7
*/
@Override
- @SuppressWarnings("deprecation")
public void applyShape(Region shape) {
if (shapeLog.isLoggable(PlatformLogger.Level.FINER)) {
shapeLog.finer("*** INFO: Setting shape: PEER: " + this
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WDialogPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WDialogPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -103,7 +103,7 @@
@Override
public void blockWindows(java.util.List<Window> toBlock) {
for (Window w : toBlock) {
- WWindowPeer wp = (WWindowPeer)AWTAccessor.getComponentAccessor().getPeer(w);
+ WWindowPeer wp = AWTAccessor.getComponentAccessor().getPeer(w);
if (wp != null) {
wp.setModalBlocked((Dialog)target, true);
}
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFrame.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFrame.java Fri Apr 17 16:54:13 2015 +0300
@@ -30,8 +30,11 @@
import java.awt.event.InvocationEvent;
import java.awt.peer.ComponentPeer;
import java.awt.image.*;
+
import sun.awt.image.ByteInterleavedRaster;
import sun.security.action.GetPropertyAction;
+
+import java.awt.peer.FramePeer;
import java.security.PrivilegedAction;
import java.security.AccessController;
@@ -80,9 +83,8 @@
}
}
- @SuppressWarnings("deprecation")
public void addNotify() {
- if (getPeer() == null) {
+ if (!isDisplayable()) {
WToolkit toolkit = (WToolkit)Toolkit.getDefaultToolkit();
setPeer(toolkit.createEmbeddedFrame(this));
}
@@ -232,16 +234,16 @@
public void activateEmbeddingTopLevel() {
}
- @SuppressWarnings("deprecation")
public void synthesizeWindowActivation(final boolean activate) {
+ final FramePeer peer = AWTAccessor.getComponentAccessor().getPeer(this);
if (!activate || EventQueue.isDispatchThread()) {
- ((WFramePeer)getPeer()).emulateActivation(activate);
+ peer.emulateActivation(activate);
} else {
// To avoid focus concurrence b/w IE and EmbeddedFrame
// activation is postponed by means of posting it to EDT.
Runnable r = new Runnable() {
public void run() {
- ((WFramePeer)getPeer()).emulateActivation(true);
+ peer.emulateActivation(true);
}
};
WToolkit.postEvent(WToolkit.targetToAppContext(this),
@@ -249,10 +251,11 @@
}
}
- @SuppressWarnings("deprecation")
public boolean requestFocusToEmbedder() {
if (isEmbeddedInIE) {
- return ((WEmbeddedFramePeer) getPeer()).requestFocusToEmbedder();
+ final WEmbeddedFramePeer peer = AWTAccessor.getComponentAccessor()
+ .getPeer(this);
+ return peer.requestFocusToEmbedder();
}
return false;
}
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -237,7 +237,7 @@
@Override
public void blockWindows(java.util.List<Window> toBlock) {
for (Window w : toBlock) {
- WWindowPeer wp = (WWindowPeer)AWTAccessor.getComponentAccessor().getPeer(w);
+ WWindowPeer wp = AWTAccessor.getComponentAccessor().getPeer(w);
if (wp != null) {
blockWindow(wp);
}
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,9 @@
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
+
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.awt.im.InputMethodAdapter;
final class WInputMethod extends InputMethodAdapter
@@ -606,18 +609,17 @@
// java.awt.Toolkit#getNativeContainer() is not available
// from this package
- @SuppressWarnings("deprecation")
private WComponentPeer getNearestNativePeer(Component comp)
{
if (comp==null) return null;
-
- ComponentPeer peer = comp.getPeer();
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ ComponentPeer peer = acc.getPeer(comp);
if (peer==null) return null;
while (peer instanceof java.awt.peer.LightweightPeer) {
comp = comp.getParent();
if (comp==null) return null;
- peer = comp.getPeer();
+ peer = acc.getPeer(comp);
if (peer==null) return null;
}
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WKeyboardFocusManagerPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WKeyboardFocusManagerPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,9 @@
import java.awt.Window;
import java.awt.Component;
import java.awt.peer.ComponentPeer;
+
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.awt.KeyboardFocusManagerPeerImpl;
import sun.awt.CausedFocusEvent;
@@ -46,9 +49,9 @@
}
@Override
- @SuppressWarnings("deprecation")
public void setCurrentFocusOwner(Component comp) {
- setNativeFocusOwner(comp != null ? comp.getPeer() : null);
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ setNativeFocusOwner(comp != null ? acc.getPeer(comp) : null);
}
@Override
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPageDialog.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPageDialog.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -57,15 +57,13 @@
}
@Override
- @SuppressWarnings("deprecation")
public void addNotify() {
synchronized(getTreeLock()) {
Container parent = getParent();
- if (parent != null && parent.getPeer() == null) {
+ if (parent != null && !parent.isDisplayable()) {
parent.addNotify();
}
-
- if (getPeer() == null) {
+ if (!isDisplayable()) {
ComponentPeer peer = ((WToolkit)Toolkit.getDefaultToolkit()).
createWPageDialog(this);
setPeer(peer);
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialog.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialog.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -58,15 +58,14 @@
}
@Override
- @SuppressWarnings("deprecation")
public void addNotify() {
synchronized(getTreeLock()) {
Container parent = getParent();
- if (parent != null && parent.getPeer() == null) {
+ if (parent != null && !parent.isDisplayable()) {
parent.addNotify();
}
- if (getPeer() == null) {
+ if (!isDisplayable()) {
ComponentPeer peer = ((WToolkit)Toolkit.getDefaultToolkit()).
createWPrintDialog(this);
setPeer(peer);
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -112,7 +112,7 @@
@Override
public void blockWindows(java.util.List<Window> toBlock) {
for (Window w : toBlock) {
- WWindowPeer wp = (WWindowPeer)AWTAccessor.getComponentAccessor().getPeer(w);
+ WWindowPeer wp = AWTAccessor.getComponentAccessor().getPeer(w);
if (wp != null) {
blockWindow(wp);
}
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,13 +30,11 @@
import java.awt.Graphics2D;
import java.awt.GraphicsEnvironment;
import java.awt.HeadlessException;
-import java.awt.KeyboardFocusManager;
import java.awt.Toolkit;
import java.awt.BasicStroke;
import java.awt.Button;
import java.awt.Component;
import java.awt.Dimension;
-import java.awt.Event;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.FileDialog;
@@ -62,6 +60,8 @@
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.print.PeekGraphics;
import sun.print.PeekMetrics;
@@ -2117,7 +2117,6 @@
short xres_quality,
short yres);
- @SuppressWarnings("deprecation")
public PrintRequestAttributeSet
showDocumentProperties(Window owner,
PrintService service,
@@ -2127,7 +2126,8 @@
setNativePrintServiceIfNeeded(service.getName());
} catch (PrinterException e) {
}
- long hWnd = ((WWindowPeer)(owner.getPeer())).getHWnd();
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ long hWnd = acc.<WComponentPeer>getPeer(owner).getHWnd();
DevModeValues info = new DevModeValues();
getDevModeValues(aset, info);
boolean ok =
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
import java.awt.peer.ScrollPanePeer;
import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.awt.PeerEvent;
import sun.util.logging.PlatformLogger;
@@ -199,7 +200,6 @@
}
@Override
- @SuppressWarnings("deprecation")
public void run() {
if (getScrollChild() == null) {
return;
@@ -267,8 +267,9 @@
// Paint the exposed area right away. To do this - find
// the heavyweight ancestor of the scroll child.
Component hwAncestor = getScrollChild();
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
while (hwAncestor != null
- && !(hwAncestor.getPeer() instanceof WComponentPeer))
+ && !(acc.getPeer(hwAncestor) instanceof WComponentPeer))
{
hwAncestor = hwAncestor.getParent();
}
@@ -278,7 +279,7 @@
"couldn't find heavyweight ancestor of scroll pane child");
}
}
- WComponentPeer hwPeer = (WComponentPeer)hwAncestor.getPeer();
+ WComponentPeer hwPeer = acc.getPeer(hwAncestor);
hwPeer.paintDamagedAreaImmediately();
}
}
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,8 @@
import java.beans.PropertyChangeListener;
import java.security.AccessController;
import java.security.PrivilegedAction;
+
+import sun.awt.AWTAccessor;
import sun.awt.AppContext;
import sun.awt.AWTAutoShutdown;
import sun.awt.AWTPermissions;
@@ -438,9 +440,8 @@
}
@Override
- @SuppressWarnings("deprecation")
public void disableBackgroundErase(Canvas canvas) {
- WCanvasPeer peer = (WCanvasPeer)canvas.getPeer();
+ WCanvasPeer peer = AWTAccessor.getComponentAccessor().getPeer(canvas);
if (peer == null) {
throw new IllegalStateException("Canvas must have a valid peer");
}
@@ -1100,18 +1101,18 @@
}
@Override
- @SuppressWarnings("deprecation")
public void grab(Window w) {
- if (w.getPeer() != null) {
- ((WWindowPeer)w.getPeer()).grab();
+ final Object peer = AWTAccessor.getComponentAccessor().getPeer(w);
+ if (peer != null) {
+ ((WWindowPeer) peer).grab();
}
}
@Override
- @SuppressWarnings("deprecation")
public void ungrab(Window w) {
- if (w.getPeer() != null) {
- ((WWindowPeer)w.getPeer()).ungrab();
+ final Object peer = AWTAccessor.getComponentAccessor().getPeer(w);
+ if (peer != null) {
+ ((WWindowPeer) peer).ungrab();
}
}
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,8 @@
import java.awt.Image;
import java.awt.peer.TrayIconPeer;
import java.awt.image.*;
+
+import sun.awt.AWTAccessor;
import sun.awt.SunToolkit;
import sun.awt.image.IntegerComponentRaster;
@@ -80,25 +82,23 @@
if (isDisposed())
return;
- SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
- @Override
- @SuppressWarnings("deprecation")
- public void run() {
- PopupMenu newPopup = ((TrayIcon)target).getPopupMenu();
- if (popup != newPopup) {
- if (popup != null) {
- popupParent.remove(popup);
- }
- if (newPopup != null) {
- popupParent.add(newPopup);
- }
- popup = newPopup;
- }
- if (popup != null) {
- ((WPopupMenuPeer)popup.getPeer()).show(popupParent, new Point(x, y));
- }
+ SunToolkit.executeOnEventHandlerThread(target, () -> {
+ PopupMenu newPopup = ((TrayIcon)target).getPopupMenu();
+ if (popup != newPopup) {
+ if (popup != null) {
+ popupParent.remove(popup);
+ }
+ if (newPopup != null) {
+ popupParent.add(newPopup);
}
- });
+ popup = newPopup;
+ }
+ if (popup != null) {
+ WPopupMenuPeer peer = AWTAccessor.getMenuComponentAccessor()
+ .getPeer(popup);
+ peer.show(popupParent, new Point(x, y));
+ }
+ });
}
@Override
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -409,12 +409,12 @@
}
@Override
- @SuppressWarnings("deprecation")
public void setModalBlocked(Dialog dialog, boolean blocked) {
synchronized (((Component)getTarget()).getTreeLock()) // State lock should always be after awtLock
{
// use WWindowPeer instead of WDialogPeer because of FileDialogs and PrintDialogs
- WWindowPeer blockerPeer = (WWindowPeer)dialog.getPeer();
+ WWindowPeer blockerPeer = AWTAccessor.getComponentAccessor()
+ .getPeer(dialog);
if (blocked)
{
modalBlocker = blockerPeer;
@@ -609,14 +609,13 @@
super.print(g);
}
- @SuppressWarnings("deprecation")
private void replaceSurfaceDataRecursively(Component c) {
if (c instanceof Container) {
for (Component child : ((Container)c).getComponents()) {
replaceSurfaceDataRecursively(child);
}
}
- ComponentPeer cp = c.getPeer();
+ final Object cp = AWTAccessor.getComponentAccessor().getPeer(c);
if (cp instanceof WComponentPeer) {
((WComponentPeer)cp).replaceSurfaceDataLater();
}
@@ -818,7 +817,7 @@
* updates the list of active windows per AppContext, so the latest active
* window is always at the end of the list. The list is stored in AppContext.
*/
- @SuppressWarnings( value = {"deprecation", "unchecked"})
+ @SuppressWarnings("unchecked")
private static class ActiveWindowListener implements PropertyChangeListener {
@Override
public void propertyChange(PropertyChangeEvent e) {
@@ -828,7 +827,7 @@
}
AppContext appContext = SunToolkit.targetToAppContext(w);
synchronized (appContext) {
- WWindowPeer wp = (WWindowPeer)w.getPeer();
+ WWindowPeer wp = AWTAccessor.getComponentAccessor().getPeer(w);
// add/move wp to the end of the list
List<WWindowPeer> l = (List<WWindowPeer>)appContext.get(ACTIVE_WINDOWS_KEY);
if (l != null) {
--- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsDevice.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsDevice.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,9 @@
import java.awt.event.WindowListener;
import java.awt.peer.WindowPeer;
import java.util.ArrayList;
+
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.awt.Win32GraphicsDevice;
import sun.awt.windows.WWindowPeer;
import sun.java2d.pipe.hw.ContextCapabilities;
@@ -176,11 +179,10 @@
long hwnd);
@Override
- @SuppressWarnings("deprecation")
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
- final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();
-
+ final WWindowPeer wpeer = AWTAccessor.getComponentAccessor()
+ .getPeer(realFSWindow);
D3DRenderQueue rq = D3DRenderQueue.getInstance();
rq.lock();
try {
@@ -247,16 +249,15 @@
}
@Override
- @SuppressWarnings("deprecation")
protected void addFSWindowListener(Window w) {
// if the window is not a toplevel (has an owner) we have to use the
// real toplevel to enter the full-screen mode with (4933099).
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
if (!(w instanceof Frame) && !(w instanceof Dialog) &&
(realFSWindow = getToplevelOwner(w)) != null)
{
ownerOrigBounds = realFSWindow.getBounds();
- WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();
-
+ WWindowPeer fp = acc.getPeer(realFSWindow);
ownerWasVisible = realFSWindow.isVisible();
Rectangle r = w.getBounds();
// we use operations on peer instead of component because calling
@@ -268,14 +269,13 @@
}
fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
- ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);
+ ((WWindowPeer) acc.getPeer(realFSWindow)).setAlwaysOnTop(true);
fsWindowListener = new D3DFSWindowAdapter();
realFSWindow.addWindowListener(fsWindowListener);
}
@Override
- @SuppressWarnings("deprecation")
protected void removeFSWindowListener(Window w) {
realFSWindow.removeWindowListener(fsWindowListener);
fsWindowListener = null;
@@ -290,7 +290,8 @@
* its original size (just like the Window is being resized
* to its original size in GraphicsDevice).
*/
- WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();
+ final WWindowPeer wpeer = AWTAccessor.getComponentAccessor()
+ .getPeer(realFSWindow);
if (wpeer != null) {
if (ownerOrigBounds != null) {
// if the window went into fs mode before it was realized it
@@ -340,7 +341,6 @@
int bitDepth,
int refreshRate);
@Override
- @SuppressWarnings("deprecation")
protected void configDisplayMode(final int screen, final WindowPeer w,
final int width, final int height,
final int bitDepth, final int refreshRate)
@@ -351,8 +351,8 @@
refreshRate);
return;
}
-
- final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();
+ final WWindowPeer wpeer = AWTAccessor.getComponentAccessor()
+ .getPeer(realFSWindow);
// REMIND: we do this before we switch the display mode, so
// the dimensions may be exceeding the dimensions of the screen,
--- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,7 @@
import java.util.HashMap;
import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.awt.util.ThreadGroupUtils;
import sun.awt.Win32GraphicsConfig;
import sun.awt.windows.WComponentPeer;
@@ -531,11 +532,11 @@
* @param comp component to check for hw children
* @return true if Component has heavyweight children
*/
- @SuppressWarnings("deprecation")
private static boolean hasHWChildren(Component comp) {
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
if (comp instanceof Container) {
for (Component c : ((Container)comp).getComponents()) {
- if (c.getPeer() instanceof WComponentPeer || hasHWChildren(c)) {
+ if (acc.getPeer(c) instanceof WComponentPeer || hasHWChildren(c)) {
return true;
}
}
--- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DVolatileSurfaceManager.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DVolatileSurfaceManager.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,9 @@
import java.awt.Image;
import java.awt.Transparency;
import java.awt.image.ColorModel;
+
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.awt.Win32GraphicsConfig;
import sun.awt.image.SunVolatileImage;
import sun.awt.image.SurfaceManager;
@@ -79,12 +82,11 @@
* Create a pbuffer-based SurfaceData object (or init the backbuffer
* of an existing window if this is a double buffered GraphicsConfig).
*/
- @SuppressWarnings("deprecation")
protected SurfaceData initAcceleratedSurface() {
SurfaceData sData;
Component comp = vImg.getComponent();
- WComponentPeer peer =
- (comp != null) ? (WComponentPeer)comp.getPeer() : null;
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ WComponentPeer peer = (comp != null) ? acc.getPeer(comp) : null;
try {
boolean forceback = false;
--- a/jdk/src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,9 @@
import java.awt.GraphicsConfiguration;
import java.awt.Transparency;
import java.awt.image.ColorModel;
+
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
import sun.awt.image.SunVolatileImage;
import sun.awt.image.VolatileSurfaceManager;
import sun.awt.windows.WComponentPeer;
@@ -73,12 +76,11 @@
* Create a pbuffer-based SurfaceData object (or init the backbuffer
* of an existing window if this is a double buffered GraphicsConfig).
*/
- @SuppressWarnings("deprecation")
protected SurfaceData initAcceleratedSurface() {
SurfaceData sData;
Component comp = vImg.getComponent();
- WComponentPeer peer =
- (comp != null) ? (WComponentPeer)comp.getPeer() : null;
+ final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ WComponentPeer peer = (comp != null) ? acc.getPeer(comp) : null;
try {
boolean createVSynced = false;
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Font.cpp Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Font.cpp Fri Apr 17 16:54:13 2015 +0300
@@ -985,7 +985,7 @@
JNIEXPORT void JNICALL
Java_java_awt_Font_initIDs(JNIEnv *env, jclass cls)
{
- CHECK_NULL(AwtFont::peerMID = env->GetMethodID(cls, "getPeer",
+ CHECK_NULL(AwtFont::peerMID = env->GetMethodID(cls, "getFontPeer",
"()Ljava/awt/peer/FontPeer;"));
CHECK_NULL(AwtFont::pDataID = env->GetFieldID(cls, "pData", "J"));
CHECK_NULL(AwtFont::nameID =
--- a/jdk/test/java/awt/Component/Headless/HeadlessComponent.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/java/awt/Component/Headless/HeadlessComponent.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,6 @@
comp.getName();
comp.setName("goober");
comp.getParent();
- comp.getPeer();
comp.getGraphicsConfiguration();
comp.getTreeLock();
comp.getToolkit();
--- a/jdk/test/java/awt/Component/Headless/HeadlessContainer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/java/awt/Component/Headless/HeadlessContainer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -87,7 +87,6 @@
lw.setName("goober");
lw.getName();
lw.getParent();
- lw.getPeer();
lw.getGraphicsConfiguration();
lw.getTreeLock();
lw.getToolkit();
--- a/jdk/test/java/awt/Component/Headless/HeadlessPanel.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/java/awt/Component/Headless/HeadlessPanel.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -76,7 +76,6 @@
p.setName("goober");
p.getName();
p.getParent();
- p.getPeer();
p.getGraphicsConfiguration();
p.getTreeLock();
p.getToolkit();
--- a/jdk/test/java/awt/FontClass/HeadlessFont.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/java/awt/FontClass/HeadlessFont.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -224,11 +224,6 @@
f2.hasUniformLineMetrics();
f3.hasUniformLineMetrics();
f4.hasUniformLineMetrics();
-
- f1.getPeer();
- f2.getPeer();
- f3.getPeer();
- f4.getPeer();
}
}
--- a/jdk/test/java/awt/Mixing/AWT_Mixing/OverlappingTestBase.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/java/awt/Mixing/AWT_Mixing/OverlappingTestBase.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,8 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import javax.swing.*;
+
+import sun.awt.AWTAccessor;
import sun.awt.EmbeddedFrame;
import java.io.*;
import test.java.awt.regtesthelpers.Util;
@@ -243,8 +245,9 @@
if (Toolkit.getDefaultToolkit().getClass().getName().contains("XToolkit")) {
getWindowMethodName = "getWindow";
}
- ComponentPeer peer = embedder.getPeer();
-// System.err.println("Peer: " + peer);
+ ComponentPeer peer = AWTAccessor.getComponentAccessor()
+ .getPeer(embedder);
+ // System.err.println("Peer: " + peer);
Method getWindowMethod = peer.getClass().getMethod(getWindowMethodName);
frameWindow = (Long) getWindowMethod.invoke(peer);
// System.err.println("frame peer ID: " + frameWindow);
--- a/jdk/test/java/awt/Paint/ButtonRepaint.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/java/awt/Paint/ButtonRepaint.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,6 @@
import java.awt.*;
-import java.awt.peer.ButtonPeer;
/**
* @test
@@ -66,23 +65,16 @@
setLabel("");
setLabel(null);
setLabel(getLabel());
- ((ButtonPeer) getPeer()).setLabel("");
- ((ButtonPeer) getPeer()).setLabel(null);
- ((ButtonPeer) getPeer()).setLabel(getLabel());
setFont(null);
setFont(getFont());
- getPeer().setFont(getFont());
setBackground(null);
setBackground(getBackground());
- getPeer().setBackground(getBackground());
setForeground(null);
setForeground(getForeground());
- getPeer().setForeground(getForeground());
setEnabled(isEnabled());
- getPeer().setEnabled(isEnabled());
}
}
--- a/jdk/test/java/awt/Paint/CheckboxRepaint.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/java/awt/Paint/CheckboxRepaint.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,6 @@
*/
import java.awt.*;
-import java.awt.peer.CheckboxPeer;
/**
* @test
@@ -63,31 +62,21 @@
void test() {
setState(getState());
- ((CheckboxPeer) getPeer()).setState(getState());
-
setCheckboxGroup(getCheckboxGroup());
- ((CheckboxPeer) getPeer()).setCheckboxGroup(getCheckboxGroup());
setLabel("");
setLabel(null);
setLabel(getLabel());
- ((CheckboxPeer) getPeer()).setLabel("");
- ((CheckboxPeer) getPeer()).setLabel(null);
- ((CheckboxPeer) getPeer()).setLabel(getLabel());
setFont(null);
setFont(getFont());
- getPeer().setFont(getFont());
setBackground(null);
setBackground(getBackground());
- getPeer().setBackground(getBackground());
setForeground(null);
setForeground(getForeground());
- getPeer().setForeground(getForeground());
setEnabled(isEnabled());
- getPeer().setEnabled(isEnabled());
}
}
--- a/jdk/test/java/awt/Paint/LabelRepaint.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/java/awt/Paint/LabelRepaint.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Label;
-import java.awt.peer.LabelPeer;
/**
* @test
@@ -66,28 +65,20 @@
void test() {
setAlignment(getAlignment());
- ((LabelPeer) getPeer()).setAlignment(getAlignment());
setText("");
setText(null);
setText(getText());
- ((LabelPeer) getPeer()).setText("");
- ((LabelPeer) getPeer()).setText(null);
- ((LabelPeer) getPeer()).setText(getText());
setFont(null);
setFont(getFont());
- getPeer().setFont(getFont());
setBackground(null);
setBackground(getBackground());
- getPeer().setBackground(getBackground());
setForeground(null);
setForeground(getForeground());
- getPeer().setForeground(getForeground());
setEnabled(isEnabled());
- getPeer().setEnabled(isEnabled());
}
}
--- a/jdk/test/java/awt/Paint/ListRepaint.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/java/awt/Paint/ListRepaint.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.List;
-import java.awt.peer.ListPeer;
/**
* @test
@@ -71,21 +70,16 @@
void test() {
select(0);
- ((ListPeer) getPeer()).select(getSelectedIndex());
setFont(null);
setFont(getFont());
- getPeer().setFont(getFont());
setBackground(null);
setBackground(getBackground());
- getPeer().setBackground(getBackground());
setForeground(null);
setForeground(getForeground());
- getPeer().setForeground(getForeground());
setEnabled(isEnabled());
- getPeer().setEnabled(isEnabled());
}
}
--- a/jdk/test/java/awt/TextArea/TextAreaCaretVisibilityTest/bug7129742.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/java/awt/TextArea/TextAreaCaretVisibilityTest/bug7129742.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,9 @@
import javax.swing.SwingUtilities;
import javax.swing.text.DefaultCaret;
+import sun.awt.AWTAccessor;
+import sun.awt.AWTAccessor.ComponentAccessor;
+
public class bug7129742 {
@@ -64,7 +67,8 @@
frame.setVisible(true);
try {
- Class XTextAreaPeerClzz = textArea.getPeer().getClass();
+ ComponentAccessor acc = AWTAccessor.getComponentAccessor();
+ Class XTextAreaPeerClzz = acc.getPeer(textArea).getClass();
System.out.println(XTextAreaPeerClzz.getName());
if (!XTextAreaPeerClzz.getName().equals("sun.awt.X11.XTextAreaPeer")) {
fastreturn = true;
@@ -73,7 +77,7 @@
Field jtextField = XTextAreaPeerClzz.getDeclaredField("jtext");
jtextField.setAccessible(true);
- JTextArea jtext = (JTextArea)jtextField.get(textArea.getPeer());
+ JTextArea jtext = (JTextArea)jtextField.get(acc.getPeer(textArea));
caret = (DefaultCaret) jtext.getCaret();
textArea.requestFocusInWindow();
--- a/jdk/test/java/awt/regtesthelpers/UtilInternal.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/java/awt/regtesthelpers/UtilInternal.java Fri Apr 17 16:54:13 2015 +0300
@@ -31,6 +31,7 @@
import java.awt.Toolkit;
import java.awt.Frame;
+import sun.awt.AWTAccessor;
/**
@@ -45,7 +46,8 @@
InstantiationException, InvocationTargetException
{
Toolkit tk = Toolkit.getDefaultToolkit();
- FramePeer frame_peer = (FramePeer) embedder.getPeer();
+ FramePeer frame_peer = AWTAccessor.getComponentAccessor()
+ .getPeer(embedder);
System.out.println("frame's peer = " + frame_peer);
if ("sun.awt.windows.WToolkit".equals(tk.getClass().getName())) {
Class comp_peer_class =
--- a/jdk/test/javax/swing/Headless/HeadlessBox.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessBox.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -142,7 +142,6 @@
b.setName("goober");
b.getName();
b.getParent();
- b.getPeer();
b.getGraphicsConfiguration();
b.getTreeLock();
b.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessBox_Filler.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessBox_Filler.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -113,7 +113,6 @@
bf.setName("goober");
bf.getName();
bf.getParent();
- bf.getPeer();
bf.getGraphicsConfiguration();
bf.getTreeLock();
bf.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessCellRendererPane.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessCellRendererPane.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -91,7 +91,6 @@
crp.setName("goober");
crp.getName();
crp.getParent();
- crp.getPeer();
crp.getGraphicsConfiguration();
crp.getTreeLock();
crp.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessDefaultListCellRenderer.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessDefaultListCellRenderer.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,6 @@
dcr.setName("goober");
dcr.getName();
dcr.getParent();
- dcr.getPeer();
dcr.getGraphicsConfiguration();
dcr.getTreeLock();
dcr.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessDefaultListCellRenderer_UIResource.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessDefaultListCellRenderer_UIResource.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,6 @@
dcr.setName("goober");
dcr.getName();
dcr.getParent();
- dcr.getPeer();
dcr.getGraphicsConfiguration();
dcr.getTreeLock();
dcr.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJButton.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJButton.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -113,7 +113,6 @@
b.setName("goober");
b.getName();
b.getParent();
- b.getPeer();
b.getGraphicsConfiguration();
b.getTreeLock();
b.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJCheckBox.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJCheckBox.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,6 @@
ch.setName("goober");
ch.getName();
ch.getParent();
- ch.getPeer();
ch.getGraphicsConfiguration();
ch.getTreeLock();
ch.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJCheckBoxMenuItem.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJCheckBoxMenuItem.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -113,7 +113,6 @@
ch.setName("goober");
ch.getName();
ch.getParent();
- ch.getPeer();
ch.getGraphicsConfiguration();
ch.getTreeLock();
ch.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJColorChooser.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJColorChooser.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -113,7 +113,6 @@
cc.setName("goober");
cc.getName();
cc.getParent();
- cc.getPeer();
cc.getGraphicsConfiguration();
cc.getTreeLock();
cc.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJComboBox.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJComboBox.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -113,7 +113,6 @@
ch.setName("goober");
ch.getName();
ch.getParent();
- ch.getPeer();
ch.getGraphicsConfiguration();
ch.getTreeLock();
ch.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJComponent.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJComponent.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
ch.setName("goober");
ch.getName();
ch.getParent();
- ch.getPeer();
ch.getGraphicsConfiguration();
ch.getTreeLock();
ch.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJDesktopPane.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJDesktopPane.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
ch.setName("goober");
ch.getName();
ch.getParent();
- ch.getPeer();
ch.getGraphicsConfiguration();
ch.getTreeLock();
ch.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJEditorPane.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJEditorPane.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -115,7 +115,6 @@
b.setName("goober");
b.getName();
b.getParent();
- b.getPeer();
b.getGraphicsConfiguration();
b.getTreeLock();
b.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJFileChooser.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJFileChooser.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
ch.setName("goober");
ch.getName();
ch.getParent();
- ch.getPeer();
ch.getGraphicsConfiguration();
ch.getTreeLock();
ch.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJInternalFrame.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJInternalFrame.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -135,7 +135,6 @@
intf.setName("goober");
intf.getName();
intf.getParent();
- intf.getPeer();
intf.getGraphicsConfiguration();
intf.getTreeLock();
intf.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJInternalFrame_JDesktopIcon.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJInternalFrame_JDesktopIcon.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
jdi.setName("goober");
jdi.getName();
jdi.getParent();
- jdi.getPeer();
jdi.getGraphicsConfiguration();
jdi.getTreeLock();
jdi.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJLabel.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJLabel.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
l.setName("goober");
l.getName();
l.getParent();
- l.getPeer();
l.getGraphicsConfiguration();
l.getTreeLock();
l.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJLayeredPane.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJLayeredPane.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
lp.setName("goober");
lp.getName();
lp.getParent();
- lp.getPeer();
lp.getGraphicsConfiguration();
lp.getTreeLock();
lp.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJList.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJList.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
l.setName("goober");
l.getName();
l.getParent();
- l.getPeer();
l.getGraphicsConfiguration();
l.getTreeLock();
l.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJMenu.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJMenu.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -110,7 +110,6 @@
m.setName("goober");
m.getName();
m.getParent();
- m.getPeer();
m.getGraphicsConfiguration();
m.getTreeLock();
m.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJMenuBar.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJMenuBar.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
mb.setName("goober");
mb.getName();
mb.getParent();
- mb.getPeer();
mb.getGraphicsConfiguration();
mb.getTreeLock();
mb.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJMenuItem.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJMenuItem.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
mi.setName("goober");
mi.getName();
mi.getParent();
- mi.getPeer();
mi.getGraphicsConfiguration();
mi.getTreeLock();
mi.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJOptionPane.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJOptionPane.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
op.setName("goober");
op.getName();
op.getParent();
- op.getPeer();
op.getGraphicsConfiguration();
op.getTreeLock();
op.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJPanel.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJPanel.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
p.setName("goober");
p.getName();
p.getParent();
- p.getPeer();
p.getGraphicsConfiguration();
p.getTreeLock();
p.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJPopupMenu.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJPopupMenu.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -110,7 +110,6 @@
m.setName("goober");
m.getName();
m.getParent();
- m.getPeer();
m.getGraphicsConfiguration();
m.getTreeLock();
m.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJPopupMenu_Separator.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJPopupMenu_Separator.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
s.setName("goober");
s.getName();
s.getParent();
- s.getPeer();
s.getGraphicsConfiguration();
s.getTreeLock();
s.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJProgressBar.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJProgressBar.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
pb.setName("goober");
pb.getName();
pb.getParent();
- pb.getPeer();
pb.getGraphicsConfiguration();
pb.getTreeLock();
pb.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJRadioButton.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJRadioButton.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
rb.setName("goober");
rb.getName();
rb.getParent();
- rb.getPeer();
rb.getGraphicsConfiguration();
rb.getTreeLock();
rb.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJRadioButtonMenuItem.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJRadioButtonMenuItem.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
i.setName("goober");
i.getName();
i.getParent();
- i.getPeer();
i.getGraphicsConfiguration();
i.getTreeLock();
i.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJRootPane.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJRootPane.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
rp.setName("goober");
rp.getName();
rp.getParent();
- rp.getPeer();
rp.getGraphicsConfiguration();
rp.getTreeLock();
rp.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJScrollBar.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJScrollBar.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
sb.setName("goober");
sb.getName();
sb.getParent();
- sb.getPeer();
sb.getGraphicsConfiguration();
sb.getTreeLock();
sb.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJScrollPane.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJScrollPane.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
sp.setName("goober");
sp.getName();
sp.getParent();
- sp.getPeer();
sp.getGraphicsConfiguration();
sp.getTreeLock();
sp.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJSeparator.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJSeparator.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
sp.setName("goober");
sp.getName();
sp.getParent();
- sp.getPeer();
sp.getGraphicsConfiguration();
sp.getTreeLock();
sp.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJSlider.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJSlider.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
s.setName("goober");
s.getName();
s.getParent();
- s.getPeer();
s.getGraphicsConfiguration();
s.getTreeLock();
s.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJSpinner.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJSpinner.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
s.setName("goober");
s.getName();
s.getParent();
- s.getPeer();
s.getGraphicsConfiguration();
s.getTreeLock();
s.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJSplitPane.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJSplitPane.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -106,7 +106,6 @@
s.setName("goober");
s.getName();
s.getParent();
- s.getPeer();
s.getGraphicsConfiguration();
s.getTreeLock();
s.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJTabbedPane.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJTabbedPane.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
s.setName("goober");
s.getName();
s.getParent();
- s.getPeer();
s.getGraphicsConfiguration();
s.getTreeLock();
s.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJTable.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJTable.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -135,7 +135,6 @@
t.setName("goober");
t.getName();
t.getParent();
- t.getPeer();
t.getGraphicsConfiguration();
t.getTreeLock();
t.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJTextArea.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJTextArea.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,6 @@
t.setName("goober");
t.getName();
t.getParent();
- t.getPeer();
t.getGraphicsConfiguration();
t.getTreeLock();
t.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJTextField.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJTextField.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,6 @@
t.setName("goober");
t.getName();
t.getParent();
- t.getPeer();
t.getGraphicsConfiguration();
t.getTreeLock();
t.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJToggleButton.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJToggleButton.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
tb.setName("goober");
tb.getName();
tb.getParent();
- tb.getPeer();
tb.getGraphicsConfiguration();
tb.getTreeLock();
tb.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJToolBar.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJToolBar.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
tb.setName("goober");
tb.getName();
tb.getParent();
- tb.getPeer();
tb.getGraphicsConfiguration();
tb.getTreeLock();
tb.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJToolBar_Separator.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJToolBar_Separator.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
s.setName("goober");
s.getName();
s.getParent();
- s.getPeer();
s.getGraphicsConfiguration();
s.getTreeLock();
s.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJToolTip.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJToolTip.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@
tt.setName("goober");
tt.getName();
tt.getParent();
- tt.getPeer();
tt.getGraphicsConfiguration();
tt.getTreeLock();
tt.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJTree.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJTree.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -153,7 +153,6 @@
t.setName("goober");
t.getName();
t.getParent();
- t.getPeer();
t.getGraphicsConfiguration();
t.getTreeLock();
t.getToolkit();
--- a/jdk/test/javax/swing/Headless/HeadlessJViewport.java Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/test/javax/swing/Headless/HeadlessJViewport.java Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -120,7 +120,6 @@
v.setName("goober");
v.getName();
v.getParent();
- v.getPeer();
v.getGraphicsConfiguration();
v.getTreeLock();
v.getToolkit();