所有类


javax.swing.plaf.basic
类 BasicDirectoryModel

java.lang.Object
  继承者 javax.swing.AbstractListModel
      继承者 javax.swing.plaf.basic.BasicDirectoryModel
所有已实现的接口:
PropertyChangeListener, Serializable, EventListener, ListModel

public class BasicDirectoryModel
   
   
   
   
extends AbstractListModel
implements PropertyChangeListener

文件列表的基本实现。


字段摘要
 
从类 javax.swing.AbstractListModel 继承的字段
listenerList
 
构造方法摘要
BasicDirectoryModel(JFileChooser filechooser)
           
 
方法摘要
 booleancontains(Object o)
           
 voidfireContentsChanged()
           
 Vector<File>getDirectories()
           
 ObjectgetElementAt(int index)
          返回指定索引处的值。
 Vector<File>getFiles()
           
 intgetSize()
          返回列表的长度。
 intindexOf(Object o)
           
 voidintervalAdded(ListDataEvent e)
          废弃,不使用。
 voidintervalRemoved(ListDataEvent e)
          废弃,不使用。
 voidinvalidateFileCache()
          废弃,不使用。
protected  booleanlt(File a, File b)
           
 voidpropertyChange(PropertyChangeEvent e)
          在 bound 属性发生更改时调用此方法。
 booleanrenameFile(File oldFile, File newFile)
          重命名基础文件系统中的文件。
protected  voidsort(Vector<? extends File> v)
           
 voidvalidateFileCache()
           
 
从类 javax.swing.AbstractListModel 继承的方法
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

BasicDirectoryModel

public BasicDirectoryModel(JFileChooser filechooser)
方法详细信息

propertyChange

public void propertyChange(PropertyChangeEvent e)
从接口 PropertyChangeListener 复制的描述
在 bound 属性发生更改时调用此方法。

指定者:
接口 PropertyChangeListener 中的 propertyChange
参数:
e - 描述事件源和已更改的属性的 PropertyChangeEvent 对象。

invalidateFileCache

public void invalidateFileCache()
废弃,不使用。


getDirectories

public Vector<File> getDirectories()

getFiles

public Vector<File> getFiles()

validateFileCache

public void validateFileCache()

renameFile

public boolean renameFile(File oldFile,
                          File newFile)
重命名基础文件系统中的文件。

参数:
oldFile - 表示现有文件的 File 对象
newFile - 表示所需新文件名的 File 对象
返回:
如果重命名成功,则返回 true;否则返回 false
从以下版本开始:
1.4

fireContentsChanged

public void fireContentsChanged()