|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.fopps.model.ProjectContainer
Class ProjectContainer acts as a container for all projects.
| Field Summary | |
static ProjectItem |
DUMMY
|
| Constructor Summary | |
ProjectContainer()
|
|
| Method Summary | |
void |
addListener(ModelListener pListener)
Adds a listener |
void |
addProjects(ProjectItem pProjects)
Adds one element to association Projects |
void |
beginBatchUpdate()
Starts a batch update. |
int |
commitGhostRelations()
Change all existing ghost relations to 'real' relations |
void |
endBatchUpdate()
Finish a batch update and issues all queued events. |
protected void |
fireProjectAdded(ProjectItem pItem)
Fires 'added' event |
protected void |
fireProjectChanged(ProjectItem pItem)
Fires 'changed' event |
protected void |
fireProjectRemoved(ProjectItem pItem)
Fires 'removed' event |
void |
fixTimings()
Fixes timings for all projects in container. |
java.util.List |
getAssets()
Returns all assets of the container |
int |
getIndexOfProject(ProjectItem pItem)
Return the position of a given project item in the container. |
int |
getOffsetInMonths()
Returns the offset in months (from start until now) for this container |
java.util.List |
getProducts()
Returns all products of the container |
ProjectItem |
getProjectAt(int index)
|
java.util.List |
getProjects()
Getter Association Projects |
int |
getStartYear()
|
int |
getTotalDuration()
Returns the total duration of all projects in months |
boolean |
isBlockEvents()
|
void |
modelChanged(ModelEvent ev)
Handler for change events of projects |
boolean |
moveDown(ProjectItem pItem)
Moves an item one position backwards |
boolean |
moveUp(ProjectItem pItem)
Moves an item one position forwards |
void |
notifyListeners(ModelEvent ev)
Notify all listeners |
java.util.Iterator |
projectIterator()
Returns an iterator for the project list. |
void |
removeAllListener()
Removes all listeners |
void |
removeAllProjects()
Removes one element to association Projects |
int |
removeGhostRelations()
Change all existing ghost relations to 'real' relations |
void |
removeListener(ModelListener pListener)
Removes a listener |
void |
removeProjects(ProjectItem pProjects)
Removes one element to association Projects |
void |
setBlockEvents(boolean blockEvents)
|
boolean |
setContainer(ProjectContainer pContainer)
|
void |
setProjects(java.util.Collection pProjects)
Setter Association Projects |
void |
setStartYear(int pStartYear)
Sets a new start year. |
int |
size()
Returns number of projects |
boolean |
swapPosition(ProjectItem p1,
ProjectItem p2)
Swaps positions of two items. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static ProjectItem DUMMY
| Constructor Detail |
public ProjectContainer()
| Method Detail |
public int getStartYear()
public boolean isBlockEvents()
public void setBlockEvents(boolean blockEvents)
public void setStartYear(int pStartYear)
pStartYear - Start year to set (e. g. 2000 for year 2000. Easy, eh?)public int removeGhostRelations()
public int commitGhostRelations()
public void fixTimings()
ProjectItem#fixTiming(int,boolean)public void beginBatchUpdate()
NoteYou have to call endBatchUpdate() to finish tha update correctly. So you shold enclose your
update operations in a try..finally block.
public void endBatchUpdate()
beginBatchUpdate() before
public java.util.List getProducts()
public java.util.List getAssets()
public void addListener(ModelListener pListener)
public void removeListener(ModelListener pListener)
public void removeAllListener()
public void notifyListeners(ModelEvent ev)
public boolean setContainer(ProjectContainer pContainer)
public java.util.List getProjects()
public void setProjects(java.util.Collection pProjects)
public void addProjects(ProjectItem pProjects)
public void removeProjects(ProjectItem pProjects)
public void removeAllProjects()
public ProjectItem getProjectAt(int index)
public java.util.Iterator projectIterator()
public int size()
protected void fireProjectChanged(ProjectItem pItem)
protected void fireProjectRemoved(ProjectItem pItem)
protected void fireProjectAdded(ProjectItem pItem)
public void modelChanged(ModelEvent ev)
modelChanged in interface ModelListenerev - Occurred eventModelEventpublic int getIndexOfProject(ProjectItem pItem)
pItem - Item to search for
public int getTotalDuration()
public int getOffsetInMonths()
public boolean swapPosition(ProjectItem p1,
ProjectItem p2)
public boolean moveUp(ProjectItem pItem)
pItem - Item to move up
public boolean moveDown(ProjectItem pItem)
pItem - Item to move up
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||