1 7 package javax.swing.plaf.synth; 8 9 import sun.swing.DefaultLookup; 10 import javax.swing.JComponent ; 11 import javax.swing.plaf.ComponentUI ; 12 import sun.swing.plaf.synth.SynthUI; 13 14 20 class SynthDefaultLookup extends DefaultLookup { 21 public Object getDefault(JComponent c, ComponentUI ui, String key) { 22 if (!(ui instanceof SynthUI)) { 23 Object value = super.getDefault(c, ui, key); 24 return value; 25 } 26 SynthContext context = ((SynthUI)ui).getContext(c); 27 Object value = context.getStyle().get(context, key); 28 context.dispose(); 29 return value; 30 } 31 } 32 | Popular Tags |