当前位置: 首页>>代码示例>>Java>>正文


Java TaskList.hasParentTask方法代码示例

本文整理汇总了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;
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:51,代码来源:AgendaGenerator.java

示例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;
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:50,代码来源:AgendaGenerator.java

示例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;
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:52,代码来源:AgendaGenerator.java

示例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;
}
 
开发者ID:cst316,项目名称:spring16project-Korn,代码行数:52,代码来源:AgendaGenerator.java


注:本文中的net.sf.memoranda.TaskList.hasParentTask方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。