42 |
import java.awt.Font; |
import java.awt.Font; |
43 |
import java.awt.Insets; |
import java.awt.Insets; |
44 |
|
|
45 |
|
import javax.swing.LookAndFeel; |
46 |
import javax.swing.UIDefaults; |
import javax.swing.UIDefaults; |
47 |
|
import javax.swing.UIManager; |
48 |
import javax.swing.plaf.BorderUIResource; |
import javax.swing.plaf.BorderUIResource; |
49 |
import javax.swing.plaf.ColorUIResource; |
import javax.swing.plaf.ColorUIResource; |
50 |
import javax.swing.plaf.FontUIResource; |
import javax.swing.plaf.FontUIResource; |
604 |
} |
} |
605 |
|
|
606 |
/** |
/** |
607 |
* Sets the current theme for the look and feel. |
* Sets the current theme for the look and feel. Note that the theme must be |
608 |
|
* set <em>before</em> the look and feel is installed. To change the theme |
609 |
|
* for an already running application that is using the |
610 |
|
* {@link MetalLookAndFeel}, first set the theme with this method, then |
611 |
|
* create a new instance of {@link MetalLookAndFeel} and install it in the |
612 |
|
* usual way (see {@link UIManager#setLookAndFeel(LookAndFeel)}). |
613 |
* |
* |
614 |
* @param theme the theme. |
* @param theme the theme (<code>null</code> not permitted). |
615 |
|
* |
616 |
|
* @throws NullPointerException if <code>theme</code> is <code>null</code>. |
617 |
*/ |
*/ |
618 |
public static void setCurrentTheme(MetalTheme theme) |
public static void setCurrentTheme(MetalTheme theme) |
619 |
{ |
{ |
620 |
|
if (theme == null) |
621 |
|
throw new NullPointerException("Null 'theme' not permitted."); |
622 |
MetalLookAndFeel.theme = theme; |
MetalLookAndFeel.theme = theme; |
623 |
} |
} |
624 |
|
|