本文整理汇总了Java中net.sf.memoranda.Task.setStartDate方法的典型用法代码示例。如果您正苦于以下问题:Java Task.setStartDate方法的具体用法?Java Task.setStartDate怎么用?Java Task.setStartDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.Task
的用法示例。
在下文中一共展示了Task.setStartDate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: calcTask_actionPerformed
import net.sf.memoranda.Task; //导入方法依赖的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();
}
示例2: calcTask_actionPerformed
import net.sf.memoranda.Task; //导入方法依赖的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();
}
示例3: calcTask_actionPerformed
import net.sf.memoranda.Task; //导入方法依赖的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();
}
示例4: calcTask_actionPerformed
import net.sf.memoranda.Task; //导入方法依赖的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();
}