|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.binding.beans.Model
com.jgoodies.skeleton.domain.Project
public class Project
References all relevant project data: the project description and a list of shafts. The shafts refer to their child components: segments and flanges
Constructor Summary | |
---|---|
Project(String name)
Constructs a Project with the given name and
and empty shaft list. |
Method Summary | |
---|---|
void |
addShaft(Shaft shaft)
Adds the given shaft to this project's shafts. |
Description |
getDescription()
|
String |
getFileName()
Returns the name of this project's associated filename, or "e;Unsaved"e; if it has no file associated. |
String |
getName()
|
List<Shaft> |
getShafts()
Returns an unmodifiable list of this project's shafts. |
boolean |
hasFile()
Checks and answers whether this project has an associated file as backing store. |
static Project |
readFrom(File f)
Reads, creates and returns a Project from the given File . |
void |
removeShaft(Shaft shaft)
Removes the given shaft from this project's shafts. |
void |
save()
Saves this project to its associated File . |
void |
saveAs(File aFile)
Saves this project to the given File . |
String |
toString()
Returns a string representation for this project. |
Methods inherited from class com.jgoodies.binding.beans.Model |
---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Project(String name)
Project
with the given name and
and empty shaft list.
name
- the project's nameMethod Detail |
---|
public String getName()
public Description getDescription()
public List<Shaft> getShafts()
public void addShaft(Shaft shaft)
shaft
- the shaft to addpublic void removeShaft(Shaft shaft)
shaft
- the shaft to removepublic static Project readFrom(File f)
File
.A real app would parse the file.
f
- the file to read the project from
public void save()
File
.
public void saveAs(File aFile)
File
.
aFile
- the file to save topublic boolean hasFile()
public String getFileName()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |