Swing/TreeExpandedIcon のバックアップ(No.2)
- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- ソース を表示
- Swing/TreeExpandedIcon へ行く。
- 1 (2010-05-31 (月) 15:21:37)
- 2 (2011-03-14 (月) 20:29:47)
- 3 (2013-01-01 (火) 16:27:01)
- 4 (2015-06-26 (金) 18:48:41)
- 5 (2017-03-17 (金) 13:46:11)
- 6 (2018-01-23 (火) 13:50:29)
- 7 (2020-01-15 (水) 18:37:26)
- 8 (2021-07-17 (土) 21:50:55)
- 9 (2025-01-03 (金) 08:57:02)
- 10 (2025-01-03 (金) 09:01:23)
- 11 (2025-01-03 (金) 09:02:38)
- 12 (2025-01-03 (金) 09:03:21)
- 13 (2025-01-03 (金) 09:04:02)
TITLE:JTreeの展開、折畳みアイコンを非表示にする
Posted by aterai at 2010-05-31
JTreeの展開、折畳みアイコンを非表示にする
JTreeの展開、折畳みアイコンを変更して非表示にします。
- &jnlp;
- &jar;
- &zip;
サンプルコード
Icon emptyIcon = new EmptyIcon();
UIManager.put("Tree.expandedIcon", new IconUIResource(emptyIcon));
UIManager.put("Tree.collapsedIcon", new IconUIResource(emptyIcon));
解説
上記のサンプルでは、サイズ0のIconをTree.expandedIcon, Tree.collapsedIcon として使用することで、それぞれ非表示になるように設定しています。