Package adams.gui.core
Class FileWrapperListModel
- java.lang.Object
-
- javax.swing.AbstractListModel<String>
-
- adams.gui.core.FileWrapperListModel
-
- All Implemented Interfaces:
Serializable
,ListModel<String>
public class FileWrapperListModel extends AbstractListModel<String>
List model for showing the files.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<FileObject>
m_Files
the files.protected boolean
m_ShowParentDirs
whether to show parent dirs.-
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description FileWrapperListModel(List<FileObject> files, boolean showParentDirs)
Initializes the model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getElementAt(int index)
Returns the element at the specified position.int
getSize()
Returns the number of files/elements.-
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
-
-
-
Field Detail
-
m_Files
protected List<FileObject> m_Files
the files.
-
m_ShowParentDirs
protected boolean m_ShowParentDirs
whether to show parent dirs.
-
-
Constructor Detail
-
FileWrapperListModel
public FileWrapperListModel(List<FileObject> files, boolean showParentDirs)
Initializes the model.- Parameters:
files
- the files to displayshowParentDirs
- true if to show parent dirs
-
-
Method Detail
-
getSize
public int getSize()
Returns the number of files/elements.- Returns:
- the number of elements
-
getElementAt
public String getElementAt(int index)
Returns the element at the specified position.- Parameters:
index
- the index- Returns:
- the element
-
-