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


Java TaskList.calculateCompletionFromSubTasks方法代码示例

本文整理汇总了Java中net.sf.memoranda.TaskList.calculateCompletionFromSubTasks方法的典型用法代码示例。如果您正苦于以下问题:Java TaskList.calculateCompletionFromSubTasks方法的具体用法?Java TaskList.calculateCompletionFromSubTasks怎么用?Java TaskList.calculateCompletionFromSubTasks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.memoranda.TaskList的用法示例。


在下文中一共展示了TaskList.calculateCompletionFromSubTasks方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: calcTask_actionPerformed

import net.sf.memoranda.TaskList; //导入方法依赖的package包/类
void calcTask_actionPerformed(ActionEvent e) {
    TaskCalcDialog dlg = new TaskCalcDialog(App.getFrame());
    dlg.pack();
    Task t = CurrentProject.getTaskList().getTask(taskTable.getModel().getValueAt(taskTable.getSelectedRow(), TaskTable.TASK_ID).toString());
    
    Dimension frmSize = App.getFrame().getSize();
    Point loc = App.getFrame().getLocation();
    
    dlg.setLocation((frmSize.width - dlg.getSize().width) / 2 + loc.x, (frmSize.height - dlg.getSize().height) / 2 + loc.y);
    dlg.setVisible(true);
    if (dlg.CANCELLED) {
        return;            
    }
    
    TaskList tl = CurrentProject.getTaskList();
    if(dlg.calcEffortChB.isSelected()) {
        t.setEffort(tl.calculateTotalEffortFromSubTasks(t));
    }
    
    if(dlg.calcActualChB.isSelected()) {
        t.setActual(tl.calculateTotalActualFromSubTasks(t));
    }
    
    if(dlg.compactDatesChB.isSelected()) {
        t.setStartDate(tl.getEarliestStartDateFromSubTasks(t));
        t.setEndDate(tl.getLatestEndDateFromSubTasks(t));
    }
    
    if(dlg.calcCompletionChB.isSelected()) {
        long[] res = tl.calculateCompletionFromSubTasks(t);
        int thisProgress = (int) Math.round((((double)res[0] / (double)res[1]) * 100));
        t.setProgress(thisProgress);
    }
    
    CurrentStorage.get().storeTaskList(CurrentProject.getTaskList(), CurrentProject.get());
    taskTable.tableChanged();
}
 
开发者ID:ser316asu,项目名称:Wilmersdorf_SER316,代码行数:38,代码来源:TaskPanel.java

示例2: calcTask_actionPerformed

import net.sf.memoranda.TaskList; //导入方法依赖的package包/类
void calcTask_actionPerformed(ActionEvent e) {
        TaskCalcDialog dlg = new TaskCalcDialog(App.getFrame());
        dlg.pack();
        Task t = CurrentProject.getTaskList().getTask(taskTable.getModel().getValueAt(taskTable.getSelectedRow(), TaskTable.TASK_ID).toString());
        
        Dimension frmSize = App.getFrame().getSize();
        Point loc = App.getFrame().getLocation();
        
        dlg.setLocation((frmSize.width - dlg.getSize().width) / 2 + loc.x, (frmSize.height - dlg.getSize().height) / 2 + loc.y);
        dlg.setVisible(true);
        if (dlg.CANCELLED) {
            return;            
        }
        
        TaskList tl = CurrentProject.getTaskList();
        if(dlg.calcEffortChB.isSelected()) {
            t.setEffort(tl.calculateTotalEffortFromSubTasks(t));
        }
        if(dlg.compactDatesChB.isSelected()) {
            t.setStartDate(tl.getEarliestStartDateFromSubTasks(t));
            t.setEndDate(tl.getLatestEndDateFromSubTasks(t));
        }
        
        if(dlg.calcCompletionChB.isSelected()) {
            long[] res = tl.calculateCompletionFromSubTasks(t);
            int thisProgress = (int) Math.round((((double)res[0] / (double)res[1]) * 100));
            t.setProgress(thisProgress);
        }
        
//        CalendarDate sd = new CalendarDate((Date) dlg.startDate.getModel().getValue());
////        CalendarDate ed = new CalendarDate((Date) dlg.endDate.getModel().getValue());
//          CalendarDate ed;
// 		if(dlg.chkEndDate.isSelected())
// 			ed = new CalendarDate((Date) dlg.endDate.getModel().getValue());
// 		else
// 			ed = new CalendarDate(0,0,0);
//        long effort = Util.getMillisFromHours(dlg.effortField.getText());
//		Task newTask = CurrentProject.getTaskList().createTask(sd, ed, dlg.todoField.getText(), dlg.priorityCB.getSelectedIndex(),effort, dlg.descriptionField.getText(),parentTaskId);
//		
		
        CurrentStorage.get().storeTaskList(CurrentProject.getTaskList(), CurrentProject.get());
        taskTable.tableChanged();
//        parentPanel.updateIndicators();
        //taskTable.updateUI();
    }
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:46,代码来源:TaskPanel.java

示例3: calcTask_actionPerformed

import net.sf.memoranda.TaskList; //导入方法依赖的package包/类
void calcTask_actionPerformed(ActionEvent e) {
        TaskCalcDialog dlg = new TaskCalcDialog(App.getFrame());
        dlg.pack();
        Task t = CurrentProject.getTaskList().getTask(taskTable.getModel().getValueAt(taskTable.getSelectedRow(), TaskTable.TASK_ID).toString());
        
        Dimension frmSize = App.getFrame().getSize();
        Point loc = App.getFrame().getLocation();
        
        dlg.setLocation((frmSize.width - dlg.getSize().width) / 2 + loc.x, (frmSize.height - dlg.getSize().height) / 2 + loc.y);
        dlg.setVisible(true);
        if (dlg.CANCELLED) {
            return;            
        }
        
        TaskList tl = CurrentProject.getTaskList();
        if(dlg.calcEffortChB.isSelected()) {
            t.setEffort(tl.calculateTotalEffortFromSubTasks(t));
        }
        
        if(dlg.compactDatesChB.isSelected()) {
            t.setStartDate(tl.getEarliestStartDateFromSubTasks(t));
            t.setEndDate(tl.getLatestEndDateFromSubTasks(t));
        }
        
        if(dlg.calcCompletionChB.isSelected()) {
            long[] res = tl.calculateCompletionFromSubTasks(t);
            int thisProgress = (int) Math.round((((double)res[0] / (double)res[1]) * 100));
            t.setProgress(thisProgress);
        }
        
//        CalendarDate sd = new CalendarDate((Date) dlg.startDate.getModel().getValue());
////        CalendarDate ed = new CalendarDate((Date) dlg.endDate.getModel().getValue());
//          CalendarDate ed;
//         if(dlg.chkEndDate.isSelected())
//             ed = new CalendarDate((Date) dlg.endDate.getModel().getValue());
//         else
//             ed = new CalendarDate(0,0,0);
//        long effort = HtmlUtil.getMillisFromHours(dlg.effortField.getText());
//        Task newTask = CurrentProject.getTaskList().createTask(sd, ed, dlg.todoField.getText(), dlg.priorityCB.getSelectedIndex(),effort, dlg.descriptionField.getText(),parentTaskId);
//        
        
        CurrentStorage.get().storeTaskList(CurrentProject.getTaskList(), CurrentProject.get());
        taskTable.tableChanged();
//        parentPanel.updateIndicators();
        //taskTable.updateUI();
    }
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:47,代码来源:TaskPanel.java

示例4: calcTask_actionPerformed

import net.sf.memoranda.TaskList; //导入方法依赖的package包/类
void calcTask_actionPerformed(ActionEvent e) {
        TaskCalcDialog dlg = new TaskCalcDialog(App.getFrame());
        dlg.pack();
        Task t = CurrentProject.getTaskList().getTask(taskTable.getModel().getValueAt(taskTable.getSelectedRow(), TaskTable.TASK_ID).toString());
        
        Dimension frmSize = App.getFrame().getSize();
        Point loc = App.getFrame().getLocation();
        
        dlg.setLocation((frmSize.width - dlg.getSize().width) / 2 + loc.x, (frmSize.height - dlg.getSize().height) / 2 + loc.y);
        dlg.setVisible(true);
        if (dlg.CANCELLED) {
            return;            
        }
        
        TaskList tl = CurrentProject.getTaskList();
        if(dlg.calcEffortChB.isSelected()) {
            t.setEffort(tl.calculateTotalEffortFromSubTasks(t));
        }
        
        if(dlg.compactDatesChB.isSelected()) {
            t.setStartDate(tl.getEarliestStartDateFromSubTasks(t));
            t.setEndDate(tl.getLatestEndDateFromSubTasks(t));
        }
        
        if(dlg.calcCompletionChB.isSelected()) {
            long[] res = tl.calculateCompletionFromSubTasks(t);
            int thisProgress = (int) Math.round((((double)res[0] / (double)res[1]) * 100));
            t.setProgress(thisProgress);
        }
        
//        CalendarDate sd = new CalendarDate((Date) dlg.startDate.getModel().getValue());
////        CalendarDate ed = new CalendarDate((Date) dlg.endDate.getModel().getValue());
//          CalendarDate ed;
// 		if(dlg.chkEndDate.isSelected())
// 			ed = new CalendarDate((Date) dlg.endDate.getModel().getValue());
// 		else
// 			ed = new CalendarDate(0,0,0);
//        long effort = Util.getMillisFromHours(dlg.effortField.getText());
//		Task newTask = CurrentProject.getTaskList().createTask(sd, ed, dlg.todoField.getText(), dlg.priorityCB.getSelectedIndex(),effort, dlg.descriptionField.getText(),parentTaskId);
//		
		
        CurrentStorage.get().storeTaskList(CurrentProject.getTaskList(), CurrentProject.get());
        taskTable.tableChanged();
//        parentPanel.updateIndicators();
        //taskTable.updateUI();
    }
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:47,代码来源:TaskPanel.java

示例5: calcTask_actionPerformed

import net.sf.memoranda.TaskList; //导入方法依赖的package包/类
void calcTask_actionPerformed(ActionEvent e) {
        TaskCalcDialog dlg = new TaskCalcDialog(App.getFrame());
        dlg.pack();
        Task t = CurrentProject.getTaskList().getTask(taskTable.getModel().getValueAt(taskTable.getSelectedRow(), TaskTable.TASK_ID).toString());

        Dimension frmSize = App.getFrame().getSize();
        Point loc = App.getFrame().getLocation();

        dlg.setLocation((frmSize.width - dlg.getSize().width) / 2 + loc.x, (frmSize.height - dlg.getSize().height) / 2 + loc.y);
        dlg.setVisible(true);
        if (dlg.CANCELLED) {
            return;
        }

        TaskList tl = CurrentProject.getTaskList();
        if(dlg.calcEffortChB.isSelected()) {
            t.setEffort(tl.calculateTotalEffortFromSubTasks(t));
        }

        if(dlg.compactDatesChB.isSelected()) {
            t.setStartDate(tl.getEarliestStartDateFromSubTasks(t));
            t.setEndDate(tl.getLatestEndDateFromSubTasks(t));
        }

        if(dlg.calcCompletionChB.isSelected()) {
            long[] res = tl.calculateCompletionFromSubTasks(t);
            int thisProgress = (int) Math.round((((double)res[0] / (double)res[1]) * 100));
            t.setProgress(thisProgress);
        }

//        CalendarDate sd = new CalendarDate((Date) dlg.startDate.getModel().getValue());
////        CalendarDate ed = new CalendarDate((Date) dlg.endDate.getModel().getValue());
//          CalendarDate ed;
// 		if(dlg.chkEndDate.isSelected())
// 			ed = new CalendarDate((Date) dlg.endDate.getModel().getValue());
// 		else
// 			ed = new CalendarDate(0,0,0);
//        long effort = Util.getMillisFromHours(dlg.effortField.getText());
//		Task newTask = CurrentProject.getTaskList().createTask(sd, ed, dlg.todoField.getText(), dlg.priorityCB.getSelectedIndex(),effort, dlg.descriptionField.getText(),parentTaskId);
//

        CurrentStorage.get().storeTaskList(CurrentProject.getTaskList(), CurrentProject.get());
        taskTable.tableChanged();
//        parentPanel.updateIndicators();
        //taskTable.updateUI();
    }
 
开发者ID:cst316,项目名称:spring16project-Modula-2,代码行数:47,代码来源:TaskPanel.java

示例6: calcTask_actionPerformed

import net.sf.memoranda.TaskList; //导入方法依赖的package包/类
void calcTask_actionPerformed(ActionEvent e) {
	TaskCalcDialog dlg = new TaskCalcDialog(App.getFrame());
	dlg.pack();
	Task t = CurrentProject.getTaskList()
			.getTask(taskTable.getModel().getValueAt(taskTable.getSelectedRow(), TaskTable.TASK_ID).toString());

	Dimension frmSize = App.getFrame().getSize();
	Point loc = App.getFrame().getLocation();

	dlg.setLocation((frmSize.width - dlg.getSize().width) / 2 + loc.x,
			(frmSize.height - dlg.getSize().height) / 2 + loc.y);
	dlg.setVisible(true);
	if (dlg.CANCELLED) {
		return;
	}

	TaskList tl = CurrentProject.getTaskList();
	if (dlg.calcEffortChB.isSelected()) {
		t.setEffort(tl.calculateTotalEffortFromSubTasks(t));
	}

	if (dlg.compactDatesChB.isSelected()) {
		t.setStartDate(tl.getEarliestStartDateFromSubTasks(t));
		t.setEndDate(tl.getLatestEndDateFromSubTasks(t));
	}

	if (dlg.calcCompletionChB.isSelected()) {
		long[] res = tl.calculateCompletionFromSubTasks(t);
		int thisProgress = (int) Math.round((((double) res[0] / (double) res[1]) * 100));
		t.setProgress(thisProgress);
	}

	// CalendarDate sd = new CalendarDate((Date)
	// dlg.startDate.getModel().getValue());
	//// CalendarDate ed = new CalendarDate((Date)
	// dlg.endDate.getModel().getValue());
	// CalendarDate ed;
	// if(dlg.chkEndDate.isSelected())
	// ed = new CalendarDate((Date) dlg.endDate.getModel().getValue());
	// else
	// ed = new CalendarDate(0,0,0);
	// long effort = Util.getMillisFromHours(dlg.effortField.getText());
	// Task newTask = CurrentProject.getTaskList().createTask(sd, ed,
	// dlg.todoField.getText(), dlg.priorityCB.getSelectedIndex(),effort,
	// dlg.descriptionField.getText(),parentTaskId);
	//

	CurrentStorage.get().storeTaskList(CurrentProject.getTaskList(), CurrentProject.get());
	taskTable.tableChanged();
	// parentPanel.updateIndicators();
	// taskTable.updateUI();
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:53,代码来源:TaskPanel.java

示例7: calcTask_actionPerformed

import net.sf.memoranda.TaskList; //导入方法依赖的package包/类
void calcTask_actionPerformed(ActionEvent e) {
	TaskCalcDialog dlg = new TaskCalcDialog(App.getFrame());
	dlg.pack();
	Task t = CurrentProject.getTaskList().getTask(
			taskTable.getModel().getValueAt(taskTable.getSelectedRow(), 
					TaskTable.TASK_ID).toString());

	Dimension frmSize = App.getFrame().getSize();
	Point loc = App.getFrame().getLocation();

	dlg.setLocation((frmSize.width - dlg.getSize().width) / 2 + loc.x, (frmSize.height - dlg.getSize().height) / 2 + loc.y);
	dlg.setVisible(true);
	if (dlg.CANCELLED) {
		return;            
	}

	TaskList tl = CurrentProject.getTaskList();
	if(dlg.calcEffortChB.isSelected()) {
		t.setEffort(tl.calculateTotalEffortFromSubTasks(t));
	}

	if(dlg.compactDatesChB.isSelected()) {
		t.setStartDate(tl.getEarliestStartDateFromSubTasks(t));
		t.setEndDate(tl.getLatestEndDateFromSubTasks(t));
	}

	if(dlg.calcCompletionChB.isSelected()) {
		long[] res = tl.calculateCompletionFromSubTasks(t);
		int thisProgress = (int) Math.round((((double)res[0] / (double)res[1]) * 100));
		t.setProgress(thisProgress);
	}

	//        CalendarDate sd = new CalendarDate((Date) dlg.startDate.getModel().getValue());
	////        CalendarDate ed = new CalendarDate((Date) dlg.endDate.getModel().getValue());
	//          CalendarDate ed;
	// 		if(dlg.chkEndDate.isSelected())
	// 			ed = new CalendarDate((Date) dlg.endDate.getModel().getValue());
	// 		else
	// 			ed = new CalendarDate(0,0,0);
	//        long effort = Util.getMillisFromHours(dlg.effortField.getText());
	//		Task newTask = CurrentProject.getTaskList().createTask(sd, ed, dlg.todoField.getText(), dlg.priorityCB.getSelectedIndex(),effort, dlg.descriptionField.getText(),parentTaskId);
	//		

	CurrentStorage.get().storeTaskList(CurrentProject.getTaskList(), CurrentProject.get());
	taskTable.tableChanged();
	//        parentPanel.updateIndicators();
	//taskTable.updateUI();
}
 
开发者ID:cst316,项目名称:spring16project-Korn,代码行数:49,代码来源:TaskPanel.java


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