< prev index next >

src/share/classes/javax/swing/JScrollBar.java

Print this page
rev 1527 : 6727662: Code improvement and warnings removing from swing packages
Summary: Removed unnecessary castings and other warnings
Reviewed-by: malenkov

*** 657,668 **** * @return all of the <code>AdjustmentListener</code>s added or an empty * array if no listeners have been added * @since 1.4 */ public AdjustmentListener[] getAdjustmentListeners() { ! return (AdjustmentListener[])listenerList.getListeners( ! AdjustmentListener.class); } /** * Notify listeners that the scrollbar's model has changed. --- 657,667 ---- * @return all of the <code>AdjustmentListener</code>s added or an empty * array if no listeners have been added * @since 1.4 */ public AdjustmentListener[] getAdjustmentListeners() { ! return listenerList.getListeners(AdjustmentListener.class); } /** * Notify listeners that the scrollbar's model has changed.
*** 752,763 **** * false disables it */ public void setEnabled(boolean x) { super.setEnabled(x); Component[] children = getComponents(); ! for(int i = 0; i < children.length; i++) { ! children[i].setEnabled(x); } } /** * See readObject() and writeObject() in JComponent for more --- 751,762 ---- * false disables it */ public void setEnabled(boolean x) { super.setEnabled(x); Component[] children = getComponents(); ! for (Component child : children) { ! child.setEnabled(x); } } /** * See readObject() and writeObject() in JComponent for more
< prev index next >