Swing/DrawsTreeFocus のバックアップの現在との差分(No.3)
- category: swing folder: DrawsTreeFocus title: JTreeのノードがフォーカス状態になった場合のBorderを変更する tags: [JTree, UIManager, Border, Focus, LookAndFeel] author: aterai pubdate: 2014-06-16T01:26:31+09:00 description: JTreeのノードが選択されてフォーカス状態になった場合のBorderによる描画をUIManagerで変更します。 image:
概要
JTree
のノードが選択されてフォーカス状態になった場合のBorder
による描画をUIManager
で変更します。
概要
JTree
のノードが選択されてフォーカス状態になった場合のBorder
による描画をUIManager
で変更します。
Screenshot
Advertisement
サンプルコード
サンプルコード
UIManager.putBoolean("Tree.drawsFocusBorderAroundIcon", false);
UIManager.putBoolean("Tree.drawDashedFocusIndicator", false);
View in GitHub: Java, Kotlin解説
解説
Tree.drawsFocusBorderAroundIcon
-
ture
の場合、JTree
のノードアイコンを囲むようにBorder
が拡張される(背景色で塗りつぶされる範囲は変化しない) -
MotifLookAndFeel
の初期値はtrue
-
true
の場合JTree
のノードアイコンを囲むようにBorder
が拡張される- 背景色で塗りつぶされる範囲は変化しない
-
MotifLookAndFeel
での初期値はtrue
-
Tree.drawDashedFocusIndicator
-
ture
の場合、JTree
のフォーカスの描画に使用するBorder
が点線になる -
WindowsLookAndFeel
の初期値はtrue
-
true
の場合JTree
のフォーカスの描画に使用するBorder
が点線になる -
WindowsLookAndFeel
での初期値はtrue
-