diff --git a/src/share/classes/java/awt/Choice.java b/src/share/classes/java/awt/Choice.java index ea46b8d772e8424b31709fcd90e63577a0d60798..64c46b53da48737b333365625ca73245fa9a7216 100644 --- a/src/share/classes/java/awt/Choice.java +++ b/src/share/classes/java/awt/Choice.java @@ -228,7 +228,7 @@ public class Choice extends Component implements ItemSelectable, Accessible { pItems.insertElementAt(item, index); ChoicePeer peer = (ChoicePeer)this.peer; if (peer != null) { - peer.addItem(item, index); + peer.add(item, index); } // no selection or selection shifted up if (selectedIndex < 0 || selectedIndex >= index) { diff --git a/src/share/classes/java/awt/Component.java b/src/share/classes/java/awt/Component.java index 8896ec248b4a65b52c16ae0ff96734f79c4cfd2b..74cbc3cc9645e8caa068b24f5833f5e7330e24ce 100644 --- a/src/share/classes/java/awt/Component.java +++ b/src/share/classes/java/awt/Component.java @@ -1306,7 +1306,7 @@ public abstract class Component implements ImageObserver, MenuContainer, enabled = true; ComponentPeer peer = this.peer; if (peer != null) { - peer.enable(); + peer.setEnabled(true); if (visible) { updateCursorImmediately(); } @@ -1355,7 +1355,7 @@ public abstract class Component implements ImageObserver, MenuContainer, } ComponentPeer peer = this.peer; if (peer != null) { - peer.disable(); + peer.setEnabled(false); if (visible) { updateCursorImmediately(); } @@ -1447,7 +1447,7 @@ public abstract class Component implements ImageObserver, MenuContainer, mixOnShowing(); ComponentPeer peer = this.peer; if (peer != null) { - peer.show(); + peer.setVisible(true); createHierarchyEvents(HierarchyEvent.HIERARCHY_CHANGED, this, parent, HierarchyEvent.SHOWING_CHANGED, @@ -1517,7 +1517,7 @@ public abstract class Component implements ImageObserver, MenuContainer, } ComponentPeer peer = this.peer; if (peer != null) { - peer.hide(); + peer.setVisible(false); createHierarchyEvents(HierarchyEvent.HIERARCHY_CHANGED, this, parent, HierarchyEvent.SHOWING_CHANGED, @@ -2414,7 +2414,7 @@ public abstract class Component implements ImageObserver, MenuContainer, if (dim == null || !(isPreferredSizeSet() || isValid())) { synchronized (getTreeLock()) { prefSize = (peer != null) ? - peer.preferredSize() : + peer.getPreferredSize() : getMinimumSize(); dim = prefSize; } @@ -2484,7 +2484,7 @@ public abstract class Component implements ImageObserver, MenuContainer, if (dim == null || !(isMinimumSizeSet() || isValid())) { synchronized (getTreeLock()) { minSize = (peer != null) ? - peer.minimumSize() : + peer.getMinimumSize() : size(); dim = minSize; } @@ -3171,7 +3171,7 @@ public abstract class Component implements ImageObserver, MenuContainer, private Insets getInsets_NoClientCode() { ComponentPeer peer = this.peer; if (peer instanceof ContainerPeer) { - return (Insets)((ContainerPeer)peer).insets().clone(); + return (Insets)((ContainerPeer)peer).getInsets().clone(); } return new Insets(0, 0, 0, 0); } @@ -6722,7 +6722,7 @@ public abstract class Component implements ImageObserver, MenuContainer, // Hide peer first to stop system events such as cursor moves. if (visible) { - p.hide(); + p.setVisible(false); } peer = null; // Stop peer updates. diff --git a/src/share/classes/java/awt/Container.java b/src/share/classes/java/awt/Container.java index c302e4b0edc94042a4f9643c05bb020cc2f273a8..fe1ce4a99fdcc6eee87ecb28ab49f811883a63d5 100644 --- a/src/share/classes/java/awt/Container.java +++ b/src/share/classes/java/awt/Container.java @@ -343,7 +343,7 @@ public class Container extends Component { ComponentPeer peer = this.peer; if (peer instanceof ContainerPeer) { ContainerPeer cpeer = (ContainerPeer)peer; - return (Insets)cpeer.insets().clone(); + return (Insets)cpeer.getInsets().clone(); } return new Insets(0, 0, 0, 0); } @@ -3931,7 +3931,7 @@ public class Container extends Component { if (comp.isVisible()) { ComponentPeer peer = comp.getPeer(); if (peer != null) { - peer.show(); + peer.setVisible(true); } } } @@ -3952,7 +3952,7 @@ public class Container extends Component { if (comp.isVisible()) { ComponentPeer peer = comp.getPeer(); if (peer != null) { - peer.hide(); + peer.setVisible(false); } } } diff --git a/src/share/classes/java/awt/Dialog.java b/src/share/classes/java/awt/Dialog.java index 2104a64b742f8d980f37a8441e359387ed17b79b..310e52350e1e70261555ac18b62b0db82aefe956 100644 --- a/src/share/classes/java/awt/Dialog.java +++ b/src/share/classes/java/awt/Dialog.java @@ -941,7 +941,7 @@ public class Dialog extends Window { // does not invoke the super.show(). So wried... :( mixOnShowing(); - peer.show(); // now guaranteed never to block + peer.setVisible(true); // now guaranteed never to block if (isModalBlocked()) { modalBlocker.toFront(); } diff --git a/src/share/classes/java/awt/List.java b/src/share/classes/java/awt/List.java index 2ce9af6c0a6d4aea2df948ba3f0bab58a19267d9..5fd4e46313fdb0cb61d00a6735afc1ed58bdda96 100644 --- a/src/share/classes/java/awt/List.java +++ b/src/share/classes/java/awt/List.java @@ -378,7 +378,7 @@ public class List extends Component implements ItemSelectable, Accessible { ListPeer peer = (ListPeer)this.peer; if (peer != null) { - peer.addItem(item, index); + peer.add(item, index); } } @@ -413,7 +413,7 @@ public class List extends Component implements ItemSelectable, Accessible { public synchronized void clear() { ListPeer peer = (ListPeer)this.peer; if (peer != null) { - peer.clear(); + peer.removeAll(); } items = new Vector(); selected = new int[0]; @@ -718,7 +718,7 @@ public class List extends Component implements ItemSelectable, Accessible { multipleMode = b; ListPeer peer = (ListPeer)this.peer; if (peer != null) { - peer.setMultipleSelections(b); + peer.setMultipleMode(b); } } } @@ -768,7 +768,7 @@ public class List extends Component implements ItemSelectable, Accessible { synchronized (getTreeLock()) { ListPeer peer = (ListPeer)this.peer; return (peer != null) ? - peer.preferredSize(rows) : + peer.getPreferredSize(rows) : super.preferredSize(); } } @@ -818,7 +818,7 @@ public class List extends Component implements ItemSelectable, Accessible { synchronized (getTreeLock()) { ListPeer peer = (ListPeer)this.peer; return (peer != null) ? - peer.minimumSize(rows) : + peer.getMinimumSize(rows) : super.minimumSize(); } } diff --git a/src/share/classes/java/awt/MenuItem.java b/src/share/classes/java/awt/MenuItem.java index 99ddac75d1556ad3b41d436e4918721efed52944..71dd760a9bd86c2e8eff046520d41b18c5568035 100644 --- a/src/share/classes/java/awt/MenuItem.java +++ b/src/share/classes/java/awt/MenuItem.java @@ -268,7 +268,7 @@ public class MenuItem extends MenuComponent implements Accessible { enabled = true; MenuItemPeer peer = (MenuItemPeer)this.peer; if (peer != null) { - peer.enable(); + peer.setEnabled(true); } } @@ -294,7 +294,7 @@ public class MenuItem extends MenuComponent implements Accessible { enabled = false; MenuItemPeer peer = (MenuItemPeer)this.peer; if (peer != null) { - peer.disable(); + peer.setEnabled(false); } } diff --git a/src/share/classes/java/awt/TextArea.java b/src/share/classes/java/awt/TextArea.java index 6d2f8ca0ced30ae949ea06852cd10b42e64a03bd..8cf1c2ced000646d2c5e583988703219b36f730f 100644 --- a/src/share/classes/java/awt/TextArea.java +++ b/src/share/classes/java/awt/TextArea.java @@ -321,7 +321,7 @@ public class TextArea extends TextComponent { public synchronized void insertText(String str, int pos) { TextAreaPeer peer = (TextAreaPeer)this.peer; if (peer != null) { - peer.insertText(str, pos); + peer.insert(str, pos); } else { text = text.substring(0, pos) + str + text.substring(pos); } @@ -385,7 +385,7 @@ public class TextArea extends TextComponent { public synchronized void replaceText(String str, int start, int end) { TextAreaPeer peer = (TextAreaPeer)this.peer; if (peer != null) { - peer.replaceText(str, start, end); + peer.replaceRange(str, start, end); } else { text = text.substring(0, start) + str + text.substring(end); } @@ -500,7 +500,7 @@ public class TextArea extends TextComponent { synchronized (getTreeLock()) { TextAreaPeer peer = (TextAreaPeer)this.peer; return (peer != null) ? - peer.preferredSize(rows, columns) : + peer.getPreferredSize(rows, columns) : super.preferredSize(); } } @@ -552,7 +552,7 @@ public class TextArea extends TextComponent { synchronized (getTreeLock()) { TextAreaPeer peer = (TextAreaPeer)this.peer; return (peer != null) ? - peer.minimumSize(rows, columns) : + peer.getMinimumSize(rows, columns) : super.minimumSize(); } } diff --git a/src/share/classes/java/awt/TextField.java b/src/share/classes/java/awt/TextField.java index b2659aa99f0d12e0f61f4fa487d9a2f103e8abcb..e5e809e1744fa32a11bd7fea5e818b35a6e31805 100644 --- a/src/share/classes/java/awt/TextField.java +++ b/src/share/classes/java/awt/TextField.java @@ -281,7 +281,7 @@ public class TextField extends TextComponent { echoChar = c; TextFieldPeer peer = (TextFieldPeer)this.peer; if (peer != null) { - peer.setEchoCharacter(c); + peer.setEchoChar(c); } } } @@ -376,7 +376,7 @@ public class TextField extends TextComponent { synchronized (getTreeLock()) { TextFieldPeer peer = (TextFieldPeer)this.peer; return (peer != null) ? - peer.preferredSize(columns) : + peer.getPreferredSize(columns) : super.preferredSize(); } } @@ -424,7 +424,7 @@ public class TextField extends TextComponent { synchronized (getTreeLock()) { TextFieldPeer peer = (TextFieldPeer)this.peer; return (peer != null) ? - peer.minimumSize(columns) : + peer.getMinimumSize(columns) : super.minimumSize(); } } diff --git a/src/share/classes/java/awt/peer/ChoicePeer.java b/src/share/classes/java/awt/peer/ChoicePeer.java index fdeaabaa7858a8d46ef841aadb9bae393d93c28a..7343ff3db914025353b6f70a63b13c4aed8d7a70 100644 --- a/src/share/classes/java/awt/peer/ChoicePeer.java +++ b/src/share/classes/java/awt/peer/ChoicePeer.java @@ -37,8 +37,4 @@ public interface ChoicePeer extends ComponentPeer { void removeAll(); void select(int index); - /* - * DEPRECATED: Replaced by add(String, int). - */ - void addItem(String item, int index); } diff --git a/src/share/classes/java/awt/peer/ComponentPeer.java b/src/share/classes/java/awt/peer/ComponentPeer.java index 783076b06e0a29932624506abd16cb770204c8f7..79f4eb8a96437194efbbd9aaf57a0d0b7c855510 100644 --- a/src/share/classes/java/awt/peer/ComponentPeer.java +++ b/src/share/classes/java/awt/peer/ComponentPeer.java @@ -56,7 +56,6 @@ public interface ComponentPeer { void setVisible(boolean b); void setEnabled(boolean b); void paint(Graphics g); - void repaint(long tm, int x, int y, int width, int height); void print(Graphics g); void setBounds(int x, int y, int width, int height, int op); void handleEvent(AWTEvent e); @@ -112,47 +111,10 @@ public interface ComponentPeer { */ void layout(); - - Rectangle getBounds(); - /** * Applies the shape to the native component window. * @since 1.7 */ void applyShape(Region shape); - /** - * DEPRECATED: Replaced by getPreferredSize(). - */ - Dimension preferredSize(); - - /** - * DEPRECATED: Replaced by getMinimumSize(). - */ - Dimension minimumSize(); - - /** - * DEPRECATED: Replaced by setVisible(boolean). - */ - void show(); - - /** - * DEPRECATED: Replaced by setVisible(boolean). - */ - void hide(); - - /** - * DEPRECATED: Replaced by setEnabled(boolean). - */ - void enable(); - - /** - * DEPRECATED: Replaced by setEnabled(boolean). - */ - void disable(); - - /** - * DEPRECATED: Replaced by setBounds(int, int, int, int). - */ - void reshape(int x, int y, int width, int height); } diff --git a/src/share/classes/java/awt/peer/ContainerPeer.java b/src/share/classes/java/awt/peer/ContainerPeer.java index a4f332c66aee9fa41056beb63b7ebbf9659d6662..cda790a60480e6250c154403f1f195121e764e1a 100644 --- a/src/share/classes/java/awt/peer/ContainerPeer.java +++ b/src/share/classes/java/awt/peer/ContainerPeer.java @@ -39,7 +39,6 @@ public interface ContainerPeer extends ComponentPeer { void endValidate(); void beginLayout(); void endLayout(); - boolean isPaintPending(); /** * Restacks native windows - children of this native window - according to Java container order @@ -53,11 +52,4 @@ public interface ContainerPeer extends ComponentPeer { * @since 1.5 */ boolean isRestackSupported(); - /** - - - - * DEPRECATED: Replaced by getInsets(). - */ - Insets insets(); } diff --git a/src/share/classes/java/awt/peer/ListPeer.java b/src/share/classes/java/awt/peer/ListPeer.java index 643f47ae97501e76d3fa2cf8eda2ac80d2923b4c..16548df6a19e73428e613b19e436bb5c1f7f856f 100644 --- a/src/share/classes/java/awt/peer/ListPeer.java +++ b/src/share/classes/java/awt/peer/ListPeer.java @@ -45,28 +45,4 @@ public interface ListPeer extends ComponentPeer { Dimension getPreferredSize(int rows); Dimension getMinimumSize(int rows); - /** - * DEPRECATED: Replaced by add(String, int). - */ - void addItem(String item, int index); - - /** - * DEPRECATED: Replaced by removeAll(). - */ - void clear(); - - /** - * DEPRECATED: Replaced by setMultipleMode(boolean). - */ - void setMultipleSelections(boolean v); - - /** - * DEPRECATED: Replaced by getPreferredSize(int). - */ - Dimension preferredSize(int v); - - /** - * DEPRECATED: Replaced by getMinimumSize(int). - */ - Dimension minimumSize(int v); } diff --git a/src/share/classes/java/awt/peer/MenuItemPeer.java b/src/share/classes/java/awt/peer/MenuItemPeer.java index 9aa8b4e50fded6e22aa5da62c9b6069f7c0db1c1..51a52d993c3c6a66a2dd805d4a7962c278bf2aa1 100644 --- a/src/share/classes/java/awt/peer/MenuItemPeer.java +++ b/src/share/classes/java/awt/peer/MenuItemPeer.java @@ -35,13 +35,4 @@ public interface MenuItemPeer extends MenuComponentPeer { void setLabel(String label); void setEnabled(boolean b); - /** - * DEPRECATED: Replaced by setEnabled(boolean). - */ - void enable(); - - /** - * DEPRECATED: Replaced by setEnabled(boolean). - */ - void disable(); } diff --git a/src/share/classes/java/awt/peer/TextAreaPeer.java b/src/share/classes/java/awt/peer/TextAreaPeer.java index 1e65e32403f4af0e6c7ee9a8fa64d242d4463c24..a73068c04af14e5fd6e1cadc79397cc2b6d37ecc 100644 --- a/src/share/classes/java/awt/peer/TextAreaPeer.java +++ b/src/share/classes/java/awt/peer/TextAreaPeer.java @@ -39,23 +39,4 @@ public interface TextAreaPeer extends TextComponentPeer { Dimension getPreferredSize(int rows, int columns); Dimension getMinimumSize(int rows, int columns); - /** - * DEPRECATED: Replaced by insert(String, int). - */ - void insertText(String txt, int pos); - - /** - * DEPRECATED: Replaced by ReplaceRange(String, int, int). - */ - void replaceText(String txt, int start, int end); - - /** - * DEPRECATED: Replaced by getPreferredSize(int, int). - */ - Dimension preferredSize(int rows, int cols); - - /** - * DEPRECATED: Replaced by getMinimumSize(int, int). - */ - Dimension minimumSize(int rows, int cols); } diff --git a/src/share/classes/java/awt/peer/TextComponentPeer.java b/src/share/classes/java/awt/peer/TextComponentPeer.java index db4bd90963a1009513438b9dde96d57ad35595e6..cd318092b7de384491c9f6b23b01bde30cf67dc0 100644 --- a/src/share/classes/java/awt/peer/TextComponentPeer.java +++ b/src/share/classes/java/awt/peer/TextComponentPeer.java @@ -24,7 +24,6 @@ */ package java.awt.peer; -import java.awt.Rectangle; import java.awt.im.InputMethodRequests; /** @@ -43,8 +42,5 @@ public interface TextComponentPeer extends ComponentPeer { void select(int selStart, int selEnd); void setCaretPosition(int pos); int getCaretPosition(); - int getIndexAtPoint(int x, int y); - Rectangle getCharacterBounds(int i); - long filterEvents(long mask); InputMethodRequests getInputMethodRequests(); } diff --git a/src/share/classes/java/awt/peer/TextFieldPeer.java b/src/share/classes/java/awt/peer/TextFieldPeer.java index 1a7f3f77b4fa6a260d9b3901758abe884edd4fe1..4fec4e8ef2da9bda134aa059967b0adb3d98d775 100644 --- a/src/share/classes/java/awt/peer/TextFieldPeer.java +++ b/src/share/classes/java/awt/peer/TextFieldPeer.java @@ -38,18 +38,4 @@ public interface TextFieldPeer extends TextComponentPeer { Dimension getPreferredSize(int columns); Dimension getMinimumSize(int columns); - /** - * DEPRECATED: Replaced by setEchoChar(char echoChar). - */ - void setEchoCharacter(char c); - - /** - * DEPRECATED: Replaced by getPreferredSize(int). - */ - Dimension preferredSize(int cols); - - /** - * DEPRECATED: Replaced by getMinimumSize(int). - */ - Dimension minimumSize(int cols); } diff --git a/src/share/classes/java/awt/peer/WindowPeer.java b/src/share/classes/java/awt/peer/WindowPeer.java index 2ecd4b4f3fb1ca238c5e8f228fb992bbdaa6b88b..e2016e4dd1b85d78fde1034bd1eed44f106a2fc1 100644 --- a/src/share/classes/java/awt/peer/WindowPeer.java +++ b/src/share/classes/java/awt/peer/WindowPeer.java @@ -39,7 +39,6 @@ public interface WindowPeer extends ContainerPeer { void toBack(); void setAlwaysOnTop(boolean alwaysOnTop); void updateFocusableWindowState(); - boolean requestWindowFocus(); void setModalBlocked(Dialog blocker, boolean blocked); void updateMinimumSize(); void updateIconImages();