8168316: Suppress deprecation warnings for Applet classes in java.desktop
Reviewed-by: serb, psadhukhan
This commit is contained in:
parent
9ecae6db48
commit
6dc331a5e3
@ -431,6 +431,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void mouseReleased(final MouseEvent e) {
|
||||
if (didForwardEvent(e)) return;
|
||||
|
||||
|
@ -88,6 +88,7 @@ public class SwingUtilities3 {
|
||||
* or {@code Applet}
|
||||
* @param isRequested the value to set vsyncRequested state to
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void setVsyncRequested(Container rootContainer,
|
||||
boolean isRequested) {
|
||||
assert (rootContainer instanceof Applet) || (rootContainer instanceof Window);
|
||||
@ -104,6 +105,7 @@ public class SwingUtilities3 {
|
||||
* @param rootContainer topmost container. Should be either Window or Applet
|
||||
* @return {@code true} if vsync painting is requested for {@code rootContainer}
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isVsyncRequested(Container rootContainer) {
|
||||
assert (rootContainer instanceof Applet) || (rootContainer instanceof Window);
|
||||
return Boolean.TRUE == vsyncedMap.get(rootContainer);
|
||||
|
@ -55,6 +55,7 @@ import javax.sound.sampled.UnsupportedAudioFileException;
|
||||
* @author Arthur van Hoff, Kara Kytle, Jan Borgersen
|
||||
* @author Florian Bomers
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, LineListener {
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
|
@ -4016,6 +4016,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
* {@code true}.
|
||||
* @see #createBuffers(int, BufferCapabilities)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected FlipBufferStrategy(int numBuffers, BufferCapabilities caps)
|
||||
throws AWTException
|
||||
{
|
||||
@ -8133,6 +8134,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
return res;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
final Component getNextFocusCandidate() {
|
||||
Container rootAncestor = getTraversalRoot();
|
||||
Component comp = this;
|
||||
|
@ -44,6 +44,7 @@ import java.beans.beancontext.BeanContext;
|
||||
*/
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public interface AppletInitializer {
|
||||
|
||||
/**
|
||||
|
@ -154,7 +154,7 @@ public class Beans {
|
||||
* @exception IOException if an I/O error occurs.
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer)
|
||||
throws IOException, ClassNotFoundException {
|
||||
|
||||
@ -501,7 +501,7 @@ class ObjectInputStreamWithLoader extends ObjectInputStream
|
||||
* Package private support class. This provides a default AppletContext
|
||||
* for beans which are applets.
|
||||
*/
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
class BeansAppletContext implements AppletContext {
|
||||
Applet target;
|
||||
Hashtable<URL,Object> imageCache = new Hashtable<>();
|
||||
@ -586,6 +586,7 @@ class BeansAppletContext implements AppletContext {
|
||||
* Package private support class. This provides an AppletStub
|
||||
* for beans which are applets.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
class BeansAppletStub implements AppletStub {
|
||||
transient boolean active;
|
||||
transient Applet target;
|
||||
|
@ -555,6 +555,7 @@ public abstract class JComponent extends Container implements Serializable,
|
||||
* @see #setComponentPopupMenu
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public JPopupMenu getComponentPopupMenu() {
|
||||
|
||||
if(!getInheritsPopupMenu()) {
|
||||
@ -2913,6 +2914,7 @@ public abstract class JComponent extends Container implements Serializable,
|
||||
* @param pressed true if the key is pressed
|
||||
* @return true if there is a key binding for <code>e</code>
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
boolean processKeyBindings(KeyEvent e, boolean pressed) {
|
||||
if (!SwingUtilities.isValidKeyEventForKeyBindings(e)) {
|
||||
return false;
|
||||
@ -4457,6 +4459,7 @@ public abstract class JComponent extends Container implements Serializable,
|
||||
* return value for this method
|
||||
* @see #getVisibleRect
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
static final void computeVisibleRect(Component c, Rectangle visibleRect) {
|
||||
Container p = c.getParent();
|
||||
Rectangle bounds = c.getBounds();
|
||||
@ -4625,6 +4628,7 @@ public abstract class JComponent extends Container implements Serializable,
|
||||
* or <code>null</code> if not in any container
|
||||
*/
|
||||
@BeanProperty(bound = false)
|
||||
@SuppressWarnings("deprecation")
|
||||
public Container getTopLevelAncestor() {
|
||||
for(Container p = this; p != null; p = p.getParent()) {
|
||||
if(p instanceof Window || p instanceof Applet) {
|
||||
@ -5032,6 +5036,7 @@ public abstract class JComponent extends Container implements Serializable,
|
||||
this.paintingChild = paintingChild;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
void _paintImmediately(int x, int y, int w, int h) {
|
||||
Graphics g;
|
||||
Container c;
|
||||
|
@ -6043,6 +6043,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
this.focusManager = fm;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void propertyChange(PropertyChangeEvent ev) {
|
||||
if (!isEditing() || getClientProperty("terminateEditOnFocusLost") != Boolean.TRUE) {
|
||||
return;
|
||||
|
@ -137,6 +137,7 @@ class KeyboardManager {
|
||||
/**
|
||||
* Find the top focusable Window, Applet, or InternalFrame
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private static Container getTopAncestor(JComponent c) {
|
||||
for(Container p = c.getParent(); p != null; p = p.getParent()) {
|
||||
if (p instanceof Window && ((Window)p).isFocusableWindow() ||
|
||||
|
@ -614,6 +614,7 @@ public class PopupFactory {
|
||||
* Returns true if popup can fit the screen and the owner's top parent.
|
||||
* It determines can popup be lightweight or mediumweight.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
boolean fitsOnScreen() {
|
||||
boolean result = false;
|
||||
Component component = getComponent();
|
||||
@ -783,6 +784,8 @@ public class PopupFactory {
|
||||
component.removeAll();
|
||||
recycleLightWeightPopup(this);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void show() {
|
||||
Container parent = null;
|
||||
|
||||
@ -938,6 +941,8 @@ public class PopupFactory {
|
||||
rootPane.getContentPane().removeAll();
|
||||
recycleMediumWeightPopup(this);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void show() {
|
||||
Component component = getComponent();
|
||||
Container parent = null;
|
||||
|
@ -408,6 +408,7 @@ public class RepaintManager
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
@ -521,10 +522,12 @@ public class RepaintManager
|
||||
* @see JApplet#repaint
|
||||
* @since 1.6
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void addDirtyRegion(Applet applet, int x, int y, int w, int h) {
|
||||
addDirtyRegion0(applet, x, y, w, h);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
void scheduleHeavyWeightPaints() {
|
||||
Map<Container,Rectangle> hws;
|
||||
|
||||
|
@ -416,6 +416,7 @@ public class SwingUtilities implements SwingConstants
|
||||
* @param p a Point object (converted to the new coordinate system)
|
||||
* @param c a Component object
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void convertPointToScreen(Point p,Component c) {
|
||||
Rectangle b;
|
||||
int x,y;
|
||||
@ -455,6 +456,7 @@ public class SwingUtilities implements SwingConstants
|
||||
* @param p a Point object (converted to the new coordinate system)
|
||||
* @param c a Component object
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void convertPointFromScreen(Point p,Component c) {
|
||||
Rectangle b;
|
||||
int x,y;
|
||||
@ -1655,6 +1657,7 @@ public class SwingUtilities implements SwingConstants
|
||||
* @param c the component
|
||||
* @return the first ancestor of c that's a Window or the last Applet ancestor
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Component getRoot(Component c) {
|
||||
Component applet = null;
|
||||
for(Component p = c; p != null; p = p.getParent()) {
|
||||
@ -1695,6 +1698,7 @@ public class SwingUtilities implements SwingConstants
|
||||
* @return true if a binding has found and processed
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean processKeyBindings(KeyEvent event) {
|
||||
if (event != null) {
|
||||
if (event.isConsumed()) {
|
||||
@ -2209,6 +2213,7 @@ public class SwingUtilities implements SwingConstants
|
||||
* @see java.awt.Component#isVisible()
|
||||
* @since 1.7
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
static Container getValidateRoot(Container c, boolean visibleOnly) {
|
||||
Container root = null;
|
||||
|
||||
|
@ -753,6 +753,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
|
||||
// Returns: 0 no adjust
|
||||
// -1 can't fit
|
||||
// >0 adjust value by amount returned
|
||||
@SuppressWarnings("deprecation")
|
||||
private int getPopupFitWidth(Rectangle popupRectInScreen, Component invoker){
|
||||
if (invoker != null){
|
||||
Container parent;
|
||||
@ -778,6 +779,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
|
||||
|
||||
// Returns: 0 no adjust
|
||||
// >0 adjust by value return
|
||||
@SuppressWarnings("deprecation")
|
||||
private int getPopupFitHeight(Rectangle popupRectInScreen, Component invoker){
|
||||
if (invoker != null){
|
||||
Container parent;
|
||||
|
@ -926,6 +926,7 @@ public class BasicPopupMenuUI extends PopupMenuUI {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
boolean isInPopup(Component src) {
|
||||
for (Component c=src; c!=null; c=c.getParent()) {
|
||||
if (c instanceof Applet || c instanceof Window) {
|
||||
@ -1143,6 +1144,7 @@ public class BasicPopupMenuUI extends PopupMenuUI {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void stateChanged(ChangeEvent ev) {
|
||||
if (!(UIManager.getLookAndFeel() instanceof BasicLookAndFeel)) {
|
||||
uninstall();
|
||||
|
@ -41,6 +41,7 @@ import com.sun.media.sound.JavaSoundAudioClip;
|
||||
* @author Arthur van Hoff, Kara Kytle
|
||||
*/
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class AppletAudioClip implements AudioClip {
|
||||
|
||||
// url that this AudioClip is based on
|
||||
|
@ -54,7 +54,7 @@ import sun.security.util.SecurityConstants;
|
||||
*
|
||||
* @author Arthur van Hoff
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK implementation class
|
||||
@SuppressWarnings({"serial", "deprecation"}) // JDK implementation class
|
||||
public
|
||||
abstract class AppletPanel extends Panel implements AppletStub, Runnable {
|
||||
|
||||
|
@ -117,7 +117,7 @@ final class StdAppletViewerFactory implements AppletViewerFactory {
|
||||
* (The document named appletviewertags.html in the JDK's docs/tooldocs directory,
|
||||
* once the JDK docs have been installed.)
|
||||
*/
|
||||
@SuppressWarnings("serial") // JDK implementation class
|
||||
@SuppressWarnings({"serial", "deprecation"}) // JDK-implementation class
|
||||
public class AppletViewer extends Frame implements AppletContext, Printable {
|
||||
|
||||
/**
|
||||
@ -157,7 +157,6 @@ public class AppletViewer extends Frame implements AppletContext, Printable {
|
||||
/**
|
||||
* Create the applet viewer.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public AppletViewer(int x, int y, URL doc, Hashtable<String, String> atts,
|
||||
PrintStream statusMsgStream, AppletViewerFactory factory) {
|
||||
this.factory = factory;
|
||||
|
@ -197,6 +197,7 @@ class AppletViewerPanel extends AppletPanel {
|
||||
* Get the applet context. For now this is
|
||||
* also implemented by the AppletPanel class.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public AppletContext getAppletContext() {
|
||||
return (AppletContext)getParent();
|
||||
}
|
||||
|
@ -499,6 +499,7 @@ public abstract class EmbeddedFrame extends Frame
|
||||
* @return the parent applet or {@ null}
|
||||
* @since 1.6
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Applet getAppletIfAncestorOf(Component comp) {
|
||||
Container parent = comp.getParent();
|
||||
Applet applet = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user