Swing/SystemExtensionHiding のバックアップソース(No.1)
- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- バックアップ を表示
- Swing/SystemExtensionHiding へ行く。
--- category: swing folder: SystemExtensionHiding title: JFileChooserでローカライズされたシステムフォルダ名を使用しないよう設定 tags: [JFileChooser, WindowsLookAndFeel] author: aterai pubdate: 2017-05-15T16:03:21+09:00 description: JFileChooserのPlacesBarでローカライズされたシステムフォルダ名が表示されないように設定します。 image: https://drive.google.com/uc?export=view&id=1tvYX3gC3OiwWr8vnG5346sqWtA5k3G29cg --- * 概要 [#summary] `JFileChooser`の`PlacesBar`でローカライズされたシステムフォルダ名が表示されないように設定します。 #download(https://drive.google.com/uc?export=view&id=1tvYX3gC3OiwWr8vnG5346sqWtA5k3G29cg) * サンプルコード [#sourcecode] #code(link){{ UIManager.put("FileChooser.useSystemExtensionHiding", Boolean.FALSE); }} * 解説 [#explanation] - `false` -- `JFileChooser`の`PlacesBar`でローカライズされたシステムフォルダ名を使用しない --- 例: 「最近使った項目」が「Recent」 --- 例: 「デスクトップ」が「Desktop」 --- 例: 「ドキュメント」が「Documents」 --- 「PC」と「ネットワーク」は変化しない --`PlacesBar`でのみ変化し、`JFileChooser`本体ではローカライズされた名前が使用される -- 起動直後か、`LookAndFeel`が変更された直後のみ切替が有効になる --- `JFileChooser`を生成し直しても内部の`FileSystemView`はインスタンスを引き継ぐため - `true` -- `WindowsLookAndFeel`のデフォルト -- `JFileChooser`の`PlacesBar`でローカライズされたシステムフォルダ名が使用される * 参考リンク [#reference] - [[JFileChooserのPlacesBarを非表示にする>Swing/NoPlacesBarFileChooser]] * コメント [#comment] #comment #comment