JavaTM Platform
Standard Ed. 6

javax.swing.plaf.basic
クラス BasicFileChooserUI

java.lang.Object
  上位を拡張 javax.swing.plaf.ComponentUI
      上位を拡張 javax.swing.plaf.FileChooserUI
          上位を拡張 javax.swing.plaf.basic.BasicFileChooserUI
直系の既知のサブクラス:
MetalFileChooserUI

public class BasicFileChooserUI
extends FileChooserUI

FileChooser の 基本 Look & Feel 実装です。


入れ子のクラスの概要
protected  class BasicFileChooserUI.AcceptAllFileFilter
           
protected  class BasicFileChooserUI.ApproveSelectionAction
          Open 要求または Save 要求に応えます。
protected  class BasicFileChooserUI.BasicFileView
           
protected  class BasicFileChooserUI.CancelSelectionAction
          取り消しの要求に応えます。
protected  class BasicFileChooserUI.ChangeToParentDirectoryAction
           
protected  class BasicFileChooserUI.DoubleClickListener
           
protected  class BasicFileChooserUI.GoHomeAction
          Home キーイベントまたは同等のイベントに従って処理を行います。
protected  class BasicFileChooserUI.NewFolderAction
          新しいフォルダを作成します。
protected  class BasicFileChooserUI.SelectionListener
           
protected  class BasicFileChooserUI.UpdateAction
          現在のディレクトリでファイルを走査し直します。
 
フィールドの概要
protected  int cancelButtonMnemonic
           
protected  String cancelButtonText
           
protected  String cancelButtonToolTipText
           
protected  Icon computerIcon
           
protected  Icon detailsViewIcon
           
protected  Icon directoryIcon
           
protected  int directoryOpenButtonMnemonic
          ディレクトリが選択され、現在の選択モードが FILES_ONLY である場合、同意ボタンで使用されるニーモニックキーコードです。
protected  String directoryOpenButtonText
          ディレクトリが選択され、現在の選択モードが FILES_ONLY である場合、同意ボタン上に表示されるラベルテキストです。
protected  String directoryOpenButtonToolTipText
          ディレクトリが選択され、現在の選択モードが FILES_ONLY である場合、同意ボタン上に表示されるツールヒントテキストです。
protected  Icon fileIcon
           
protected  Icon floppyDriveIcon
           
protected  Icon hardDriveIcon
           
protected  int helpButtonMnemonic
           
protected  String helpButtonText
           
protected  String helpButtonToolTipText
           
protected  Icon homeFolderIcon
           
protected  Icon listViewIcon
           
protected  Icon newFolderIcon
           
protected  int openButtonMnemonic
           
protected  String openButtonText
           
protected  String openButtonToolTipText
           
protected  int saveButtonMnemonic
           
protected  String saveButtonText
           
protected  String saveButtonToolTipText
           
protected  int updateButtonMnemonic
           
protected  String updateButtonText
           
protected  String updateButtonToolTipText
           
protected  Icon upFolderIcon
           
 
コンストラクタの概要
BasicFileChooserUI(JFileChooser b)
           
 
メソッドの概要
 void clearIconCache()
           
protected  MouseListener createDoubleClickListener(JFileChooser fc, JList list)
           
 ListSelectionListener createListSelectionListener(JFileChooser fc)
           
protected  void createModel()
           
 PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
           
 void ensureFileIsVisible(JFileChooser fc, File f)
           
 FileFilter getAcceptAllFileFilter(JFileChooser fc)
          デフォルトで認められるすべてのファイルフィルタを返します。
 JPanel getAccessoryPanel()
           
protected  JButton getApproveButton(JFileChooser fc)
           
 int getApproveButtonMnemonic(JFileChooser fc)
           
 String getApproveButtonText(JFileChooser fc)
           
 String getApproveButtonToolTipText(JFileChooser fc)
           
 Action getApproveSelectionAction()
           
 Action getCancelSelectionAction()
           
 Action getChangeToParentDirectoryAction()
           
 String getDialogTitle(JFileChooser fc)
          このダイアログのタイトルを返します。
protected  File getDirectory()
          現在、UI で選択されているディレクトリを記憶するためのプロパティーです。
 String getDirectoryName()
           
 JFileChooser getFileChooser()
           
 String getFileName()
           
 FileView getFileView(JFileChooser fc)
           
 Action getGoHomeAction()
           
 BasicDirectoryModel getModel()
           
 Action getNewFolderAction()
           
 Action getUpdateAction()
           
 void installComponents(JFileChooser fc)
           
protected  void installDefaults(JFileChooser fc)
           
protected  void installIcons(JFileChooser fc)
           
protected  void installListeners(JFileChooser fc)
           
protected  void installStrings(JFileChooser fc)
           
 void installUI(JComponent c)
          Look & Feel に適した、指定されたコンポーネントを構成します。
protected  boolean isDirectorySelected()
          現在ディレクトリが UI で選択されているかどうかを記憶するためのプロパティーです。
 void rescanCurrentDirectory(JFileChooser fc)
           
protected  void setDirectory(File f)
          現在、UI で選択されているディレクトリを記憶するためのプロパティーです。
 void setDirectoryName(String dirname)
           
protected  void setDirectorySelected(boolean b)
          現在ディレクトリが UI で選択されているかどうかを記憶するためのプロパティーです。
 void setFileName(String filename)
           
 void uninstallComponents(JFileChooser fc)
           
protected  void uninstallDefaults(JFileChooser fc)
           
protected  void uninstallIcons(JFileChooser fc)
           
protected  void uninstallListeners(JFileChooser fc)
           
protected  void uninstallStrings(JFileChooser fc)
           
 void uninstallUI(JComponent c)
          installUI 時に、指定されたコンポーネントで構成された内容を取り消します。
 
クラス javax.swing.plaf.ComponentUI から継承されたメソッド
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

directoryIcon

protected Icon directoryIcon

fileIcon

protected Icon fileIcon

computerIcon

protected Icon computerIcon

hardDriveIcon

protected Icon hardDriveIcon

floppyDriveIcon

protected Icon floppyDriveIcon

newFolderIcon

protected Icon newFolderIcon

upFolderIcon

protected Icon upFolderIcon

homeFolderIcon

protected Icon homeFolderIcon

listViewIcon

protected Icon listViewIcon

detailsViewIcon

protected Icon detailsViewIcon

saveButtonMnemonic

protected int saveButtonMnemonic

openButtonMnemonic

protected int openButtonMnemonic

cancelButtonMnemonic

protected int cancelButtonMnemonic

updateButtonMnemonic

protected int updateButtonMnemonic

helpButtonMnemonic

protected int helpButtonMnemonic

directoryOpenButtonMnemonic

protected int directoryOpenButtonMnemonic
ディレクトリが選択され、現在の選択モードが FILES_ONLY である場合、同意ボタンで使用されるニーモニックキーコードです。

導入されたバージョン:
1.4

saveButtonText

protected String saveButtonText

openButtonText

protected String openButtonText

cancelButtonText

protected String cancelButtonText

updateButtonText

protected String updateButtonText

helpButtonText

protected String helpButtonText

directoryOpenButtonText

protected String directoryOpenButtonText
ディレクトリが選択され、現在の選択モードが FILES_ONLY である場合、同意ボタン上に表示されるラベルテキストです。

導入されたバージョン:
1.4

saveButtonToolTipText

protected String saveButtonToolTipText

openButtonToolTipText

protected String openButtonToolTipText

cancelButtonToolTipText

protected String cancelButtonToolTipText

updateButtonToolTipText

protected String updateButtonToolTipText

helpButtonToolTipText

protected String helpButtonToolTipText

directoryOpenButtonToolTipText

protected String directoryOpenButtonToolTipText
ディレクトリが選択され、現在の選択モードが FILES_ONLY である場合、同意ボタン上に表示されるツールヒントテキストです。

導入されたバージョン:
1.4
コンストラクタの詳細

BasicFileChooserUI

public BasicFileChooserUI(JFileChooser b)
メソッドの詳細

installUI

public void installUI(JComponent c)
クラス ComponentUI の記述:
Look & Feel に適した、指定されたコンポーネントを構成します。このメソッドは、ComponentUI インスタンスが、指定されたコンポーネントの UI 委譲としてインストールされているときに呼び出されます。このメソッドは、以下を含む Look & Feel 用のコンポーネントを完全に構成する必要があります。
  1. カラー、フォント、ボーダー、アイコン、不透明さなどすべてのデフォルトプロパティーの値をコンポーネントにインストールする。可能な場合は、クライアントプログラムによって初期化されたプロパティーの値をオーバーライドしてはならない
  2. 必要に応じて、コンポーネントに LayoutManager をインストールする
  3. 必要なサブコンポーネントを、コンポーネントに作成または追加する
  4. イベントリスナーを、コンポーネントに作成またはインストールする
  5. コンポーネントのプロパティーの変更を適切に検出し、応答するために、PropertyChangeListener をコンポーネントに作成またはインストールする
  6. キーボード UI (ニーモニック、トラバーサルなど) を、コンポーネントにインストールする
  7. 適切なインスタンスのデータを初期化する

オーバーライド:
クラス ComponentUI 内の installUI
パラメータ:
c - UI 委譲がインストールされているコンポーネント
関連項目:
ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

uninstallUI

public void uninstallUI(JComponent c)
クラス ComponentUI の記述:
installUI 時に、指定されたコンポーネントで構成された内容を取り消します。このメソッドは、指定されたコンポーネントの UI 委譲としての UIComponent インスタンスが削除されているときに呼び出されます。このメソッドは、installUI によって実行された構成を元に戻す必要があります。この場合、JComponent インスタンスをクリーンな状態 (余分なリスナーや、Look & Feel 固有のプロパティーオブジェクトが残らないように) にするよう十分注意してください。手順には次のものがあります。
  1. UI として設定されたすべてのボーダーを、コンポーネントから削除する
  2. UI として設定されたすべてのレイアウトマネージャーを、コンポーネントから削除する
  3. UI として追加されたすべてのサブコンポーネントを、コンポーネントから削除する
  4. UI として追加されたすべてのイベント/リスナーを、コンポーネントから削除する
  5. UI としてインストールされたすべてのキーボード UI を、コンポーネントから削除する
  6. GC 用に割り当てられたすべてのインスタンスのデータオブジェクトを無効にする

オーバーライド:
クラス ComponentUI 内の uninstallUI
パラメータ:
c - この UI 委譲を削除するコンポーネント。 この引数は通常無視されるが、 UI オブジェクトに状態がなく、複数のコンポーネントに共有されている場合は 使用されることがある
関連項目:
ComponentUI.installUI(javax.swing.JComponent), JComponent.updateUI()

installComponents

public void installComponents(JFileChooser fc)

uninstallComponents

public void uninstallComponents(JFileChooser fc)

installListeners

protected void installListeners(JFileChooser fc)

uninstallListeners

protected void uninstallListeners(JFileChooser fc)

installDefaults

protected void installDefaults(JFileChooser fc)

installIcons

protected void installIcons(JFileChooser fc)

installStrings

protected void installStrings(JFileChooser fc)

uninstallDefaults

protected void uninstallDefaults(JFileChooser fc)

uninstallIcons

protected void uninstallIcons(JFileChooser fc)

uninstallStrings

protected void uninstallStrings(JFileChooser fc)

createModel

protected void createModel()

getModel

public BasicDirectoryModel getModel()

createPropertyChangeListener

public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)

getFileName

public String getFileName()

getDirectoryName

public String getDirectoryName()

setFileName

public void setFileName(String filename)

setDirectoryName

public void setDirectoryName(String dirname)

rescanCurrentDirectory

public void rescanCurrentDirectory(JFileChooser fc)
定義:
クラス FileChooserUI 内の rescanCurrentDirectory

ensureFileIsVisible

public void ensureFileIsVisible(JFileChooser fc,
                                File f)
定義:
クラス FileChooserUI 内の ensureFileIsVisible

getFileChooser

public JFileChooser getFileChooser()

getAccessoryPanel

public JPanel getAccessoryPanel()

getApproveButton

protected JButton getApproveButton(JFileChooser fc)

getApproveButtonToolTipText

public String getApproveButtonToolTipText(JFileChooser fc)

clearIconCache

public void clearIconCache()

createDoubleClickListener

protected MouseListener createDoubleClickListener(JFileChooser fc,
                                                  JList list)

createListSelectionListener

public ListSelectionListener createListSelectionListener(JFileChooser fc)

isDirectorySelected

protected boolean isDirectorySelected()
現在ディレクトリが UI で選択されているかどうかを記憶するためのプロパティーです。

戻り値:
ディレクトリが現在選択されている場合 true
導入されたバージョン:
1.4

setDirectorySelected

protected void setDirectorySelected(boolean b)
現在ディレクトリが UI で選択されているかどうかを記憶するためのプロパティーです。通常、選択イベントで UI により呼び出されます。

パラメータ:
b - ディレクトリが現在選択されている場合
導入されたバージョン:
1.4

getDirectory

protected File getDirectory()
現在、UI で選択されているディレクトリを記憶するためのプロパティーです。

戻り値:
directory プロパティーの値
導入されたバージョン:
1.4
関連項目:
setDirectory(java.io.File)

setDirectory

protected void setDirectory(File f)
現在、UI で選択されているディレクトリを記憶するためのプロパティーです。通常、選択イベントで UI により呼び出されます。

パラメータ:
f - 現在選択されたディレクトリを表す File オブジェクト
導入されたバージョン:
1.4

getAcceptAllFileFilter

public FileFilter getAcceptAllFileFilter(JFileChooser fc)
デフォルトで認められるすべてのファイルフィルタを返します。

定義:
クラス FileChooserUI 内の getAcceptAllFileFilter

getFileView

public FileView getFileView(JFileChooser fc)
定義:
クラス FileChooserUI 内の getFileView

getDialogTitle

public String getDialogTitle(JFileChooser fc)
このダイアログのタイトルを返します。

定義:
クラス FileChooserUI 内の getDialogTitle

getApproveButtonMnemonic

public int getApproveButtonMnemonic(JFileChooser fc)

getApproveButtonText

public String getApproveButtonText(JFileChooser fc)
定義:
クラス FileChooserUI 内の getApproveButtonText

getNewFolderAction

public Action getNewFolderAction()

getGoHomeAction

public Action getGoHomeAction()

getChangeToParentDirectoryAction

public Action getChangeToParentDirectoryAction()

getApproveSelectionAction

public Action getApproveSelectionAction()

getCancelSelectionAction

public Action getCancelSelectionAction()

getUpdateAction

public Action getUpdateAction()

JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。