|
||||||||||
| 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.ArrayList
databionics.project.Project
public class Project
A Project contains a collection of file slots and the history of jobs. One slot holds one or more filenames and one BDMFile.
| Field Summary | |
|---|---|
protected java.util.List |
changeListeners
List with all classes, which are informed when the files in this project have changed |
protected boolean |
clean
flag for a new project - to ask for a name when saving |
protected java.lang.String |
description
description of the project |
protected java.util.List |
history
list with finished and active jobs |
static java.lang.String |
lineSeparator
the line separator used for writing a xml-document |
protected static org.apache.log4j.Logger |
log
log4j logging |
protected Modules |
modules
list of modules with tools needed for loading |
protected java.lang.String |
name
name of the project |
protected boolean |
saved
flag whether anything has changed since the last saving |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
Project()
Default constructor |
|
| Method Summary | |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
Adds a class to the list of changeListeners |
void |
addFile(FileType type,
BaseFile file,
java.lang.String filename)
Add fileslot for file object and try to load file |
protected void |
fireChangeListener(javax.swing.event.ChangeEvent changeEvent)
Informs all classes contained in list changeListeners that something in this project has changed |
java.lang.String |
getDescription()
Get description of project |
BaseFile |
getFileData(FileType type)
Get data of first filename for slot with FileType type |
java.lang.String |
getFileName(FileType type)
Get first filename for slot with FileType type |
java.lang.String |
getFileName(FileType type,
int index)
Get a filename for slot with FileType type |
FileSlot |
getFileSlot(FileType type)
Get FileSlot for FileType type |
java.util.List |
getHistory()
Get history with executed jobs |
java.lang.String |
getName()
Get name of project |
boolean |
isClean()
Get boolean if project has to be named before saving |
boolean |
isSaved()
Get boolean if something has changed after last saving |
void |
load(java.io.InputStream in,
java.lang.String filename)
Load a project from a XML-File |
void |
load(java.lang.String filename)
Load a project from a XML-File |
void |
loadAllInDir(FileType type)
load all files in same directory as file in slot with FileType type |
void |
loadNewFromJob(Job job)
load all files possibly created by a job |
void |
newProject()
Creates a new project with empty filesets and empty history |
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
Removes a class of list with changeListeners |
void |
renameFileName(FileType type,
java.lang.String filename)
Rename filename for a filetype and fire ChangeEvent |
void |
reset()
Resets the project by invoking the methods: |
void |
reset(FileType type)
Reset slot |
void |
save(java.lang.String filename)
Saves a project in a XML-document |
void |
setClean(boolean bool)
Set if project has to be named before saving |
void |
setDescription(java.lang.String s)
Set project's description |
void |
setFileData(FileType type,
BaseFile file)
Set data for a filetype |
void |
setFileName(FileType type,
java.lang.String filename)
Set filename for a filetype and fire ChangeEvent |
void |
setModules(Modules m)
Set modules |
void |
setName(java.lang.String s)
Set project's name |
void |
setSaved(boolean bool)
Set if project has changed after last saving |
java.lang.String |
toXml()
XML representation of this project |
void |
useForAll(FileType type)
Use filename in slot with FileType type for all slots |
| Methods inherited from class java.util.ArrayList |
|---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, 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, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Field Detail |
|---|
protected static org.apache.log4j.Logger log
public static java.lang.String lineSeparator
protected java.lang.String name
protected java.lang.String description
protected java.util.List history
protected java.util.List changeListeners
protected boolean clean
protected boolean saved
protected Modules modules
| Constructor Detail |
|---|
public Project()
| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getDescription()
public java.util.List getHistory()
public boolean isClean()
public boolean isSaved()
public void setName(java.lang.String s)
s - new namepublic void setDescription(java.lang.String s)
s - new descriptionpublic void setClean(boolean bool)
bool - true means project is not yet namedpublic void setSaved(boolean bool)
bool - true means nothing has changed after last savingpublic void setModules(Modules m)
m - modules
public void addFile(FileType type,
BaseFile file,
java.lang.String filename)
file - file objectfilename: - path of filepublic FileSlot getFileSlot(FileType type)
type - FileType of the slotpublic java.lang.String getFileName(FileType type)
public java.lang.String getFileName(FileType type,
int index)
public void setFileName(FileType type,
java.lang.String filename)
type - of filefilename: - path of file
public void renameFileName(FileType type,
java.lang.String filename)
type - of filefilename: - new path of filepublic BaseFile getFileData(FileType type)
public void setFileData(FileType type,
BaseFile file)
type - of filedata - file objectpublic void useForAll(FileType type)
public void loadAllInDir(FileType type)
public void loadNewFromJob(Job job)
public void reset(FileType type)
type - FileType of the specified FileSlotpublic void reset()
public void load(java.lang.String filename)
filename - of the XML-file
public void load(java.io.InputStream in,
java.lang.String filename)
filename - of the XML-filepublic void newProject()
public void save(java.lang.String filename)
filename - the name of the file to be savedpublic void addChangeListener(javax.swing.event.ChangeListener listener)
listener - class which should be addedpublic void removeChangeListener(javax.swing.event.ChangeListener listener)
listener - class which should be removedprotected void fireChangeListener(javax.swing.event.ChangeEvent changeEvent)
changeEvent - public java.lang.String toXml()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||