コード例 #1
0
ファイル: NimbusLookAndFeel.java プロジェクト: ronshapiro/j86
 /** Called by UIManager when this look and feel is uninstalled. */
 @Override
 public void uninitialize() {
   super.uninitialize();
   defaults.uninitialize();
   // clear all cached images to free memory
   ImageCache.getInstance().flush();
   UIManager.getDefaults().removePropertyChangeListener(defaultsListener);
 }
コード例 #2
0
ファイル: NimbusLookAndFeel.java プロジェクト: ronshapiro/j86
 /** Called by UIManager when this look and feel is installed. */
 @Override
 public void initialize() {
   super.initialize();
   defaults.initialize();
   // create synth style factory
   setStyleFactory(
       new SynthStyleFactory() {
         @Override
         public SynthStyle getStyle(JComponent c, Region r) {
           return defaults.getStyle(c, r);
         }
       });
 }
コード例 #3
0
ファイル: NimbusLookAndFeel.java プロジェクト: ronshapiro/j86
 /**
  * Gets the style associated with the given component and region. This will never return null. If
  * an appropriate component and region cannot be determined, then a default style is returned.
  *
  * @param c a non-null reference to a JComponent
  * @param r a non-null reference to the region of the component c
  * @return a non-null reference to a NimbusStyle.
  */
 public static NimbusStyle getStyle(JComponent c, Region r) {
   return (NimbusStyle) SynthLookAndFeel.getStyle(c, r);
 }