Bug #1343: Added method isRoot() to gantt tasks.

With this method we will be able to know which tasks are projects.

FEA: ItEr76S04BugFixing
This commit is contained in:
Jacobo Aragunde Pérez 2012-02-15 12:53:19 +01:00 committed by Lorenzo Tilve Álvaro
parent 76f10428e4
commit 2b3c74e320
5 changed files with 20 additions and 0 deletions

View file

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

View file

@ -109,4 +109,6 @@ public interface ITaskFundamentalProperties {
public boolean belongsClosedProject();
public boolean isRoot();
}

View file

@ -460,4 +460,8 @@ public abstract class Task implements ITaskFundamentalProperties {
return fundamentalProperties.belongsClosedProject();
}
public boolean isRoot() {
return fundamentalProperties.isRoot();
}
}

View file

@ -739,4 +739,8 @@ public abstract class TaskElement extends BaseEntity {
setAdvancePercentage(getOrderElement().getAdvancePercentage());
}
public Boolean isRoot() {
return (this.getParent() == null);
}
}

View file

@ -1112,6 +1112,11 @@ public class TaskElementAdapter {
return taskElement.belongsClosedProject();
}
@Override
public boolean isRoot() {
return taskElement.isRoot();
}
}
@Override