jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthPanelUI.java
changeset 37698 4d798c873df0
parent 25859 3317bb8137f4
equal deleted inserted replaced
37697:9bdfdb90249b 37698:4d798c873df0
   106     @Override
   106     @Override
   107     protected void uninstallDefaults(JPanel p) {
   107     protected void uninstallDefaults(JPanel p) {
   108         SynthContext context = getContext(p, ENABLED);
   108         SynthContext context = getContext(p, ENABLED);
   109 
   109 
   110         style.uninstallDefaults(context);
   110         style.uninstallDefaults(context);
   111         context.dispose();
       
   112         style = null;
   111         style = null;
   113     }
   112     }
   114 
   113 
   115     private void updateStyle(JPanel c) {
   114     private void updateStyle(JPanel c) {
   116         SynthContext context = getContext(c, ENABLED);
   115         SynthContext context = getContext(c, ENABLED);
   117         style = SynthLookAndFeel.updateStyle(context, this);
   116         style = SynthLookAndFeel.updateStyle(context, this);
   118         context.dispose();
       
   119     }
   117     }
   120 
   118 
   121     /**
   119     /**
   122      * {@inheritDoc}
   120      * {@inheritDoc}
   123      */
   121      */
   152 
   150 
   153         SynthLookAndFeel.update(context, g);
   151         SynthLookAndFeel.update(context, g);
   154         context.getPainter().paintPanelBackground(context,
   152         context.getPainter().paintPanelBackground(context,
   155                           g, 0, 0, c.getWidth(), c.getHeight());
   153                           g, 0, 0, c.getWidth(), c.getHeight());
   156         paint(context, g);
   154         paint(context, g);
   157         context.dispose();
       
   158     }
   155     }
   159 
   156 
   160     /**
   157     /**
   161      * Paints the specified component according to the Look and Feel.
   158      * Paints the specified component according to the Look and Feel.
   162      * <p>This method is not used by Synth Look and Feel.
   159      * <p>This method is not used by Synth Look and Feel.
   169     @Override
   166     @Override
   170     public void paint(Graphics g, JComponent c) {
   167     public void paint(Graphics g, JComponent c) {
   171         SynthContext context = getContext(c);
   168         SynthContext context = getContext(c);
   172 
   169 
   173         paint(context, g);
   170         paint(context, g);
   174         context.dispose();
       
   175     }
   171     }
   176 
   172 
   177     /**
   173     /**
   178      * Paints the specified component. This implementation does nothing.
   174      * Paints the specified component. This implementation does nothing.
   179      *
   175      *