src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java

Print this page

        

@@ -118,11 +118,11 @@
     @Override
     protected void installDefaults() {
         updateStyle(comboBox);
     }
 
-    private void updateStyle(JComboBox comboBox) {
+    private void updateStyle(JComboBox<?> comboBox) {
         SynthStyle oldStyle = style;
         SynthContext context = getContext(comboBox, ENABLED);
 
         style = SynthLookAndFeel.updateStyle(context, this);
         if (style != oldStyle) {

@@ -218,11 +218,11 @@
         // but pass in a JTextField instead of JComboBox! In case this
         // happens, we just return the normal synth state for the component
         // instead of doing anything special
         if (!(c instanceof JComboBox)) return SynthLookAndFeel.getComponentState(c);
 
-        JComboBox box = (JComboBox)c;
+        JComboBox<?> box = (JComboBox)c;
         if (shouldActLikeButton()) {
             int state = ENABLED;
             if ((!c.isEnabled())) {
                 state = DISABLED;
             }

@@ -261,11 +261,11 @@
 
     /**
      * {@inheritDoc}
      */
     @Override
-    protected ListCellRenderer createRenderer() {
+    protected ListCellRenderer<Object> createRenderer() {
         return new SynthComboBoxRenderer();
     }
 
     /**
      * {@inheritDoc}

@@ -370,11 +370,11 @@
     /**
      * Paints the currently selected item.
      */
     @Override
     public void paintCurrentValue(Graphics g,Rectangle bounds,boolean hasFocus) {
-        ListCellRenderer renderer = comboBox.getRenderer();
+        ListCellRenderer<Object> renderer = comboBox.getRenderer();
         Component c;
 
         c = renderer.getListCellRendererComponent(
                 listBox, comboBox.getSelectedItem(), -1, false, false );
 

@@ -708,15 +708,15 @@
     /**
      * Handler for repainting combo when editor component gains/looses focus
      */
     private static class EditorFocusHandler implements FocusListener,
             PropertyChangeListener {
-        private JComboBox comboBox;
+        private JComboBox<?> comboBox;
         private ComboBoxEditor editor = null;
         private Component editorComponent = null;
 
-        private EditorFocusHandler(JComboBox comboBox) {
+        private EditorFocusHandler(JComboBox<?> comboBox) {
             this.comboBox = comboBox;
             editor = comboBox.getEditor();
             if (editor != null){
                 editorComponent = editor.getEditorComponent();
                 if (editorComponent != null){