public class FileSystemListModel extends Object implements net.sf.jguiraffe.gui.builder.components.model.ListModel
A ListModel
implementation for the roots of the available file
systems.
In the main window there is a combobox that allows the user to select a file
system whose content is then displayed by the file system browser. This class
is the underlying model of this combobox. At construction time it determines
the available file system roots. The methods defined by the ListModel
interface are implemented on these root objects. As values the corresponding
java.io.File
objects are returned. As display names the file names
are used.
Constructor and Description |
---|
FileSystemListModel()
Creates a new instance of
FileSystemListModel . |
Modifier and Type | Method and Description |
---|---|
Object |
getDisplayObject(int index)
Returns the display object at the given index.
|
Class<?> |
getType()
Returns the data type of the model elements.
|
Object |
getValueObject(int index)
Returns the value object at the given index.
|
int |
size()
Returns the size of this model.
|
public FileSystemListModel()
FileSystemListModel
.public Object getDisplayObject(int index)
java.io.File
representing the file system
root at the given index.getDisplayObject
in interface net.sf.jguiraffe.gui.builder.components.model.ListModel
index
- the indexpublic Class<?> getType()
java.io.File
is the data type.getType
in interface net.sf.jguiraffe.gui.builder.components.model.ListModel
public Object getValueObject(int index)
java.io.File
object representing the file system root at the
given index.getValueObject
in interface net.sf.jguiraffe.gui.builder.components.model.ListModel
index
- the indexpublic int size()
size
in interface net.sf.jguiraffe.gui.builder.components.model.ListModel
Copyright © 2016 The JGUIraffe Team. All Rights Reserved.