java.lang.Object
javax.swing.plaf.metal.MetalTheme
javax.swing.plaf.metal.DefaultMetalTheme
- 直系の既知のサブクラス:
- OceanTheme
public class DefaultMetalTheme extends MetalTheme
Java Look & Feelのオリジナルの外観(コード名Steel)を提供する
MetalThemeの具象実装です。 デフォルトのテーマの変更方法については、MetalLookAndFeel.setCurrentTheme(javax.swing.plaf.metal.MetalTheme)を参照してください。 
 
 DefaultMetalThemeによって返されるすべての色は完全に不透明です。
 
Font Style
DefaultMetalThemeは、多くのコントロールで太字フォントを使用します。 すべてのコントロール(内部フレームのタイトルやクライアントで装飾したフレームのタイトル・バーを除く)がプレーン・フォントを使用するようにするには、次のいずれかを行います。 
 - システム・プロパティswing.boldMetalをfalseに設定します。 たとえば、java -Dswing.boldMetal=false MyAppです。
- デフォルト・プロパティswing.boldMetalをBoolean.FALSEに設定します。 たとえば、UIManager.put("swing.boldMetal", Boolean.FALSE);
swing.boldMetalを設定すると、同じ名前のシステム・プロパティよりも優先して使用されます。 デフォルト・プロパティを設定したあとはMetalLookAndFeelを再インストールし、以前に作成したウィジェットのUIをすべて更新する必要があります。 そうしない場合は結果が定義できません。 次に、この方法を示します。 
 
   // turn off bold fonts
   UIManager.put("swing.boldMetal", Boolean.FALSE);
   // re-install the Metal Look and Feel
   UIManager.setLookAndFeel(new MetalLookAndFeel());
   // Update the ComponentUIs for all Components. This
   // needs to be invoked for all windows.
   SwingUtilities.updateComponentTreeUI(rootComponent);
 
 
 警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4以降、すべてのJavaBeans™用の長期間の格納サポートがjava.beansパッケージに追加されています。 XMLEncoderを参照してください。 
- 
コンストラクタのサマリーコンストラクタ コンストラクタ 説明 DefaultMetalTheme()DefaultMetalThemeのインスタンスを生成し、それを返します。
- 
メソッドのサマリー修飾子と型 メソッド 説明 FontUIResourcegetControlTextFont()コントロール・テキスト・フォントを返します。FontUIResourcegetMenuTextFont()メニュー・テキスト・フォントを返します。StringgetName()このテーマの名前を返します。protected ColorUIResourcegetPrimary1()Primary 1カラーを返します。protected ColorUIResourcegetPrimary2()Primary 2カラーを返します。protected ColorUIResourcegetPrimary3()Primary 3カラーを返します。protected ColorUIResourcegetSecondary1()Secondary 1カラーを返します。protected ColorUIResourcegetSecondary2()Secondary 2カラーを返します。protected ColorUIResourcegetSecondary3()Secondary 3カラーを返します。FontUIResourcegetSubTextFont()サブテキスト・フォントを返します。FontUIResourcegetSystemTextFont()システム・テキスト・フォントを返します。FontUIResourcegetUserTextFont()ユーザー・テキスト・フォントを返します。FontUIResourcegetWindowTitleFont()ウィンドウ・タイトル・フォントを返します。クラス javax.swing.plaf.metal.MetalThemeで宣言されたメソッドaddCustomEntriesToTable, getAcceleratorForeground, getAcceleratorSelectedForeground, getBlack, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getDesktopColor, getFocusColor, getHighlightedTextColor, getInactiveControlTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSystemTextColor, getTextHighlightColor, getUserTextColor, getWhite, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground
- 
コンストラクタの詳細- 
DefaultMetalThemepublic DefaultMetalTheme()DefaultMetalThemeのインスタンスを生成し、それを返します。
 
- 
- 
メソッドの詳細- 
getNamepublic String getName()このテーマの名前を返します。 これは"Steel"を返します。- 定義:
- getName、クラス:- MetalTheme
- 戻り値:
- このテーマの名前。
 
- 
getPrimary1protected ColorUIResource getPrimary1()Primary 1カラーを返します。 これは、それぞれRGB値(102, 102, 153)の色を返します。- 定義:
- getPrimary1、クラス:- MetalTheme
- 戻り値:
- Primary 1カラー
 
- 
getPrimary2protected ColorUIResource getPrimary2()Primary 2カラーを返します。 これは、それぞれRGB値(153, 153, 204)の色を返します。- 定義:
- getPrimary2、クラス:- MetalTheme
- 戻り値:
- Primary 2カラー
 
- 
getPrimary3protected ColorUIResource getPrimary3()Primary 3カラーを返します。 これは、それぞれRGB値(204, 204, 255)の色を返します。- 定義:
- getPrimary3、クラス:- MetalTheme
- 戻り値:
- Primary 3カラー
 
- 
getSecondary1protected ColorUIResource getSecondary1()Secondary 1カラーを返します。 これは、それぞれRGB値(102, 102, 102)の色を返します。- 定義:
- getSecondary1、クラス:- MetalTheme
- 戻り値:
- Secondary 1カラー
 
- 
getSecondary2protected ColorUIResource getSecondary2()Secondary 2カラーを返します。 これは、それぞれRGB値(153, 153, 153)の色を返します。- 定義:
- getSecondary2、クラス:- MetalTheme
- 戻り値:
- Secondary 2カラー
 
- 
getSecondary3protected ColorUIResource getSecondary3()Secondary 3カラーを返します。 これは、それぞれRGB値(204, 204, 204)の色を返します。- 定義:
- getSecondary3、クラス:- MetalTheme
- 戻り値:
- Secondary 3カラー
 
- 
getControlTextFontpublic FontUIResource getControlTextFont()コントロール・テキスト・フォントを返します。 これは、「Dialog, 12pt」を返します。 「フォント・スタイル」の説明どおりプレーン・フォントが有効になっている場合、フォント・スタイルはプレーンになります。 それ以外の場合、フォント・スタイルは太字です。- 定義:
- getControlTextFont、クラス:- MetalTheme
- 戻り値:
- コントロール・テキスト・フォント
 
- 
getSystemTextFontpublic FontUIResource getSystemTextFont()システム・テキスト・フォントを返します。 これは、「Dialog, 12pt, plain」を返します。- 定義:
- getSystemTextFont、クラス:- MetalTheme
- 戻り値:
- システム・テキスト・フォント
 
- 
getUserTextFontpublic FontUIResource getUserTextFont()ユーザー・テキスト・フォントを返します。 これは、「Dialog, 12pt, plain」を返します。- 定義:
- getUserTextFont、クラス:- MetalTheme
- 戻り値:
- ユーザー・テキスト・フォント
 
- 
getMenuTextFontpublic FontUIResource getMenuTextFont()メニュー・テキスト・フォントを返します。 これは、「Dialog, 12pt」を返します。 「フォント・スタイル」の説明どおりプレーン・フォントが有効になっている場合、フォント・スタイルはプレーンになります。 それ以外の場合、フォント・スタイルは太字です。- 定義:
- getMenuTextFont、クラス:- MetalTheme
- 戻り値:
- メニュー・テキスト・フォント
 
- 
getWindowTitleFontpublic FontUIResource getWindowTitleFont()ウィンドウ・タイトル・フォントを返します。 これは、「Dialog, 12pt, bold」を返します。- 定義:
- getWindowTitleFont、クラス:- MetalTheme
- 戻り値:
- ウィンドウ・タイトル・フォント
 
- 
getSubTextFontpublic FontUIResource getSubTextFont()サブテキスト・フォントを返します。 これは、「Dialog, 10pt, plain」を返します。- 定義:
- getSubTextFont、クラス:- MetalTheme
- 戻り値:
- サブテキスト・フォント
 
 
-