|
Préférences
Moteurs de recherche
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
javax.swing.plaf.basic
|
Field Summary |
---|
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
BasicDirectoryModel(JFileChooser filechooser)
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
boolean |
contains(Object o)
|
void |
fireContentsChanged()
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Support for reporting bound property changes for boolean properties. |
Vector<File> |
getDirectories()
|
Object |
getElementAt(int index)
Returns the value at the specified index. |
Vector<File> |
getFiles()
|
PropertyChangeListener[] |
getPropertyChangeListeners()
Returns an array of all the property change listeners registered on this component. |
int |
getSize()
Returns the length of the list. |
int |
indexOf(Object o)
|
void |
intervalAdded(ListDataEvent e)
Obsolete - not used. |
void |
intervalRemoved(ListDataEvent e)
Obsolete - not used. |
void |
invalidateFileCache()
This method is used to interrupt file loading thread. |
protected boolean |
lt(File a,
File b)
|
void |
propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
boolean |
renameFile(File oldFile,
File newFile)
Renames a file in the underlying file system. |
protected void |
sort(Vector<? extends File> v)
|
void |
validateFileCache()
|
Methods inherited from class javax.swing.AbstractListModel |
---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicDirectoryModel(JFileChooser filechooser)
Method Detail |
---|
public void propertyChange(PropertyChangeEvent e)
PropertyChangeListener
propertyChange
in interface PropertyChangeListener
e
- A PropertyChangeEvent object describing the event source
and the property that has changed.public void invalidateFileCache()
public Vector<File> getDirectories()
public Vector<File> getFiles()
public void validateFileCache()
public boolean renameFile(File oldFile, File newFile)
oldFile
- a File
object representing
the existing filenewFile
- a File
object representing
the desired new file name
true
if rename succeeded,
otherwise false
public void fireContentsChanged()
public int getSize()
ListModel
public boolean contains(Object o)
public int indexOf(Object o)
public Object getElementAt(int index)
ListModel
getElementAt
in interface ListModel
index
- the requested index
index
public void intervalAdded(ListDataEvent e)
public void intervalRemoved(ListDataEvent e)
protected void sort(Vector<? extends File> v)
protected boolean lt(File a, File b)
public void addPropertyChangeListener(PropertyChangeListener listener)
If listener
is null
,
no exception is thrown and no action is performed.
listener
- the property change listener to be addedremovePropertyChangeListener(java.beans.PropertyChangeListener)
,
getPropertyChangeListeners()
public void removePropertyChangeListener(PropertyChangeListener listener)
If listener is null, no exception is thrown and no action is performed.
listener
- the PropertyChangeListener to be removedaddPropertyChangeListener(java.beans.PropertyChangeListener)
,
getPropertyChangeListeners()
public PropertyChangeListener[] getPropertyChangeListeners()
PropertyChangeListener
s
or an empty array if no property change
listeners are currently registeredaddPropertyChangeListener(java.beans.PropertyChangeListener)
,
removePropertyChangeListener(java.beans.PropertyChangeListener)
,
PropertyChangeSupport.getPropertyChangeListeners()
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
propertyName
- the property whose value has changedoldValue
- the property's previous valuenewValue
- the property's new value