|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--javax.swing.plaf.ComponentUI | +--javax.swing.plaf.TreeUI | +--javax.swing.plaf.basic.BasicTreeUI | +--javax.swing.plaf.metal.MetalTreeUI
MetalTreeUI は、カスタマイズに使用するクライアントプロパティの「値の追加」システムをサポートしています。MetalTreeUI は、このシステムを使用してライン描画のスタイルを決定します。ラインの描画スタイルには、3 つの選択肢があります。1 つ目は、ラインを描画しないデフォルトの描画スタイルです。2 つ目は、親から子へ延びる角度付きの脚を持つ描画スタイルです。3 つ目は、水平線だけを描画するオプションです。次に角度付きの脚をオンにするコードを示します。
tree.putClientProperty("JTree.lineStyle", "Angled");
次にルートとノードの間の水平線をオンにするコードを示します。
tree.putClientProperty("JTree.lineStyle", "Horizontal");
次にすべての線をオフにするコードを示します (デフォルト)。
tree.putClientProperty("JTree.lineStyle", "None");
コンストラクタの概要 | |
MetalTreeUI()
|
メソッドの概要 | |
static ComponentUI |
createUI(JComponent x)
|
protected void |
decodeLineStyle(Object lineStyleFlag)
クライアントプロパティに渡された文字列と内部表現 (currently および int) との間の変換を行います。 |
protected int |
getHorizontalLegBuffer()
ノード間の脚の水平要素は、デフォルトでは子ノードの左側の右で始まります。 |
void |
installUI(JComponent c)
|
protected boolean |
isLocationInExpandControl(int row,
int rowLevel,
int mouseX,
int mouseY)
|
void |
paint(Graphics g,
JComponent c)
|
protected void |
paintHorizontalPartOfLeg(Graphics g,
Rectangle clipBounds,
Insets insets,
Rectangle bounds,
TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf)
脚の水平部分をペイントします。 |
protected void |
paintHorizontalSeparators(Graphics g,
JComponent c)
|
protected void |
paintVerticalPartOfLeg(Graphics g,
Rectangle clipBounds,
Insets insets,
TreePath path)
脚の垂直部分をペイントします。 |
void |
uninstallUI(JComponent c)
|
クラス javax.swing.plaf.ComponentUI から継承したメソッド |
contains, getAccessibleChild, getAccessibleChildrenCount, update |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public MetalTreeUI()
メソッドの詳細 |
public static ComponentUI createUI(JComponent x)
protected int getHorizontalLegBuffer()
BasicTreeUI
の記述: BasicTreeUI
内の getHorizontalLegBuffer
public void installUI(JComponent c)
BasicTreeUI
内の installUI
public void uninstallUI(JComponent c)
BasicTreeUI
内の uninstallUI
protected void decodeLineStyle(Object lineStyleFlag)
protected boolean isLocationInExpandControl(int row, int rowLevel, int mouseX, int mouseY)
public void paint(Graphics g, JComponent c)
BasicTreeUI
内の paint
protected void paintHorizontalSeparators(Graphics g, JComponent c)
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
BasicTreeUI
の記述: clipBounds
や insets
を変更することは許されません。
BasicTreeUI
内の paintVerticalPartOfLeg
protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
BasicTreeUI
の記述: clipBounds
や insets
を変更することは許されません。
注: ルートが可視でない場合、parentRow
は -1 になることがあります。
BasicTreeUI
内の paintHorizontalPartOfLeg
|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.