|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<E>
java.util.LinkedList
databionics.project.FileSlot
public class FileSlot
A FileSlot holds several filenames for a FileType.
| Field Summary | |
|---|---|
protected boolean |
autoload
automatically load file when name is set |
protected BaseFile |
file
the data of the first file in this slot |
protected static org.apache.log4j.Logger |
log
log4j logging |
protected int |
max
maximum size of history |
protected FileType |
type
this slot contains filenames of this type |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
FileSlot()
Default constructor |
|
FileSlot(boolean autoload,
int max)
Constructor without type |
|
FileSlot(FileType type)
Constructor with type |
|
FileSlot(FileType type,
boolean autoload,
int max)
Constructor with all parameters |
|
| Method Summary | |
|---|---|
BaseFile |
getFile()
Get the file object |
int |
getMax()
|
java.lang.String |
getName()
Get the first filename in the slot |
java.lang.String |
getName(int index)
Get a filename |
FileType |
getType()
Get the file type |
boolean |
load()
Load the data of the first file in the slot |
void |
rename(java.lang.String filename)
Rename first file in this slot |
void |
reset()
empty the slot |
boolean |
save()
Save the data of the first file in the slot |
void |
setFile(BaseFile file)
Set the file object |
void |
setMax(int i)
sets the max number of history elements |
boolean |
setName(java.lang.String filename)
Add a file to this slot |
void |
setType(FileType t)
Set filetype |
java.lang.String |
toXml(java.lang.String dir)
write a fileSlot in a string in xml-format |
static FileSlot |
valueOf(org.w3c.dom.Element el,
java.lang.String dir)
load a slot out of the xml-tag |
| Methods inherited from class java.util.LinkedList |
|---|
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, peek, poll, remove, remove, remove, removeFirst, removeLast, set, size, toArray, toArray |
| Methods inherited from class java.util.AbstractSequentialList |
|---|
iterator |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, listIterator, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, isEmpty, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
| Field Detail |
|---|
protected static org.apache.log4j.Logger log
protected FileType type
protected BaseFile file
protected boolean autoload
protected int max
| Constructor Detail |
|---|
public FileSlot()
public FileSlot(FileType type)
type - FileType of the slot
public FileSlot(boolean autoload,
int max)
autoload - flag whether data is loaded when name is setmax - maximum number of filename to remember
public FileSlot(FileType type,
boolean autoload,
int max)
type - FileType of the slotautoload - flag whether data is loaded when name is setmax - maximum number of filename to remember| Method Detail |
|---|
public FileType getType()
public void setType(FileType t)
t - -
corresponing FileTypepublic java.lang.String getName(int index)
index - of the file in the slot
public java.lang.String getName()
public BaseFile getFile()
public void setFile(BaseFile file)
public boolean setName(java.lang.String filename)
filename - -
path of the file return if autoload is true success of loading
otherwise truepublic void rename(java.lang.String filename)
filename - -
new file pathpublic boolean load()
public boolean save()
public void reset()
public static FileSlot valueOf(org.w3c.dom.Element el,
java.lang.String dir)
el - -
Element of the xml-document
public java.lang.String toXml(java.lang.String dir)
public int getMax()
public void setMax(int i)
i -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||