jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthDesktopIconUI.java
changeset 37698 4d798c873df0
parent 25859 3317bb8137f4
equal deleted inserted replaced
37697:9bdfdb90249b 37698:4d798c873df0
   119     }
   119     }
   120 
   120 
   121     private void updateStyle(JComponent c) {
   121     private void updateStyle(JComponent c) {
   122         SynthContext context = getContext(c, ENABLED);
   122         SynthContext context = getContext(c, ENABLED);
   123         style = SynthLookAndFeel.updateStyle(context, this);
   123         style = SynthLookAndFeel.updateStyle(context, this);
   124         context.dispose();
       
   125     }
   124     }
   126 
   125 
   127     /**
   126     /**
   128      * {@inheritDoc}
   127      * {@inheritDoc}
   129      */
   128      */
   130     @Override
   129     @Override
   131     protected void uninstallDefaults() {
   130     protected void uninstallDefaults() {
   132         SynthContext context = getContext(desktopIcon, ENABLED);
   131         SynthContext context = getContext(desktopIcon, ENABLED);
   133         style.uninstallDefaults(context);
   132         style.uninstallDefaults(context);
   134         context.dispose();
       
   135         style = null;
   133         style = null;
   136     }
   134     }
   137 
   135 
   138     /**
   136     /**
   139      * {@inheritDoc}
   137      * {@inheritDoc}
   169 
   167 
   170         SynthLookAndFeel.update(context, g);
   168         SynthLookAndFeel.update(context, g);
   171         context.getPainter().paintDesktopIconBackground(context, g, 0, 0,
   169         context.getPainter().paintDesktopIconBackground(context, g, 0, 0,
   172                                                   c.getWidth(), c.getHeight());
   170                                                   c.getWidth(), c.getHeight());
   173         paint(context, g);
   171         paint(context, g);
   174         context.dispose();
       
   175     }
   172     }
   176 
   173 
   177     /**
   174     /**
   178      * Paints the specified component according to the Look and Feel.
   175      * Paints the specified component according to the Look and Feel.
   179      * <p>This method is not used by Synth Look and Feel.
   176      * <p>This method is not used by Synth Look and Feel.
   186     @Override
   183     @Override
   187     public void paint(Graphics g, JComponent c) {
   184     public void paint(Graphics g, JComponent c) {
   188         SynthContext context = getContext(c);
   185         SynthContext context = getContext(c);
   189 
   186 
   190         paint(context, g);
   187         paint(context, g);
   191         context.dispose();
       
   192     }
   188     }
   193 
   189 
   194     /**
   190     /**
   195      * Paints the specified component. This implementation does nothing.
   191      * Paints the specified component. This implementation does nothing.
   196      *
   192      *