本文整理汇总了Java中net.sf.memoranda.Project.setStartDate方法的典型用法代码示例。如果您正苦于以下问题:Java Project.setStartDate方法的具体用法?Java Project.setStartDate怎么用?Java Project.setStartDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.Project
的用法示例。
在下文中一共展示了Project.setStartDate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ppProperties_actionPerformed
import net.sf.memoranda.Project; //导入方法依赖的package包/类
void ppProperties_actionPerformed(ActionEvent e) {
Project prj = prjTablePanel.getSelectedProject();
ProjectDialog dlg =
new ProjectDialog(null, Local.getString("Project properties"));
Dimension dlgSize = dlg.getSize();
Dimension frmSize = App.getFrame().getSize();
Point loc = App.getFrame().getLocation();
dlg.setLocation(
(frmSize.width - dlgSize.width) / 2 + loc.x,
(frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.prTitleField.setText(prj.getTitle());
dlg.startDate.getModel().setValue(
prj.getStartDate().getCalendar().getTime());
if (prj.getEndDate() != null) {
dlg.edButton.setEnabled(true);
dlg.endDateChB.setForeground(Color.BLACK);
dlg.endDateChB.setSelected(true);
dlg.endDate.setEnabled(true);
dlg.endDate.getModel().setValue(
prj.getEndDate().getCalendar().getTime());
}
/*if (prj.getStatus() == Project.FROZEN)
dlg.freezeChB.setSelected(true);*/
dlg.setVisible(true);
if (dlg.CANCELLED)
return;
prj.setTitle(dlg.prTitleField.getText());
prj.setStartDate(
new CalendarDate((Date) dlg.startDate.getModel().getValue()));
if (dlg.endDateChB.isSelected())
prj.setEndDate(
new CalendarDate((Date) dlg.endDate.getModel().getValue()));
else
prj.setEndDate(null);
prjTablePanel.updateUI();
/*
* if (dlg.freezeChB.isSelected()) prj.freeze(); else
*/
}
示例2: editProject_actionPerformed
import net.sf.memoranda.Project; //导入方法依赖的package包/类
void editProject_actionPerformed(ActionEvent e) {
Project prj = mainPanel.getSelectedProject();
ProjectDialog dlg =
new ProjectDialog(null, Local.getString("Project properties"));
Dimension dlgSize = dlg.getSize();
Dimension frmSize = App.getFrame().getSize();
Point loc = App.getFrame().getLocation();
dlg.setLocation(
(frmSize.width - dlgSize.width) / 2 + loc.x,
(frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.prTitleField.setText(prj.getTitle());
dlg.startDate.getModel().setValue(
prj.getStartDate().getCalendar().getTime());
if (prj.getEndDate() != null) {
dlg.edButton.setEnabled(true);
dlg.endDateChB.setForeground(Color.BLACK);
dlg.endDateChB.setSelected(true);
dlg.endDate.setEnabled(true);
dlg.endDate.getModel().setValue(
prj.getEndDate().getCalendar().getTime());
}
dlg.colorBox.setSelectedItem(prj.getColor());
dlg.setVisible(true);
if (dlg.CANCELLED){
return;
}
prj.setTitle(dlg.prTitleField.getText());
prj.setStartDate(new CalendarDate((Date) dlg.startDate.getModel().getValue()));
prj.setColor((String) dlg.colorBox.getSelectedItem());
if (dlg.endDateChB.isSelected()){
prj.setEndDate(
new CalendarDate((Date) dlg.endDate.getModel().getValue()));
} else{
prj.setEndDate(null);
}
mainPanel.updateUI();
/*
* if (dlg.freezeChB.isSelected()) prj.freeze(); else
*/
}
示例3: ppProperties_actionPerformed
import net.sf.memoranda.Project; //导入方法依赖的package包/类
void ppProperties_actionPerformed(ActionEvent e) {
Project project = prjTablePanel.getSelectedProject();
ProjectDialog dialog =
new ProjectDialog(null, Local.getString("Project properties"));
Dimension dialogSize = dialog.getSize();
Dimension frameSize = App.getFrame().getSize();
Point loc = App.getFrame().getLocation();
dialog.setLocation(
(frameSize.width - dialogSize.width) / 2 + loc.x,
(frameSize.height - dialogSize.height) / 2 + loc.y);
dialog.projectTypeComboBox.setSelectedItem(dialog.projectTypeComboBoxLookup.get(project.getType()));
dialog.prTitleField.setText(project.getTitle());
dialog.startDate.getModel().setValue(
project.getStartDate().getCalendar().getTime());
if (project.getEndDate() != null) {
dialog.edButton.setEnabled(true);
dialog.endDateChB.setForeground(Color.BLACK);
dialog.endDateChB.setSelected(true);
dialog.endDate.setEnabled(true);
dialog.endDate.getModel().setValue(
project.getEndDate().getCalendar().getTime());
}
/*if (prj.getStatus() == Project.FROZEN)
dlg.freezeChB.setSelected(true);*/
if (project.getType().compareTo(Project.Type.PSP) == 0) {
fillPSPFields(project, dialog);
}
dialog.setVisible(true);
if (dialog.CANCELLED)
return;
project.setTitle(dialog.prTitleField.getText());
project.setStartDate(
new CalendarDate((Date) dialog.startDate.getModel().getValue()));
if (dialog.endDateChB.isSelected())
project.setEndDate(
new CalendarDate((Date) dialog.endDate.getModel().getValue()));
else
project.setEndDate(null);
((PSPProject) project).setPSPAttr("estimatedTime", Integer.parseInt(dialog.estimatedTime.getText()));
((PSPProject) project).setPSPAttr("estimatedSize", Integer.parseInt(dialog.estimatedSize.getText()));
System.out.println("[DEBUG] " + ((PSPProject)project).getPSPAttr("estimatedTime"));
/*
// update current phase
if (prj.getType().compareTo(Project.Type.PSP) == 0) {
System.out.println("[DEBUG] " + dlg.currentPhase.getSelectedItem().toString());
((PSPProject) prj).setPhase(dlg.currentPhase.getSelectedItem().toString());
System.out.println("[DEBUG] " + ((PSPProject) prj).getPSPAttr("currentPhase"));
}
*/
prjTablePanel.updateUI();
/*
* if (dlg.freezeChB.isSelected()) prj.freeze(); else
*/
}