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 420a96d276
commit b6a622c7ae
5 changed files with 20 additions and 0 deletions

View file

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

View file

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

View file

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

View file

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

View file

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