本文整理汇总了Java中net.sf.memoranda.TaskList.hasParentTask方法的典型用法代码示例。如果您正苦于以下问题:Java TaskList.hasParentTask方法的具体用法?Java TaskList.hasParentTask怎么用?Java TaskList.hasParentTask使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.TaskList
的用法示例。
在下文中一共展示了TaskList.hasParentTask方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateTasksInfo
import net.sf.memoranda.TaskList; //导入方法依赖的package包/类
static String generateTasksInfo(Project p, CalendarDate date, Collection expandedTasks) {
TaskList tl;
if (p.getID().equals(CurrentProject.get().getID())) {
tl = CurrentProject.getTaskList();
} else {
tl = CurrentStorage.get().openTaskList(p);
}
String s = "";
int k = getProgress(tl);
if (k > -1) {
s += "<br>" + Local.getString("Total progress") + ": " + k + "%";
}
s += "</td></tr></table>\n";
Vector tasks = (Vector) tl.getActiveSubTasks(null, date);
if (tasks.size() == 0) {
s += "<p>" + Local.getString("No actual tasks") + ".</p>\n";
} else {
s += Local.getString("Actual tasks") + ":<br>\n<ul>\n";
// TaskSorter.sort(tasks, date, TaskSorter.BY_IMP_RATE); // TODO:
// configurable method
Collections.sort(tasks);
for (Iterator i = tasks.iterator(); i.hasNext();) {
Task t = (Task) i.next();
// Always show active tasks only on agenda page from now on.
// If it's not active, then it's probably "not on the agenda"
// isn't it?
// if(Context.get("SHOW_ACTIVE_TASKS_ONLY").equals(new
// Boolean(true))) {
// if (!((t.getStatus() == Task.ACTIVE) || (t.getStatus() ==
// Task.DEADLINE) || (t.getStatus() == Task.FAILED))) {
// continue;
// }
// }
// ignore if it's a sub-task, iterate over ROOT tasks here only
if (tl.hasParentTask(t.getID())) {
continue;
}
s = s + renderTask(p, date, tl, t, 0, expandedTasks);
if (expandedTasks.contains(t.getID())) {
s = s + expandRecursively(p, date, tl, t, expandedTasks, 1);
}
}
s += "\n</ul>\n";
}
// Util.debug("html for project " + p.getTitle() + " is\n" + s);
return s;
}
示例2: generateTasksInfo
import net.sf.memoranda.TaskList; //导入方法依赖的package包/类
static String generateTasksInfo(Project p, CalendarDate date, Collection expandedTasks) {
TaskList tl;
if (p.getID().equals(CurrentProject.get().getID())) {
tl = CurrentProject.getTaskList();
}
else {
tl = CurrentStorage.get().openTaskList(p);
}
String s = "";
int k = getProgress(tl);
if (k > -1) {
s += "<br>" + Local.getString("Total progress") + ": " + k + "%";
}
s += "</td></tr></table>\n";
Vector tasks = (Vector) tl.getActiveSubTasks(null,date);
if (tasks.size() == 0) {
s += "<p>" + Local.getString("No actual tasks") + ".</p>\n";
}
else {
s += Local.getString("Actual tasks") + ":<br>\n<ul>\n";
// TaskSorter.sort(tasks, date, TaskSorter.BY_IMP_RATE); // TODO: configurable method
Collections.sort(tasks);
for (Iterator i = tasks.iterator(); i.hasNext();) {
Task t = (Task) i.next();
// Always show active tasks only on agenda page from now on.
// If it's not active, then it's probably "not on the agenda" isn't it?
// if(Context.get("SHOW_ACTIVE_TASKS_ONLY").equals(new Boolean(true))) {
// if (!((t.getStatus() == Task.ACTIVE) || (t.getStatus() == Task.DEADLINE) || (t.getStatus() == Task.FAILED))) {
// continue;
// }
// }
// ignore if it's a sub-task, iterate over ROOT tasks here only
if (tl.hasParentTask(t.getID())) {
continue;
}
s = s + renderTask(p, date, tl, t, 0,expandedTasks);
if(expandedTasks.contains(t.getID())) {
s = s + expandRecursively(p,date,tl,t,expandedTasks,1);
}
}
s += "\n</ul>\n";
}
// Util.debug("html for project " + p.getTitle() + " is\n" + s);
return s;
}
示例3: generateTasksInfo
import net.sf.memoranda.TaskList; //导入方法依赖的package包/类
static String generateTasksInfo(Project p, CalendarDate date, Collection expandedTasks) {
TaskList tl;
if (p.getID().equals(CurrentProject.get().getID())) {
tl = CurrentProject.getTaskList();
} else {
tl = CurrentStorage.get().openTaskList(p);
}
String s = "";
int k = getProgress(tl);
if (k > -1) {
s += "<br>" + Local.getString("Total progress") + ": " + k + "%";
}
s += "</td></tr></table>\n";
Vector tasks = (Vector) tl.getActiveSubTasks(null, date);
if (tasks.size() == 0) {
s += "<p>" + Local.getString("No actual tasks") + ".</p>\n";
} else {
s += Local.getString("Actual tasks") + ":<br>\n<ul>\n";
// TaskSorter.sort(tasks, date, TaskSorter.BY_IMP_RATE); // TODO:
// configurable method
Collections.sort(tasks);
for (Iterator i = tasks.iterator(); i.hasNext();) {
Task t = (Task) i.next();
// Always show active tasks only on agenda page from now on.
// If it's not active, then it's probably "not on the agenda"
// isn't it?
// if(Context.get("SHOW_ACTIVE_TASKS_ONLY").equals(new
// Boolean(true))) {
// if (!((t.getStatus() == Task.ACTIVE) || (t.getStatus() ==
// Task.DEADLINE) || (t.getStatus() == Task.FAILED))) {
// continue;
// }
// }
// ignore if it's a sub-task, iterate over ROOT tasks here only
if (tl.hasParentTask(t.getID())) {
continue;
}
s = s + renderTask(p, date, tl, t, 0, expandedTasks);
if (expandedTasks.contains(t.getID())) {
s = s + expandRecursively(p, date, tl, t, expandedTasks, 1);
}
}
s += "\n</ul>\n";
}
// Util.debug("html for project " + p.getTitle() + " is\n" + s);
return s;
}
示例4: generateTasksInfo
import net.sf.memoranda.TaskList; //导入方法依赖的package包/类
static String generateTasksInfo(Project p, CalendarDate date, Collection expandedTasks) {
TaskList tl;
if (p.getID().equals(CurrentProject.get().getID())) {
tl = CurrentProject.getTaskList();
}
else {
tl = CurrentStorage.get().openTaskList(p);
}
String s = "";
int k = getProgress(tl);
if (k > -1) {
s += "<br>" + Local.getString("Total progress") + ": " + k + "%";
}
s += "</td></tr></table>\n";
@SuppressWarnings("rawtypes")
Vector tasks = (Vector) tl.getActiveSubTasks(null,date);
if (tasks.size() == 0) {
s += "<p>" + Local.getString("No actual tasks") + ".</p>\n";
}
else {
s += Local.getString("Actual tasks") + ":<br>\n<ul>\n";
// TaskSorter.sort(tasks, date, TaskSorter.BY_IMP_RATE); // TODO: configurable method
Collections.sort(tasks);
for (Iterator i = tasks.iterator(); i.hasNext();) {
Task t = (Task) i.next();
// Always show active tasks only on agenda page from now on.
// If it's not active, then it's probably "not on the agenda" isn't it?
// if(Context.get("SHOW_ACTIVE_TASKS_ONLY").equals(new Boolean(true))) {
// if (!((t.getStatus() == Task.ACTIVE) || (t.getStatus() == Task.DEADLINE) || (t.getStatus() == Task.FAILED))) {
// continue;
// }
// }
// ignore if it's a sub-task, iterate over ROOT tasks here only
if (tl.hasParentTask(t.getId())) {
continue;
}
s = s + renderTask(p, date, tl, t, 0,expandedTasks);
if(expandedTasks!=null && expandedTasks.contains(t.getId())) {
s = s + expandRecursively(p,date,tl,t,expandedTasks,1);
}
}
s += "\n</ul>\n";
}
//Util.debug("html for project " + p.getTitle() + " is\n" + s);
//Util.debug("HEADER is " + HEADER);
return s;
}