mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-15 08:03:50 +00:00
8066621: Suppress deprecation warnings in java.desktop module
Reviewed-by: prr, alanb, ptbrunet
This commit is contained in:
parent
d517ee7ec8
commit
6e57ed8a2c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2014, 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,7 @@ import java.beans.*;
|
||||
public class ColorEditor extends Panel implements PropertyEditor {
|
||||
private static final long serialVersionUID = 1781257185164716054L;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public ColorEditor() {
|
||||
setLayout(null);
|
||||
|
||||
@ -69,10 +70,12 @@ public class ColorEditor extends Panel implements PropertyEditor {
|
||||
changeColor(c);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Dimension preferredSize() {
|
||||
return new Dimension(ourWidth, 40);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean keyUp(Event e, int key) {
|
||||
if (e.target == text) {
|
||||
try {
|
||||
@ -107,6 +110,7 @@ public class ColorEditor extends Panel implements PropertyEditor {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean action(Event e, Object arg) {
|
||||
if (e.target == choser) {
|
||||
changeColor(colors[choser.getSelectedIndex()]);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2014, 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,7 @@ import java.beans.*;
|
||||
public class FontEditor extends Panel implements java.beans.PropertyEditor {
|
||||
private static final long serialVersionUID = 6732704486002715933L;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public FontEditor() {
|
||||
setLayout(null);
|
||||
|
||||
@ -62,6 +63,7 @@ public class FontEditor extends Panel implements java.beans.PropertyEditor {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Dimension preferredSize() {
|
||||
return new Dimension(300, 40);
|
||||
}
|
||||
@ -93,6 +95,7 @@ public class FontEditor extends Panel implements java.beans.PropertyEditor {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void changeFont(Font f) {
|
||||
font = f;
|
||||
if (sample != null) {
|
||||
@ -124,6 +127,7 @@ public class FontEditor extends Panel implements java.beans.PropertyEditor {
|
||||
font.getStyle() + ", " + font.getSize() + ")";
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean action(Event e, Object arg) {
|
||||
String family = familyChoser.getSelectedItem();
|
||||
int style = styles[styleChoser.getSelectedIndex()];
|
||||
|
||||
@ -143,6 +143,7 @@ class GTKFileChooserUI extends SynthFileChooserUI {
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public String getFileName() {
|
||||
JFileChooser fc = getFileChooser();
|
||||
String typedInName = fileNameTextField != null ?
|
||||
@ -419,6 +420,7 @@ class GTKFileChooserUI extends SynthFileChooserUI {
|
||||
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected class SelectionListener implements ListSelectionListener {
|
||||
public void valueChanged(ListSelectionEvent e) {
|
||||
if (!e.getValueIsAdjusting()) {
|
||||
|
||||
@ -245,6 +245,7 @@ public class MotifDesktopIconUI extends BasicDesktopIconUI
|
||||
e.isPopupTrigger(), MouseEvent.NOBUTTON));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
}
|
||||
@ -336,6 +337,7 @@ public class MotifDesktopIconUI extends BasicDesktopIconUI
|
||||
e.getClickCount(), e.isPopupTrigger(), MouseEvent.NOBUTTON ));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -242,6 +242,7 @@ public class MotifInternalFrameTitlePane
|
||||
setBorderPainted(false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, 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
|
||||
@ -60,6 +60,7 @@ public class WindowsDesktopPaneUI extends BasicDesktopPaneUI
|
||||
super.installDefaults();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void installKeyboardActions() {
|
||||
super.installKeyboardActions();
|
||||
|
||||
|
||||
@ -2487,6 +2487,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
/**
|
||||
* Calculates the dialog unit mapping.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void calculateBaseUnits() {
|
||||
// This calculation comes from:
|
||||
// http://support.microsoft.com/default.aspx?scid=kb;EN-US;125681
|
||||
|
||||
@ -78,6 +78,7 @@ class WindowsPopupWindow extends JWindow {
|
||||
paint(g);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void hide() {
|
||||
super.hide();
|
||||
/** We need to call removeNotify() here because hide() does
|
||||
@ -89,6 +90,7 @@ class WindowsPopupWindow extends JWindow {
|
||||
removeNotify();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void show() {
|
||||
super.show();
|
||||
this.pack();
|
||||
|
||||
@ -700,6 +700,7 @@ class XPStyle {
|
||||
setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, 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,6 +70,7 @@ public class Canvas extends Component implements Accessible {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
void setGraphicsConfiguration(GraphicsConfiguration gc) {
|
||||
synchronized(getTreeLock()) {
|
||||
CanvasPeer peer = (CanvasPeer)getPeer();
|
||||
|
||||
@ -805,6 +805,7 @@ public class Container extends Component {
|
||||
* to new heavyweight parent.
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void reparentTraverse(ContainerPeer parentPeer, Container child) {
|
||||
checkTreeLock();
|
||||
|
||||
@ -828,6 +829,7 @@ public class Container extends Component {
|
||||
* Container must be heavyweight.
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void reparentChild(Component comp) {
|
||||
checkTreeLock();
|
||||
if (comp == null) {
|
||||
@ -4189,6 +4191,7 @@ public class Container extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void recursiveShowHeavyweightChildren() {
|
||||
if (!hasHeavyweightDescendants() || !isVisible()) {
|
||||
return;
|
||||
@ -4210,6 +4213,7 @@ public class Container extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void recursiveHideHeavyweightChildren() {
|
||||
if (!hasHeavyweightDescendants()) {
|
||||
return;
|
||||
@ -4231,6 +4235,7 @@ public class Container extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void recursiveRelocateHeavyweightChildren(Point origin) {
|
||||
for (int index = 0; index < getComponentCount(); index++) {
|
||||
Component comp = getComponent(index);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, 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,6 +93,7 @@ public class DefaultFocusTraversalPolicy
|
||||
* @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()))
|
||||
|
||||
@ -796,6 +796,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
|
||||
* @return <code>true</code>
|
||||
* @see Component#dispatchEvent
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean dispatchKeyEvent(KeyEvent e) {
|
||||
Component focusOwner = (((AWTEvent)e).isPosted) ? getFocusOwner() : e.getComponent();
|
||||
|
||||
@ -1021,6 +1022,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private boolean preDispatchKeyEvent(KeyEvent ke) {
|
||||
if (((AWTEvent) ke).isPosted) {
|
||||
Component focusOwner = getFocusOwner();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, 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
|
||||
@ -749,6 +749,7 @@ public class Dialog extends Window {
|
||||
* @see Component#isDisplayable
|
||||
* @see #removeNotify
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void addNotify() {
|
||||
synchronized (getTreeLock()) {
|
||||
if (parent != null && parent.getPeer() == null) {
|
||||
@ -897,6 +898,7 @@ public class Dialog extends Window {
|
||||
/**
|
||||
* @return true if we actually showed, false if we just called toFront()
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private boolean conditionalShow(Component toFocus, AtomicLong time) {
|
||||
boolean retval;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, 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,6 +314,7 @@ public class FileDialog extends Dialog {
|
||||
* 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) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, 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,6 +409,7 @@ public abstract class FontMetrics implements java.io.Serializable {
|
||||
* @see #charsWidth(char[], int, int)
|
||||
* @see #stringWidth(String)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public int bytesWidth(byte data[], int off, int len) {
|
||||
return stringWidth(new String(data, 0, off, len));
|
||||
}
|
||||
|
||||
@ -843,6 +843,7 @@ public abstract class Graphics {
|
||||
* @see java.awt.Graphics#drawChars
|
||||
* @see java.awt.Graphics#drawString
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void drawBytes(byte data[], int offset, int length, int x, int y) {
|
||||
drawString(new String(data, 0, offset, length), x, y);
|
||||
}
|
||||
|
||||
@ -3054,6 +3054,7 @@ public abstract class KeyboardFocusManager
|
||||
return (wto != wfrom);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
static Component getHeavyweight(Component comp) {
|
||||
if (comp == null || comp.getPeer() == null) {
|
||||
return null;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2014, 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,6 +153,7 @@ public class PopupMenu extends Menu {
|
||||
* 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;
|
||||
|
||||
@ -732,6 +732,7 @@ public class ScrollPane extends Container implements Accessible {
|
||||
/**
|
||||
* Invoked when the value of the adjustable has changed.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void adjustmentValueChanged(AdjustmentEvent e) {
|
||||
Adjustable adj = e.getAdjustable();
|
||||
int value = e.getValue();
|
||||
@ -831,6 +832,7 @@ class PeerFixer implements AdjustmentListener, java.io.Serializable {
|
||||
/**
|
||||
* Invoked when the value of the adjustable has changed.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void adjustmentValueChanged(AdjustmentEvent e) {
|
||||
Adjustable adj = e.getAdjustable();
|
||||
int value = e.getValue();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2014, 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
|
||||
@ -203,6 +203,7 @@ public final class SplashScreen {
|
||||
* @return URL for the current splash screen image file
|
||||
* @throws IllegalStateException if the splash screen has already been closed
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public URL getImageURL() throws IllegalStateException {
|
||||
synchronized (SplashScreen.class) {
|
||||
checkVisible();
|
||||
|
||||
@ -755,6 +755,7 @@ public class Window extends Container implements Accessible {
|
||||
* @see Container#removeNotify
|
||||
* @since 1.0
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void addNotify() {
|
||||
synchronized (getTreeLock()) {
|
||||
Container parent = this.parent;
|
||||
@ -798,6 +799,7 @@ public class Window extends Container implements Accessible {
|
||||
* @see Component#isDisplayable
|
||||
* @see #setMinimumSize
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void pack() {
|
||||
Container parent = this.parent;
|
||||
if (parent != null && parent.getPeer() == null) {
|
||||
@ -1070,6 +1072,7 @@ public class Window extends Container implements Accessible {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
static void updateChildFocusableWindowState(Window w) {
|
||||
if (w.getPeer() != null && w.isShowing()) {
|
||||
((WindowPeer)w.getPeer()).updateFocusableWindowState();
|
||||
@ -1157,6 +1160,7 @@ public class Window extends Container implements Accessible {
|
||||
* 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) {
|
||||
@ -3623,6 +3627,7 @@ public class Window extends Container implements Accessible {
|
||||
*
|
||||
* @since 1.7
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setOpacity(float opacity) {
|
||||
synchronized (getTreeLock()) {
|
||||
if (opacity < 0.0f || opacity > 1.0f) {
|
||||
@ -3721,6 +3726,7 @@ public class Window extends Container implements Accessible {
|
||||
*
|
||||
* @since 1.7
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setShape(Shape shape) {
|
||||
synchronized (getTreeLock()) {
|
||||
if (shape != null) {
|
||||
@ -3838,6 +3844,7 @@ public class Window extends Container implements Accessible {
|
||||
* @see GraphicsConfiguration#isTranslucencyCapable()
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setBackground(Color bgColor) {
|
||||
Color oldBg = getBackground();
|
||||
super.setBackground(bgColor);
|
||||
@ -3890,6 +3897,7 @@ public class Window extends Container implements Accessible {
|
||||
return bg != null ? bg.getAlpha() == 255 : true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void updateWindow() {
|
||||
synchronized (getTreeLock()) {
|
||||
WindowPeer peer = (WindowPeer)getPeer();
|
||||
@ -4080,6 +4088,7 @@ public class Window extends Container implements Accessible {
|
||||
window.securityWarningHeight = height;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setSecurityWarningPosition(Window window,
|
||||
Point2D point, float alignmentX, float alignmentY)
|
||||
{
|
||||
|
||||
@ -47,6 +47,7 @@ public class StringSelection implements Transferable, ClipboardOwner {
|
||||
private static final int STRING = 0;
|
||||
private static final int PLAIN_TEXT = 1;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static final DataFlavor[] flavors = {
|
||||
DataFlavor.stringFlavor,
|
||||
DataFlavor.plainTextFlavor // deprecated
|
||||
|
||||
@ -624,6 +624,7 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
|
||||
return new ArrayList<>(returnValue);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static Set<DataFlavor> convertMimeTypeToDataFlavors(
|
||||
final String baseType) {
|
||||
|
||||
|
||||
@ -499,6 +499,7 @@ public class DropTarget implements DropTargetListener, Serializable {
|
||||
*
|
||||
*/
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void addNotify(ComponentPeer peer) {
|
||||
if (peer == componentPeer) return;
|
||||
|
||||
@ -690,6 +691,7 @@ public class DropTarget implements DropTargetListener, Serializable {
|
||||
* update the geometry of the autoscroll region
|
||||
*/
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void updateRegion() {
|
||||
Insets i = autoScroll.getAutoscrollInsets();
|
||||
Dimension size = component.getSize();
|
||||
|
||||
@ -149,6 +149,7 @@ public class ServiceUI {
|
||||
* or attributes is null, or the initial PrintService is not in the
|
||||
* list of browsable services.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static PrintService printDialog(GraphicsConfiguration gc,
|
||||
int x, int y,
|
||||
PrintService[] services,
|
||||
|
||||
@ -1453,6 +1453,7 @@ public class DebugGraphics extends Graphics {
|
||||
|
||||
/** Returns a DebugGraphics for use in buffering window.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private Graphics debugGraphics() {
|
||||
DebugGraphics debugGraphics;
|
||||
DebugGraphicsInfo info = info();
|
||||
|
||||
@ -243,6 +243,7 @@ public class JApplet extends Applet implements Accessible,
|
||||
* hidden: true
|
||||
* description: The menubar for accessing pulldown menus from this applet.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setJMenuBar(JMenuBar menuBar) {
|
||||
getRootPane().setMenuBar(menuBar);
|
||||
}
|
||||
@ -253,6 +254,7 @@ public class JApplet extends Applet implements Accessible,
|
||||
* @return the menubar set on this applet
|
||||
* @see #setJMenuBar
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public JMenuBar getJMenuBar() {
|
||||
return getRootPane().getMenuBar();
|
||||
}
|
||||
|
||||
@ -133,6 +133,7 @@ public class JColorChooser extends JComponent implements Accessible {
|
||||
* returns true.
|
||||
* @see java.awt.GraphicsEnvironment#isHeadless
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Color showDialog(Component component,
|
||||
String title, Color initialColor) throws HeadlessException {
|
||||
|
||||
@ -654,6 +655,7 @@ class ColorChooserDialog extends JDialog {
|
||||
okButton.getAccessibleContext().setAccessibleDescription(okString);
|
||||
okButton.setActionCommand("OK");
|
||||
okButton.addActionListener(new ActionListener() {
|
||||
@SuppressWarnings("deprecation")
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
hide();
|
||||
}
|
||||
@ -685,6 +687,7 @@ class ColorChooserDialog extends JDialog {
|
||||
|
||||
cancelButton.setActionCommand("cancel");
|
||||
cancelButton.addActionListener(new ActionListener() {
|
||||
@SuppressWarnings("deprecation")
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
hide();
|
||||
}
|
||||
@ -723,6 +726,7 @@ class ColorChooserDialog extends JDialog {
|
||||
this.addWindowListener(new Closer());
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void show() {
|
||||
initialColor = chooserPane.getColor();
|
||||
super.show();
|
||||
@ -734,6 +738,7 @@ class ColorChooserDialog extends JDialog {
|
||||
|
||||
@SuppressWarnings("serial") // JDK-implementation class
|
||||
class Closer extends WindowAdapter implements Serializable{
|
||||
@SuppressWarnings("deprecation")
|
||||
public void windowClosing(WindowEvent e) {
|
||||
cancelButton.doClick(0);
|
||||
Window w = e.getWindow();
|
||||
|
||||
@ -5049,6 +5049,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;
|
||||
|
||||
@ -849,6 +849,7 @@ public class JDialog extends Dialog implements WindowConstants,
|
||||
* hidden: true
|
||||
* description: The menubar for accessing pulldown menus from this dialog.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setJMenuBar(JMenuBar menu) {
|
||||
getRootPane().setMenuBar(menu);
|
||||
}
|
||||
@ -859,6 +860,7 @@ public class JDialog extends Dialog implements WindowConstants,
|
||||
* @return the menubar set on this dialog
|
||||
* @see #setJMenuBar
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public JMenuBar getJMenuBar() {
|
||||
return getRootPane().getMenuBar();
|
||||
}
|
||||
|
||||
@ -757,6 +757,7 @@ public class JFileChooser extends JComponent implements Accessible {
|
||||
* returns true.
|
||||
* @see java.awt.GraphicsEnvironment#isHeadless
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public int showDialog(Component parent, String approveButtonText)
|
||||
throws HeadlessException {
|
||||
if (dialog != null) {
|
||||
|
||||
@ -494,6 +494,7 @@ public class JFrame extends Frame implements WindowConstants,
|
||||
* hidden: true
|
||||
* description: The menubar for accessing pulldown menus from this frame.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setJMenuBar(JMenuBar menubar) {
|
||||
getRootPane().setMenuBar(menubar);
|
||||
}
|
||||
@ -504,6 +505,7 @@ public class JFrame extends Frame implements WindowConstants,
|
||||
*
|
||||
* @see #setJMenuBar
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public JMenuBar getJMenuBar() {
|
||||
return getRootPane().getMenuBar();
|
||||
}
|
||||
|
||||
@ -1494,6 +1494,7 @@ public class JInternalFrame extends JComponent implements
|
||||
* @param width an integer giving the component's new width in pixels
|
||||
* @param height an integer giving the component's new height in pixels
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void reshape(int x, int y, int width, int height) {
|
||||
super.reshape(x, y, width, height);
|
||||
validate();
|
||||
@ -1735,6 +1736,7 @@ public class JInternalFrame extends JComponent implements
|
||||
* @see InternalFrameEvent#INTERNAL_FRAME_OPENED
|
||||
* @see #setVisible
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void show() {
|
||||
// bug 4312922
|
||||
if (isVisible()) {
|
||||
@ -1766,6 +1768,7 @@ public class JInternalFrame extends JComponent implements
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void hide() {
|
||||
if (isIcon()) {
|
||||
getDesktopIcon().setVisible(false);
|
||||
|
||||
@ -3663,6 +3663,7 @@ public class JList<E> extends JComponent implements Scrollable, Accessible
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
AccessibleContext ac = getCurrentAccessibleContext();
|
||||
if (ac instanceof AccessibleComponent) {
|
||||
|
||||
@ -566,6 +566,7 @@ public class JOptionPane extends JComponent implements Accessible
|
||||
* <code>true</code>
|
||||
* @see java.awt.GraphicsEnvironment#isHeadless
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Object showInputDialog(Component parentComponent,
|
||||
Object message, String title, int messageType, Icon icon,
|
||||
Object[] selectionValues, Object initialSelectionValue)
|
||||
@ -855,6 +856,7 @@ public class JOptionPane extends JComponent implements Accessible
|
||||
* <code>true</code>
|
||||
* @see java.awt.GraphicsEnvironment#isHeadless
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static int showOptionDialog(Component parentComponent,
|
||||
Object message, String title, int optionType, int messageType,
|
||||
Icon icon, Object[] options, Object initialValue)
|
||||
|
||||
@ -333,6 +333,7 @@ public class JTabbedPane extends JComponent
|
||||
* @see #addChangeListener
|
||||
* @see EventListenerList
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void fireStateChanged() {
|
||||
/* --- Begin code to deal with visibility --- */
|
||||
|
||||
@ -949,6 +950,7 @@ public class JTabbedPane extends JComponent
|
||||
* @see #addTab
|
||||
* @see #insertTab
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void removeTabAt(int index) {
|
||||
checkIndex(index);
|
||||
|
||||
@ -1557,6 +1559,7 @@ public class JTabbedPane extends JComponent
|
||||
* attribute: visualUpdate true
|
||||
* description: The component at the specified tab index.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setComponentAt(int index, Component component) {
|
||||
Page page = pages.get(index);
|
||||
if (component != page.component) {
|
||||
|
||||
@ -5810,6 +5810,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
* where 0 is the first column
|
||||
* @return the <code>Component</code> being edited
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public Component prepareEditor(TableCellEditor editor, int row, int column) {
|
||||
Object value = getValueAt(row, column);
|
||||
boolean isSelected = isCellSelected(row, column);
|
||||
@ -8788,6 +8789,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
AccessibleContext ac = getCurrentAccessibleContext();
|
||||
if (ac instanceof AccessibleComponent) {
|
||||
@ -9640,6 +9642,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
* @see AccessibleState#FOCUSED
|
||||
* @see AccessibleStateSet
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
AccessibleContext ac = getCurrentAccessibleContext();
|
||||
if (ac instanceof AccessibleComponent) {
|
||||
|
||||
@ -829,6 +829,7 @@ public class JViewport extends JComponent implements Accessible
|
||||
*
|
||||
* @see JComponent#reshape(int, int, int, int)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void reshape(int x, int y, int w, int h) {
|
||||
boolean sizeChanged = (getWidth() != w) || (getHeight() != h);
|
||||
if (sizeChanged) {
|
||||
@ -1447,6 +1448,7 @@ public class JViewport extends JComponent implements Accessible
|
||||
* 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.
|
||||
|
||||
@ -253,6 +253,7 @@ public class Popup {
|
||||
paint(g);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void show() {
|
||||
this.pack();
|
||||
if (getWidth() > 0 && getHeight() > 0) {
|
||||
|
||||
@ -260,6 +260,7 @@ public class ProgressMonitor implements Accessible
|
||||
* @see #setMaximum
|
||||
* @see #close
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setProgress(int nv) {
|
||||
if (nv >= max) {
|
||||
close();
|
||||
|
||||
@ -401,6 +401,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.
|
||||
*/
|
||||
|
||||
@ -195,6 +195,7 @@ public class SortingFocusTraversalPolicy
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void enumerateCycle(Container container, List<Component> cycle) {
|
||||
if (!(container.isVisible() && container.isDisplayable())) {
|
||||
return;
|
||||
|
||||
@ -1929,6 +1929,7 @@ public class SwingUtilities implements SwingConstants
|
||||
public void windowDeactivated(WindowEvent e) {
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void show() {
|
||||
// This frame can never be shown
|
||||
}
|
||||
|
||||
@ -1436,6 +1436,7 @@ public class UIManager implements Serializable
|
||||
/*
|
||||
* Sets default swing focus traversal policy.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void maybeInitializeFocusPolicy(JComponent comp) {
|
||||
// Check for JRootPane which indicates that a swing toplevel
|
||||
// is coming, in which case a swing default focus policy
|
||||
|
||||
@ -216,6 +216,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
|
||||
*
|
||||
* @return {@code false}
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -223,6 +223,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
|
||||
/**
|
||||
* Implementation of ComboPopup.show().
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void show() {
|
||||
comboBox.firePopupMenuWillBecomeVisible();
|
||||
setListSelection(comboBox.getSelectedIndex());
|
||||
@ -234,6 +235,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
|
||||
/**
|
||||
* Implementation of ComboPopup.hide().
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void hide() {
|
||||
MenuSelectionManager manager = MenuSelectionManager.defaultManager();
|
||||
MenuElement [] selection = manager.getSelectedPath();
|
||||
@ -1032,6 +1034,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
|
||||
/**
|
||||
* Overridden to unconditionally return false.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -502,6 +502,7 @@ public class BasicFileChooserUI extends FileChooserUI {
|
||||
public void mouseReleased(MouseEvent evt) {
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void valueChanged(ListSelectionEvent evt) {
|
||||
if(!evt.getValueIsAdjusting()) {
|
||||
JFileChooser chooser = getFileChooser();
|
||||
@ -1305,6 +1306,7 @@ public class BasicFileChooserUI extends FileChooserUI {
|
||||
* @return The representation of the data to be transfered.
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected Transferable createTransferable(JComponent c) {
|
||||
Object[] values = null;
|
||||
if (c instanceof JList) {
|
||||
|
||||
@ -926,6 +926,7 @@ public class BasicInternalFrameTitlePane extends JComponent
|
||||
* This class should be treated as a "protected" inner class.
|
||||
* Instantiate it only within subclasses of <code>Foo</code>.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class SystemMenuBar extends JMenuBar {
|
||||
public boolean isFocusTraversable() { return false; }
|
||||
public void requestFocus() {}
|
||||
@ -963,6 +964,7 @@ public class BasicInternalFrameTitlePane extends JComponent
|
||||
setOpaque(((Boolean)opacity).booleanValue());
|
||||
}
|
||||
}
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() { return false; }
|
||||
public void requestFocus() {}
|
||||
public AccessibleContext getAccessibleContext() {
|
||||
|
||||
@ -2931,6 +2931,7 @@ public class BasicListUI extends ListUI
|
||||
* @return The representation of the data to be transfered.
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected Transferable createTransferable(JComponent c) {
|
||||
if (c instanceof JList) {
|
||||
JList<?> list = (JList) c;
|
||||
|
||||
@ -441,6 +441,7 @@ public class BasicSplitPaneDivider extends Container
|
||||
}
|
||||
}
|
||||
// Don't want the button to participate in focus traversable.
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
}
|
||||
@ -497,6 +498,7 @@ public class BasicSplitPaneDivider extends Container
|
||||
}
|
||||
}
|
||||
// Don't want the button to participate in focus traversable.
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1191,6 +1191,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
|
||||
* 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();
|
||||
|
||||
@ -2395,6 +2395,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
|
||||
return total;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void layoutContainer(Container parent) {
|
||||
/* Some of the code in this method deals with changing the
|
||||
* visibility of components to hide and show the contents for the
|
||||
@ -2903,6 +2904,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
|
||||
return calculateMaxTabWidth(tabPlacement);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void layoutContainer(Container parent) {
|
||||
/* Some of the code in this method deals with changing the
|
||||
* visibility of components to hide and show the contents for the
|
||||
|
||||
@ -2644,6 +2644,7 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory {
|
||||
/**
|
||||
* The only richer format supported is the file list flavor
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected Object getRicherData(DataFlavor flavor) throws UnsupportedFlavorException {
|
||||
if (richText == null) {
|
||||
return null;
|
||||
|
||||
@ -421,6 +421,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
|
||||
*
|
||||
* @param direction a direction
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void navigateFocusedComp(int direction)
|
||||
{
|
||||
int nComp = toolBar.getComponentCount();
|
||||
@ -886,6 +887,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
|
||||
* @param b {@code true} if the {@code JToolBar} is floating
|
||||
* @param p the position
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setFloating(boolean b, Point p) {
|
||||
if (toolBar.isFloatable()) {
|
||||
boolean visible = false;
|
||||
@ -1080,6 +1082,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
|
||||
* @param position the relative to the {@code JTollBar} position
|
||||
* @param origin the screen position of {@code JToolBar} before dragging
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void dragTo(Point position, Point origin)
|
||||
{
|
||||
if (toolBar.isFloatable())
|
||||
|
||||
@ -2363,6 +2363,7 @@ public class BasicTreeUI extends TreeUI
|
||||
* @param messageCancel message to cancel editing
|
||||
* @param messageTree message to tree
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void completeEditing(boolean messageStop,
|
||||
boolean messageCancel,
|
||||
boolean messageTree) {
|
||||
|
||||
@ -161,6 +161,7 @@ public class MetalComboBoxButton extends JButton {
|
||||
iconOnly = onlyIcon;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -441,6 +441,7 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
* @param the Container for which this layout manager is being used
|
||||
* @return a Dimension object containing the layout's preferred size
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public Dimension preferredLayoutSize(Container parent) {
|
||||
Dimension cpd, mbd, tpd;
|
||||
int cpWidth = 0;
|
||||
@ -493,6 +494,7 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
* @param the Container for which this layout manager is being used
|
||||
* @return a Dimension object containing the layout's minimum size
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public Dimension minimumLayoutSize(Container parent) {
|
||||
Dimension cpd, mbd, tpd;
|
||||
int cpWidth = 0;
|
||||
@ -544,6 +546,7 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
* @param the Container for which this layout manager is being used
|
||||
* @return a Dimension object containing the layout's maximum size
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public Dimension maximumLayoutSize(Container target) {
|
||||
Dimension cpd, mbd, tpd;
|
||||
int cpWidth = Integer.MAX_VALUE;
|
||||
@ -607,6 +610,7 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
*
|
||||
* @param the Container for which this layout manager is being used
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void layoutContainer(Container parent) {
|
||||
JRootPane root = (JRootPane) parent;
|
||||
Rectangle b = root.getBounds();
|
||||
|
||||
@ -185,6 +185,7 @@ class MetalSplitPaneDivider extends BasicSplitPaneDivider
|
||||
}
|
||||
|
||||
// Don't want the button to participate in focus traversable.
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
}
|
||||
@ -294,6 +295,7 @@ class MetalSplitPaneDivider extends BasicSplitPaneDivider
|
||||
}
|
||||
|
||||
// Don't want the button to participate in focus traversable.
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1427,6 +1427,7 @@ public class JTableHeader extends JComponent implements TableColumnModelListener
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFocusTraversable() {
|
||||
AccessibleContext ac = getCurrentAccessibleContext();
|
||||
if (ac instanceof AccessibleComponent) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2014, 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
|
||||
@ -218,6 +218,7 @@ class GlyphPainter1 extends GlyphView.GlyphPainter {
|
||||
return p1;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
void sync(GlyphView v) {
|
||||
Font f = v.getFont();
|
||||
if ((metrics == null) || (! f.equals(metrics.getFont()))) {
|
||||
|
||||
@ -279,6 +279,7 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon
|
||||
* @param f the font
|
||||
* @return the metrics
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public FontMetrics getFontMetrics(Font f) {
|
||||
// The Toolkit implementations cache, so we just forward
|
||||
// to the default toolkit.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, 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
|
||||
@ -916,6 +916,7 @@ class AccessibleHTML implements Accessible {
|
||||
* @return the zero-based index of the character under Point p; if
|
||||
* Point is invalid returns -1.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public int getIndexAtPoint(Point p) {
|
||||
View v = getView();
|
||||
if (v != null) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2014, 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
|
||||
@ -599,6 +599,7 @@ public class FormView extends ComponentView implements ActionListener {
|
||||
* @param point associated with the mouse click.
|
||||
* @return the image data.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private String getImageData(Point point) {
|
||||
|
||||
String mouseCoords = point.x + ":" + point.y;
|
||||
@ -816,6 +817,7 @@ public class FormView extends ComponentView implements ActionListener {
|
||||
* URLEncoder.encode() method before being added to the
|
||||
* buffer.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void appendBuffer(StringBuilder buffer, String name, String value) {
|
||||
if (buffer.length() > 0) {
|
||||
buffer.append('&');
|
||||
|
||||
@ -218,6 +218,7 @@ class FrameView extends ComponentView implements HyperlinkListener {
|
||||
* the scrolling attribute. If not defined, the default is "auto" which
|
||||
* maps to the scrollbar's being displayed as needed.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void createScrollPane() {
|
||||
AttributeSet attributes = getElement().getAttributes();
|
||||
String scrolling = (String)attributes.getAttribute(HTML.Attribute.SCROLLING);
|
||||
|
||||
@ -129,6 +129,7 @@ class HiddenTagView extends EditableView implements DocumentListener {
|
||||
|
||||
// local methods
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
void updateYAlign(Font font) {
|
||||
Container c = getContainer();
|
||||
FontMetrics fm = (c != null) ? c.getFontMetrics(font) :
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2014, 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
|
||||
@ -88,6 +88,7 @@ class IsindexView extends ComponentView implements ActionListener {
|
||||
* contents of the JTextField. The search
|
||||
* contents are URLEncoded.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
|
||||
String data = textField.getText();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, 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
|
||||
@ -161,6 +161,7 @@ class LineView extends ParagraphView {
|
||||
/**
|
||||
* Returns the location for the tab.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected float getPreTab(float x, int tabOffset) {
|
||||
Document d = getDocument();
|
||||
View v = getViewAtPosition(tabOffset, null);
|
||||
|
||||
@ -2562,6 +2562,7 @@ public class StyleSheet extends StyleContext {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
void paint(Graphics g, float x, float y, float w, float h, View v) {
|
||||
Rectangle clip = g.getClipRect();
|
||||
if (clip != null) {
|
||||
|
||||
@ -234,6 +234,7 @@ abstract class AppletPanel extends Panel implements AppletStub, Runnable {
|
||||
* Minimum size
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public Dimension minimumSize() {
|
||||
return new Dimension(defaultAppletSize.width,
|
||||
defaultAppletSize.height);
|
||||
@ -243,6 +244,7 @@ abstract class AppletPanel extends Panel implements AppletStub, Runnable {
|
||||
* Preferred size
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public Dimension preferredSize() {
|
||||
return new Dimension(currentAppletSize.width,
|
||||
currentAppletSize.height);
|
||||
@ -700,6 +702,7 @@ abstract class AppletPanel extends Panel implements AppletStub, Runnable {
|
||||
* applet event processing so that it can be gracefully interrupted from
|
||||
* things like HotJava.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void runLoader() {
|
||||
if (status != APPLET_DISPOSE) {
|
||||
showAppletStatus("notdisposed");
|
||||
|
||||
@ -44,6 +44,7 @@ class AppletProps extends Frame {
|
||||
TextField proxyPort;
|
||||
Choice accessMode;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
AppletProps() {
|
||||
setTitle(amh.getMessage("title"));
|
||||
Panel p = new Panel();
|
||||
@ -100,6 +101,7 @@ class AppletProps extends Frame {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
void apply() {
|
||||
String proxyHostValue = proxyHost.getText().trim();
|
||||
String proxyPortValue = proxyPort.getText().trim();
|
||||
@ -172,6 +174,7 @@ class AppletProps extends Frame {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean action(Event evt, Object obj) {
|
||||
if (amh.getMessage("button.apply").equals(obj)) {
|
||||
apply();
|
||||
@ -197,6 +200,7 @@ class AppletProps extends Frame {
|
||||
/* Dialog class to display property-related errors to user */
|
||||
@SuppressWarnings("serial") // JDK implementation class
|
||||
class AppletPropsErrorDialog extends Dialog {
|
||||
@SuppressWarnings("deprecation")
|
||||
public AppletPropsErrorDialog(Frame parent, String title, String message,
|
||||
String buttonText) {
|
||||
super(parent, title, true);
|
||||
@ -212,6 +216,7 @@ class AppletPropsErrorDialog extends Dialog {
|
||||
fRect.y + ((fRect.height - dDim.height) / 2));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean action(Event event, Object object) {
|
||||
hide();
|
||||
dispose();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, 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
|
||||
@ -121,6 +121,7 @@ class AppletSecurity extends AWTSecurityManager {
|
||||
/**
|
||||
* get the current (first) instance of an AppletClassLoader on the stack.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private AppletClassLoader currentAppletClassLoader()
|
||||
{
|
||||
// try currentClassLoader first
|
||||
@ -308,6 +309,7 @@ class AppletSecurity extends AWTSecurityManager {
|
||||
* @exception SecurityException if the caller does not have
|
||||
* permission to access the AWT event queue.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void checkAwtEventQueueAccess() {
|
||||
AppContext appContext = AppContext.getAppContext();
|
||||
AppletClassLoader appletClassLoader = currentAppletClassLoader();
|
||||
|
||||
@ -48,6 +48,7 @@ final class TextFrame extends Frame {
|
||||
/**
|
||||
* Create the tag frame.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
TextFrame(int x, int y, String title, String text) {
|
||||
setTitle(title);
|
||||
TextArea txt = new TextArea(20, 60);
|
||||
@ -156,6 +157,7 @@ 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;
|
||||
@ -228,6 +230,7 @@ public class AppletViewer extends Frame implements AppletContext, Printable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void appletStateChanged(AppletEvent evt)
|
||||
{
|
||||
AppletPanel src = (AppletPanel)evt.getSource();
|
||||
@ -594,6 +597,7 @@ public class AppletViewer extends Frame implements AppletContext, Printable {
|
||||
/**
|
||||
* Make sure the atrributes are uptodate.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void updateAtts() {
|
||||
Dimension d = panel.size();
|
||||
Insets in = panel.insets();
|
||||
@ -648,6 +652,7 @@ public class AppletViewer extends Frame implements AppletContext, Printable {
|
||||
/**
|
||||
* Save the applet to a well known file (for now) as a serialized object
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
void appletSave() {
|
||||
AccessController.doPrivileged(new PrivilegedAction<Object>() {
|
||||
|
||||
@ -699,6 +704,7 @@ public class AppletViewer extends Frame implements AppletContext, Printable {
|
||||
/**
|
||||
* Clone the viewer and the applet.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
void appletClone() {
|
||||
Point p = location();
|
||||
updateAtts();
|
||||
@ -711,6 +717,7 @@ public class AppletViewer extends Frame implements AppletContext, Printable {
|
||||
/**
|
||||
* Show the applet tag.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
void appletTag() {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
updateAtts();
|
||||
@ -724,6 +731,7 @@ public class AppletViewer extends Frame implements AppletContext, Printable {
|
||||
/**
|
||||
* Show the applet info.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
void appletInfo() {
|
||||
String str = panel.applet.getAppletInfo();
|
||||
if (str == null) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2014, 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
|
||||
@ -413,6 +413,7 @@ public final class AppContext {
|
||||
* contained within this AppContext
|
||||
* @since 1.2
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void dispose() throws IllegalThreadStateException {
|
||||
// Check to be sure that the current Thread isn't in this AppContext
|
||||
if (this.threadGroup.parentOf(Thread.currentThread().getThreadGroup())) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2014, 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
|
||||
@ -146,6 +146,7 @@ final class DebugSettings {
|
||||
/*
|
||||
* Sets up default property values
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void loadDefaultProperties() {
|
||||
// is there a more inefficient way to setup default properties?
|
||||
// maybe, but this has got to be close to 100% non-optimal
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2014, 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
|
||||
@ -88,6 +88,7 @@ public abstract class LightweightFrame extends Frame {
|
||||
@Override public final void toFront() {}
|
||||
@Override public final void toBack() {}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override public void addNotify() {
|
||||
synchronized (getTreeLock()) {
|
||||
if (getPeer() == null) {
|
||||
@ -114,6 +115,7 @@ public abstract class LightweightFrame extends Frame {
|
||||
* @param activate if <code>true</code>, activates the frame;
|
||||
* otherwise, deactivates the frame
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void emulateActivation(boolean activate) {
|
||||
((FramePeer)getPeer()).emulateActivation(activate);
|
||||
}
|
||||
|
||||
@ -713,6 +713,7 @@ public abstract class SunToolkit extends Toolkit
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
static final SoftCache imgCache = new SoftCache();
|
||||
|
||||
static Image getImageFromHash(Toolkit tk, URL url) {
|
||||
|
||||
@ -717,6 +717,7 @@ search:
|
||||
* Primary translation function for translating a Transferable into
|
||||
* a byte array, given a source DataFlavor and target format.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public byte[] translateTransferable(Transferable contents,
|
||||
DataFlavor flavor,
|
||||
long format) throws IOException
|
||||
@ -1287,6 +1288,7 @@ search:
|
||||
* an InputStream into an Object, given a source format and a target
|
||||
* DataFlavor.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public Object translateStream(InputStream str, DataFlavor flavor,
|
||||
long format, Transferable localeTransferable)
|
||||
throws IOException
|
||||
|
||||
@ -114,7 +114,7 @@ public class GifImageDecoder extends ImageDecoder {
|
||||
/**
|
||||
* produce an image from the stream.
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
@SuppressWarnings({"fallthrough", "deprecation"})
|
||||
public void produceImage() throws IOException, ImageFormatException {
|
||||
try {
|
||||
readHeader();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2014, 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
|
||||
@ -59,6 +59,7 @@ public class MultiResolutionToolkitImage extends ToolkitImage implements MultiRe
|
||||
|
||||
private static class ObserverCache {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
static final SoftCache INSTANCE = new SoftCache();
|
||||
}
|
||||
|
||||
|
||||
@ -1214,6 +1214,7 @@ public class PSPrinterJob extends RasterPrinterJob {
|
||||
* 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;
|
||||
@ -1228,6 +1229,7 @@ public class PSPrinterJob extends RasterPrinterJob {
|
||||
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) {
|
||||
@ -2123,6 +2125,7 @@ public class PSPrinterJob extends RasterPrinterJob {
|
||||
* @param w the width of the applet panel in the browser window
|
||||
* @param h the width of the applet panel in the browser window
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public PluginPrinter(Component applet,
|
||||
PrintStream stream,
|
||||
int x, int y, int w, int h) {
|
||||
|
||||
@ -745,6 +745,7 @@ public abstract class RasterPrinterJob extends PrinterJob {
|
||||
* return a PageFormat corresponding to the updated attributes,
|
||||
* or null if the user cancelled the dialog.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public PageFormat pageDialog(final PrintRequestAttributeSet attributes)
|
||||
throws HeadlessException {
|
||||
if (GraphicsEnvironment.isHeadless()) {
|
||||
|
||||
@ -792,6 +792,7 @@ public class ServiceDialog extends JDialog implements ActionListener {
|
||||
return label;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Object source = e.getSource();
|
||||
|
||||
|
||||
@ -1355,6 +1355,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
/**
|
||||
* @param index visual index of the file to be edited
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void editFileName(int index) {
|
||||
JFileChooser chooser = getFileChooser();
|
||||
File currentDirectory = chooser.getCurrentDirectory();
|
||||
@ -1521,6 +1522,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
void setFileSelected() {
|
||||
if (getFileChooser().isMultiSelectionEnabled() && !isDirectorySelected()) {
|
||||
File[] files = getFileChooser().getSelectedFiles(); // Should be selected
|
||||
|
||||
@ -241,6 +241,7 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void notifyDisplayChanged(final int scaleFactor) {
|
||||
if (scaleFactor != this.scaleFactor) {
|
||||
if (!copyBufferEnabled) content.paintLock();
|
||||
@ -260,6 +261,7 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void addNotify() {
|
||||
super.addNotify();
|
||||
if (getPeer() instanceof DisplayChangedListener) {
|
||||
|
||||
@ -358,6 +358,7 @@ public class SwingUtilities2 {
|
||||
* @param c Graphics Graphics
|
||||
* @param font Font to get FontMetrics for
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static FontMetrics getFontMetrics(JComponent c, Graphics g,
|
||||
Font font) {
|
||||
if (c != null) {
|
||||
@ -1706,6 +1707,7 @@ public class SwingUtilities2 {
|
||||
* This is not a general-purpose method and is here only to permit
|
||||
* sharing code.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean tabbedPaneChangeFocusTo(Component comp) {
|
||||
if (comp != null) {
|
||||
if (comp.isFocusTraversable()) {
|
||||
|
||||
@ -71,6 +71,7 @@ public abstract class InfoWindow extends Window {
|
||||
}
|
||||
|
||||
// Must be executed on EDT.
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void show(Point corner, int indent) {
|
||||
assert SunToolkit.isDispatchThreadForAppContext(this);
|
||||
|
||||
@ -98,6 +99,7 @@ public abstract class InfoWindow extends Window {
|
||||
closer.schedule();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void hide() {
|
||||
closer.close();
|
||||
}
|
||||
@ -125,6 +127,7 @@ public abstract class InfoWindow extends Window {
|
||||
}
|
||||
|
||||
// WARNING: this method may be executed on Toolkit thread.
|
||||
@SuppressWarnings("deprecation")
|
||||
private void doClose() {
|
||||
SunToolkit.executeOnEventHandlerThread(InfoWindow.this, new Runnable() {
|
||||
public void run() {
|
||||
|
||||
@ -225,6 +225,7 @@ final class ListHelper implements XScrollbarClient {
|
||||
return index == focusedIndex;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
void setFont(Font newFont) {
|
||||
if (newFont != font) {
|
||||
font = newFont;
|
||||
|
||||
@ -326,6 +326,7 @@ abstract public class XBaseMenuWindow extends XWindow {
|
||||
* check for adding duplicate items
|
||||
* @param item item to add
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void addItem(MenuItem item) {
|
||||
XMenuItemPeer mp = (XMenuItemPeer)item.getPeer();
|
||||
if (mp != null) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, 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
|
||||
@ -499,6 +499,7 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS
|
||||
}
|
||||
|
||||
// Stolen from TinyChoicePeer
|
||||
@SuppressWarnings("deprecation")
|
||||
public Dimension getMinimumSize() {
|
||||
// TODO: move this impl into ListHelper?
|
||||
FontMetrics fm = getFontMetrics(target.getFont());
|
||||
|
||||
@ -167,6 +167,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
|
||||
return System.getProperty("sun.awt.X11.XComponentPeer.reparentNotSupported", "false").equals("false");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isObscured() {
|
||||
Container container = (target instanceof Container) ?
|
||||
(Container)target : target.getParent();
|
||||
@ -279,6 +280,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
|
||||
}
|
||||
|
||||
// TODO: consider moving it to KeyboardFocusManagerPeerImpl
|
||||
@SuppressWarnings("deprecation")
|
||||
final public boolean requestFocus(Component lightweightChild, boolean temporary,
|
||||
boolean focusedWindowChangeAllowed, long time,
|
||||
CausedFocusEvent.Cause cause)
|
||||
@ -388,6 +390,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
|
||||
/**
|
||||
* @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);
|
||||
@ -1324,6 +1327,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
@ -1344,6 +1348,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
|
||||
|
||||
/****** DropTargetPeer implementation ********************/
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void addDropTarget(DropTarget dt) {
|
||||
Component comp = target;
|
||||
while(!(comp == null || comp instanceof Window)) {
|
||||
@ -1358,6 +1363,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void removeDropTarget(DropTarget dt) {
|
||||
Component comp = target;
|
||||
while(!(comp == null || comp instanceof Window)) {
|
||||
|
||||
@ -110,6 +110,7 @@ public final class XDragSourceContextPeer
|
||||
return theInstance;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void startDrag(Transferable transferable,
|
||||
long[] formats, Map<Long, DataFlavor> formatMap) {
|
||||
Component component = getTrigger().getComponent();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, 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
|
||||
@ -188,6 +188,7 @@ final class XDropTargetContextPeer extends SunDropTargetContextPeer {
|
||||
// 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();
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, 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,6 +166,7 @@ public class XEmbedChildProxyPeer implements ComponentPeer, XEventDispatcher{
|
||||
XToolkit.postEvent(XToolkit.targetToAppContext(proxy), event);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
boolean simulateMotifRequestFocus(Component lightweightChild, boolean temporary,
|
||||
boolean focusedWindowChangeAllowed, long time)
|
||||
{
|
||||
|
||||
@ -61,6 +61,7 @@ public class XEmbeddedFrame extends EmbeddedFrame {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void addNotify()
|
||||
{
|
||||
if (getPeer() == null) {
|
||||
@ -77,6 +78,7 @@ public class XEmbeddedFrame extends EmbeddedFrame {
|
||||
/*
|
||||
* The method shouldn't be called in case of active XEmbed.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean traverseIn(boolean direction) {
|
||||
XEmbeddedFramePeer peer = (XEmbeddedFramePeer)getPeer();
|
||||
if (peer != null) {
|
||||
@ -89,6 +91,7 @@ public class XEmbeddedFrame extends EmbeddedFrame {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected boolean traverseOut(boolean direction) {
|
||||
XEmbeddedFramePeer xefp = (XEmbeddedFramePeer) getPeer();
|
||||
if (direction == FORWARD) {
|
||||
@ -103,6 +106,7 @@ public class XEmbeddedFrame extends EmbeddedFrame {
|
||||
/*
|
||||
* The method shouldn't be called in case of active XEmbed.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void synthesizeWindowActivation(boolean doActivate) {
|
||||
XEmbeddedFramePeer peer = (XEmbeddedFramePeer)getPeer();
|
||||
if (peer != null) {
|
||||
@ -114,12 +118,14 @@ public class XEmbeddedFrame extends EmbeddedFrame {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void registerAccelerator(AWTKeyStroke stroke) {
|
||||
XEmbeddedFramePeer xefp = (XEmbeddedFramePeer) getPeer();
|
||||
if (xefp != null) {
|
||||
xefp.registerAccelerator(stroke);
|
||||
}
|
||||
}
|
||||
@SuppressWarnings("deprecation")
|
||||
public void unregisterAccelerator(AWTKeyStroke stroke) {
|
||||
XEmbeddedFramePeer xefp = (XEmbeddedFramePeer) getPeer();
|
||||
if (xefp != null) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, 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
|
||||
@ -46,6 +46,7 @@ public class XEmbeddingContainer extends XEmbedHelper implements XEventDispatche
|
||||
XToolkit.removeEventDispatcher(embedder.getWindow(), this);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
void add(long child) {
|
||||
if (checkXEmbed(child)) {
|
||||
Component proxy = createChildProxy(child);
|
||||
|
||||
@ -135,6 +135,7 @@ class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListe
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void init(FileDialog target) {
|
||||
fileDialog = target; //new Dialog(target, target.getTitle(), false);
|
||||
this.title = target.getTitle();
|
||||
@ -414,6 +415,7 @@ class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListe
|
||||
/**
|
||||
* handle the cancel event
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
void handleCancel() {
|
||||
KeyboardFocusManager.getCurrentKeyboardFocusManager()
|
||||
.removeKeyEventDispatcher(this);
|
||||
@ -435,6 +437,7 @@ class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListe
|
||||
/**
|
||||
* handle the quit event
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
void handleQuitButton() {
|
||||
dir = null;
|
||||
file = null;
|
||||
@ -444,6 +447,7 @@ class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListe
|
||||
/**
|
||||
* set the entry of the new dir with f
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
void setFilterEntry(String d, String f) {
|
||||
File fe = new File(d);
|
||||
|
||||
@ -638,6 +642,7 @@ class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListe
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
|
||||
int id = keyEvent.getID();
|
||||
int keyCode = keyEvent.getKeyCode();
|
||||
@ -774,6 +779,7 @@ class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListe
|
||||
}
|
||||
|
||||
// 03/02/2005 b5097243 Pressing 'ESC' on a file dlg does not dispose the dlg on Xtoolkit
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setVisible(boolean b){
|
||||
if (fileDialog == null) {
|
||||
init(target);
|
||||
@ -852,6 +858,7 @@ class Separator extends Canvas {
|
||||
public final static int VERTICAL = 1;
|
||||
int orientation;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Separator(int length, int thickness, int orient) {
|
||||
super();
|
||||
orientation = orient;
|
||||
@ -863,6 +870,7 @@ class Separator extends Canvas {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void paint(Graphics g) {
|
||||
int x1, y1, x2, y2;
|
||||
Rectangle bbox = bounds();
|
||||
|
||||
@ -108,6 +108,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
|
||||
setExtendedState(state);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setMenuBar(MenuBar mb) {
|
||||
// state_lock should always be the second after awt_lock
|
||||
XToolkit.awtLock();
|
||||
|
||||
@ -137,6 +137,7 @@ public class XInputMethod extends X11InputMethod {
|
||||
XToolkit.awtUnlock();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
long getCurrentParentWindow() {
|
||||
return ((XWindow)clientComponentWindow.getPeer()).getContentWindow();
|
||||
}
|
||||
|
||||
@ -163,6 +163,7 @@ public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
|
||||
postPaintEvent();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void addHelpMenu(Menu m) {
|
||||
XMenuPeer mp = (XMenuPeer)m.getPeer();
|
||||
synchronized(getMenuTreeLock()) {
|
||||
@ -179,6 +180,7 @@ public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
|
||||
/**
|
||||
* called from XFramePeer.setMenuBar
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void init(Frame frame) {
|
||||
this.target = frame;
|
||||
this.framePeer = (XFramePeer)frame.getPeer();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user