< prev index next >
src/share/classes/javax/swing/JTabbedPane.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
*** 311,322 ****
* @return all of the <code>ChangeListener</code>s added or an empty
* array if no listeners have been added
* @since 1.4
*/
public ChangeListener[] getChangeListeners() {
! return (ChangeListener[])listenerList.getListeners(
! ChangeListener.class);
}
/**
* Sends a {@code ChangeEvent}, with this {@code JTabbedPane} as the source,
* to each registered listener. This method is called each time there is
--- 311,321 ----
* @return all of the <code>ChangeListener</code>s added or an empty
* array if no listeners have been added
* @since 1.4
*/
public ChangeListener[] getChangeListeners() {
! return listenerList.getListeners(ChangeListener.class);
}
/**
* Sends a {@code ChangeEvent}, with this {@code JTabbedPane} as the source,
* to each registered listener. This method is called each time there is
*** 2058,2068 ****
* Do initialization if the AccessibleJTabbedPane
* has been instantiated. We do not want to load
* Accessibility classes unnecessarily.
*/
AccessibleContext ac;
! ac = ((Accessible) component).getAccessibleContext();
if (ac != null) {
ac.setAccessibleParent(this);
}
}
}
--- 2057,2067 ----
* Do initialization if the AccessibleJTabbedPane
* has been instantiated. We do not want to load
* Accessibility classes unnecessarily.
*/
AccessibleContext ac;
! ac = component.getAccessibleContext();
if (ac != null) {
ac.setAccessibleParent(this);
}
}
}
< prev index next >