|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.sciss.gui.PathList
public class PathList
Manages a list of paths and allows conversion to / from preferences value strings. This is used to manage the list of recently opened files.
Field Summary | |
---|---|
static java.lang.String |
KEY_USERPATHS
Value: Prefs key string representing the path list of a user's set favourite directories. |
Constructor Summary | |
---|---|
PathList(int capacity)
Creates a new empty PathList. |
|
PathList(int capacity,
java.util.prefs.Preferences prefs,
java.lang.String prefsKey)
Creates a new PathList reflecting a value in a Preferences object. |
Method Summary | |
---|---|
boolean |
addPathToHead(java.io.File path)
Inserts a new path at the head of the list. |
boolean |
addPathToTail(java.io.File path)
Adds a new path to the tail of the list. |
void |
clear()
Removes all paths from the list. |
boolean |
contains(java.io.File path)
Determines whether a particular path is included in the list |
int |
getCapacity()
|
java.io.File |
getPath(int index)
Returns a path at some index in the list |
int |
getPathCount()
Returns the number of paths stored in the list |
int |
indexOf(java.io.File path)
Determines whether a particular path is included in the list |
void |
remove(java.io.File path)
Removes a path |
void |
remove(int index)
Removes a path at some index in the list |
void |
setPath(int index,
java.io.File path)
Replaces a path at some index in the list |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String KEY_USERPATHS
Constructor Detail |
---|
public PathList(int capacity)
capacity
- maximum number of pathspublic PathList(int capacity, java.util.prefs.Preferences prefs, java.lang.String prefsKey)
capacity
- maximum number of pathsMethod Detail |
---|
public int getCapacity()
public int getPathCount()
public java.io.File getPath(int index)
index
- of the path to query, must
be smaller than getPathCount()
public void setPath(int index, java.io.File path)
index
- in the list whose path should
be replaced. must be smaller than
getPathCount()public void remove(int index)
index
- in the list whose path should
deleted. Paths following in the list
will be shifted accordingly. Must be
smaller than getPathCount()public void remove(java.io.File path)
path
- path which should
deleted. Paths following in the list
will be shifted accordingly.public boolean addPathToHead(java.io.File path)
path
- the path to insert
public boolean addPathToTail(java.io.File path)
path
- the path to insert
public void clear()
public boolean contains(java.io.File path)
path
- path to look for
public int indexOf(java.io.File path)
path
- path to look for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |