public class DefaultMetalTheme extends MetalTheme
MetalTheme の具象実装です。デフォルトのテーマの変更方法については、MetalLookAndFeel.setCurrentTheme(javax.swing.plaf.metal.MetalTheme) を参照してください。
DefaultMetalTheme によって返されるすべての色は完全に不透明です。
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 以降、すべての JavaBeansTM 用の長期間の格納サポートが java.beans パッケージに追加されています。XMLEncoder を参照してください。
| コンストラクタと説明 |
|---|
DefaultMetalTheme()
DefaultMetalTheme のインスタンスを生成し、それを返します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
FontUIResource |
getControlTextFont()
コントロールテキストフォントを返します。
|
FontUIResource |
getMenuTextFont()
メニューテキストフォントを返します。
|
String |
getName()
このテーマの名前を返します。
|
protected ColorUIResource |
getPrimary1()
Primary 1 カラーを返します。
|
protected ColorUIResource |
getPrimary2()
Primary 2 カラーを返します。
|
protected ColorUIResource |
getPrimary3()
Primary 3 カラーを返します。
|
protected ColorUIResource |
getSecondary1()
Secondary 1 カラーを返します。
|
protected ColorUIResource |
getSecondary2()
Secondary 2 カラーを返します。
|
protected ColorUIResource |
getSecondary3()
Secondary 3 カラーを返します。
|
FontUIResource |
getSubTextFont()
サブテキストフォントを返します。
|
FontUIResource |
getSystemTextFont()
システムテキストフォントを返します。
|
FontUIResource |
getUserTextFont()
ユーザーテキストフォントを返します。
|
FontUIResource |
getWindowTitleFont()
ウィンドウタイトルフォントを返します。
|
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, getWindowTitleInactiveForegroundpublic String getName()
"Steel" を返します。getName、クラス: MetalThemeprotected ColorUIResource getPrimary1()
getPrimary1、クラス: MetalThemeprotected ColorUIResource getPrimary2()
getPrimary2、クラス: MetalThemeprotected ColorUIResource getPrimary3()
getPrimary3、クラス: MetalThemeprotected ColorUIResource getSecondary1()
getSecondary1、クラス: MetalThemeprotected ColorUIResource getSecondary2()
getSecondary2、クラス: MetalThemeprotected ColorUIResource getSecondary3()
getSecondary3、クラス: MetalThemepublic FontUIResource getControlTextFont()
getControlTextFont、クラス: MetalThemepublic FontUIResource getSystemTextFont()
getSystemTextFont、クラス: MetalThemepublic FontUIResource getUserTextFont()
getUserTextFont、クラス: MetalThemepublic FontUIResource getMenuTextFont()
getMenuTextFont、クラス: MetalThemepublic FontUIResource getWindowTitleFont()
getWindowTitleFont、クラス: MetalThemepublic FontUIResource getSubTextFont()
getSubTextFont、クラス: MetalTheme バグまたは機能を送信
詳細な API リファレンスおよび開発者ドキュメントについては、Java SE のドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.