ItEr33S14CUCreacionUnidadesPlanificacion: Renaming method and variables to show better intent

This commit is contained in:
Óscar González Fernández 2009-11-07 19:53:14 +01:00
parent 4feb07dd89
commit 4600b572ab
2 changed files with 8 additions and 6 deletions

View file

@ -118,10 +118,11 @@ public abstract class Task implements ITaskFundamentalProperties {
return fundamentalProperties.getLengthMilliseconds();
}
public void fireChangesForOldValues(Date oldBegin, long oldLength) {
public void fireChangesForPreviousValues(Date previousStart,
long previousLength) {
fundamentalPropertiesListeners.firePropertyChange("beginDate",
oldBegin, fundamentalProperties.getBeginDate());
fireLengthMilliseconds(oldLength);
previousStart, fundamentalProperties.getBeginDate());
fireLengthMilliseconds(previousLength);
}
public Date getBeginDate() {

View file

@ -128,10 +128,11 @@ public class ResourceAllocationModel implements IResourceAllocationModel {
}
private void doTheAllocation(AllocationResult allocationResult) {
Date oldBeginDate = ganttTask.getBeginDate();
long oldLength = ganttTask.getLengthMilliseconds();
Date previousStartDate = ganttTask.getBeginDate();
long previousLength = ganttTask.getLengthMilliseconds();
allocationResult.applyTo(task);
ganttTask.fireChangesForOldValues(oldBeginDate, oldLength);
ganttTask.fireChangesForPreviousValues(previousStartDate,
previousLength);
}
private List<Resource> getResourcesMatchingCriterions() {