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


Java Project.setStartDate方法代码示例

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

示例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
   */
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:42,代码来源:ProjectManagerDialog.java

示例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
	 */
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:66,代码来源:ProjectsPanel.java


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