src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java

Print this page

        

@@ -395,14 +395,14 @@
      * @since 1.6
      */
     protected boolean labelsHaveSameBaselines() {
         if (!checkedLabelBaselines) {
             checkedLabelBaselines = true;
-            Dictionary<?, JComponent> dictionary = slider.getLabelTable();
+            Dictionary<Integer, ? extends JComponent> dictionary = slider.getLabelTable();
             if (dictionary != null) {
                 sameLabelBaselines = true;
-                Enumeration<JComponent> elements = dictionary.elements();
+                Enumeration<? extends JComponent> elements = dictionary.elements();
                 int baseline = -1;
                 while (elements.hasMoreElements()) {
                     JComponent label = elements.nextElement();
                     Dimension pref = label.getPreferredSize();
                     int labelBaseline = label.getBaseline(pref.width,

@@ -751,11 +751,11 @@
             getHandler().propertyChange(e);
         }
     }
 
     protected int getWidthOfWidestLabel() {
-        Dictionary<?, JComponent> dictionary = slider.getLabelTable();
+        Dictionary<?, ? extends JComponent> dictionary = slider.getLabelTable();
         int widest = 0;
         if ( dictionary != null ) {
             Enumeration<?> keys = dictionary.keys();
             while ( keys.hasMoreElements() ) {
                 JComponent label = dictionary.get(keys.nextElement());

@@ -764,11 +764,11 @@
         }
         return widest;
     }
 
     protected int getHeightOfTallestLabel() {
-        Dictionary<?, JComponent> dictionary = slider.getLabelTable();
+        Dictionary<?, ? extends JComponent> dictionary = slider.getLabelTable();
         int tallest = 0;
         if ( dictionary != null ) {
             Enumeration<?> keys = dictionary.keys();
             while ( keys.hasMoreElements() ) {
                 JComponent label = dictionary.get(keys.nextElement());

@@ -869,11 +869,11 @@
      * @return smallest value that has an entry in the label table, or
      *         null.
      * @since 1.6
      */
     protected Integer getLowestValue() {
-        Dictionary<Integer, JComponent> dictionary = slider.getLabelTable();
+        Dictionary<Integer, ? extends JComponent> dictionary = slider.getLabelTable();
 
         if (dictionary == null) {
             return null;
         }
 

@@ -1119,11 +1119,11 @@
     }
 
     public void paintLabels( Graphics g ) {
         Rectangle labelBounds = labelRect;
 
-        Dictionary<Integer, JComponent> dictionary = slider.getLabelTable();
+        Dictionary<Integer, ? extends JComponent> dictionary = slider.getLabelTable();
         if ( dictionary != null ) {
             Enumeration<Integer> keys = dictionary.keys();
             int minValue = slider.getMinimum();
             int maxValue = slider.getMaximum();
             boolean enabled = slider.isEnabled();