ItEr47S11CUVisualizacionResponsabilidadesTRaballoNaPlanificacionItEr46S12: Exposing can be explicitly resized property from TaskElements.

This commit is contained in:
Óscar González Fernández 2010-02-15 00:04:17 +01:00
parent 6887270711
commit 4cd35c0957
8 changed files with 36 additions and 0 deletions

View file

@ -167,4 +167,9 @@ public class DefaultFundamentalProperties implements ITaskFundamentalProperties
return false;
}
@Override
public boolean canBeExplicitlyResized() {
return true;
}
}

View file

@ -78,4 +78,6 @@ public interface ITaskFundamentalProperties {
public boolean isSubcontracted();
public boolean canBeExplicitlyResized();
}

View file

@ -310,4 +310,8 @@ public abstract class Task implements ITaskFundamentalProperties {
return fundamentalProperties.isSubcontracted();
}
public boolean canBeExplicitlyResized() {
return fundamentalProperties.canBeExplicitlyResized();
}
}

View file

@ -483,4 +483,9 @@ public class Task extends TaskElement {
return calculatedValue != CalculatedValue.END_DATE;
}
@Override
public boolean canBeExplicitlyResized() {
return canBeResized() && !isSubcontracted();
}
}

View file

@ -239,6 +239,11 @@ public abstract class TaskElement extends BaseEntity {
protected abstract boolean canBeResized();
/**
* @return if this task can be resized by an explicit action
*/
public abstract boolean canBeExplicitlyResized();
public LocalDate getDeadline() {
return deadline;
}

View file

@ -142,4 +142,9 @@ public class TaskGroup extends TaskElement {
protected boolean canBeResized() {
return true;
}
@Override
public boolean canBeExplicitlyResized() {
return false;
}
}

View file

@ -119,4 +119,9 @@ public class TaskMilestone extends TaskElement {
protected boolean canBeResized() {
return false;
}
@Override
public boolean canBeExplicitlyResized() {
return false;
}
}

View file

@ -542,6 +542,11 @@ public class TaskElementAdapter implements ITaskElementAdapter {
reattachAllResourcesForTask();
}
@Override
public boolean canBeExplicitlyResized() {
return taskElement.canBeExplicitlyResized();
}
}
@Override