|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.swing.plaf.synth.SynthStyleFactory
public abstract class SynthStyleFactory
SynthStyle の取得に使用されるファクトリです。Synth の各 ComponentUI は、現在の SynthStyleFactory を呼び出して、それらが持っている個別の領域ごとに SynthStyle を取得します。
次の例では、Region に基づいて異なるスタイルを返すカスタムの SynthStyleFactory を作成します。
class MyStyleFactory extends SynthStyleFactory {
public SynthStyle getStyle(JComponent c, Region id) {
if (id == Region.BUTTON) {
return buttonStyle;
}
else if (id == Region.TREE) {
return treeStyle;
}
return defaultStyle;
}
}
SynthLookAndFeel laf = new SynthLookAndFeel();
UIManager.setLookAndFeel(laf);
SynthLookAndFeel.setStyleFactory(new MyStyleFactory());
SynthStyleFactory,
SynthStyle| コンストラクタの概要 | |
|---|---|
SynthStyleFactory()
SynthStyleFactory を作成します。 |
|
| メソッドの概要 | |
|---|---|
abstract SynthStyle |
getStyle(JComponent c,
Region id)
指定された Component のスタイルを返します。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public SynthStyleFactory()
SynthStyleFactory を作成します。
| メソッドの詳細 |
|---|
public abstract SynthStyle getStyle(JComponent c,
Region id)
c - 要求されるコンポーネントid - Region 識別子
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。