| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class BasicDirectoryModel extends AbstractListModel implements PropertyChangeListener
Basic implementation of a file list.
Field Summary |
---|
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
BasicDirectoryModel(JFileChooser filechooser) |
Method Summary | |
---|---|
void |
Adds a PropertyChangeListener to the listener list. |
boolean |
|
void |
|
protected void |
firePropertyChange(String propertyName, Object oldValue, Object newValue) Support for reporting bound property changes for boolean properties. |
Vector |
|
Object |
getElementAt(int index) |
Vector |
getFiles() |
PropertyChangeListener[] |
Returns an array of all the property change listeners registered on this component. |
int |
getSize() |
int |
|
void |
Obsolete - not used. |
void |
Obsolete - not used. |
void |
This method is used to interrupt file loading thread. |
protected boolean |
|
void |
|
void |
Removes a PropertyChangeListener from the listener list. |
boolean |
renameFile(File oldFile, File newFile) Renames a file in the underlying file system. |
protected void |
|
void |
|
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)
filechooser
Method Detail |
---|
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 addedpublic boolean contains(Object o)
o
public void fireContentsChanged()
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 valuepublic Vector getDirectories()
public Object getElementAt(int index)
index
public Vector getFiles()
public PropertyChangeListener[] getPropertyChangeListeners()
PropertyChangeListener
s
or an empty array if no property change
listeners are currently registeredpublic int getSize()
public int indexOf(Object o)
o
public void intervalAdded(ListDataEvent e)
e
public void intervalRemoved(ListDataEvent e)
e
public void invalidateFileCache()
protected boolean lt(File a, File b)
a
b
public void propertyChange(PropertyChangeEvent e)
e
public void removePropertyChangeListener(PropertyChangeListener listener)
If listener is null, no exception is thrown and no action is performed.
listener
- the PropertyChangeListener to be removedpublic boolean renameFile(File oldFile, File newFile)
oldFile
- a File
object representing
the existing filenewFile
- a File
object representing
the desired new file nametrue
if rename succeeded,
otherwise false
protected void sort(Vector v)
v
public void validateFileCache()
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |