本文整理汇总了Java中net.sf.memoranda.ProjectManager.createProject方法的典型用法代码示例。如果您正苦于以下问题:Java ProjectManager.createProject方法的具体用法?Java ProjectManager.createProject怎么用?Java ProjectManager.createProject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.ProjectManager
的用法示例。
在下文中一共展示了ProjectManager.createProject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
Project project = ProjectManager.createProject("1","FirstProject",new CalendarDate(1,1,2017),new CalendarDate(1,1,2018));
Element root = new Element("psp");
Element projectNode = new Element(PSP.ELEMENT_NAME);
projectNode.addAttribute(new Attribute(PSP.ID_ATTRIBUTE, project.getID()));
Element listNode = new Element(EstimateManager.ELEMENT_NAME);
Element estimateNode = new Element(EstimateManager.CHILD_ELEMENT);
estimateNode.addAttribute(new Attribute("module","test module"));
estimateNode.addAttribute(new Attribute("loc", "55"));
estimateNode.addAttribute(new Attribute("phase", PSP.Phase.Code.toString()));
estimateNode.addAttribute(new Attribute("minutes", "90"));
estimateNode.addAttribute(new Attribute("comments","this is a test"));
root.appendChild(projectNode);
projectNode.appendChild(listNode);
listNode.appendChild(estimateNode);
PSP.root = root;
testLog = ((Estimate[])EstimateManager.getEstimatesForProject(project).toArray(new Estimate[0]))[0];
}
示例2: newProject
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
public static void newProject() {
ProjectDialog dlg = new ProjectDialog(Local.getString("New project"));
Dimension dlgSize = dlg.getSize();
//dlg.setSize(dlgSize);
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.setVisible(true);
if (dlg.CANCELLED)
return;
String title = dlg.prTitleField.getText();
CalendarDate startD = new CalendarDate((Date) dlg.startDate.getModel().getValue());
CalendarDate endD = null;
if (dlg.endDateChB.isSelected())
endD = new CalendarDate((Date) dlg.endDate.getModel().getValue());
ProjectManager.createProject(title, startD, endD);
CurrentStorage.get().storeProjectManager();
}
示例3: setUpBeforeClass
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
today = CalendarDate.today();
tomorrow = CalendarDate.tomorrow();
dayAfterTomorrow = CalendarDate.tomorrow();
ProjectManager.createProject("FirstTestProject", "FirstTestProject", today, dayAfterTomorrow);
firstProject = ProjectManager.getProject("FirstTestProject");
firstDefectList = new DefectListImpl(firstProject);
firstDefectList.addDefect(today, today, 0, 0, 0, "First Defect");
firstDefectList.addDefect(today, tomorrow, 3, 4, 5, "Second Defect");
firstDefectList.addDefect(tomorrow, dayAfterTomorrow, 6, 6, 10, "Third Defect");
ProjectManager.createProject("SecondTestProject", "SecondTestProject", today, dayAfterTomorrow);
secondProject = ProjectManager.getProject("SecondTestProject");
secondDefectList = new DefectListImpl(secondProject);
secondDefectList.addDefect(today, today, 1, 2, 3, "Second Defect List: First Defect");
fileStorage = new FileStorage();
fileStorage.createProjectStorage(firstProject);
fileStorage.storeProjectManager();
}
示例4: newProject
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
public static void newProject() {
ProjectDialog dlg = new ProjectDialog(null, Local.getString("New project"));
Dimension dlgSize = dlg.getSize();
//dlg.setSize(dlgSize);
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.setVisible(true);
if (dlg.CANCELLED)
return;
String title = dlg.prTitleField.getText();
String description = dlg.descriptionTextArea.getText();
CalendarDate startD = new CalendarDate((Date) dlg.startDate.getModel().getValue());
CalendarDate endD = null;
if (dlg.endDateChB.isSelected())
endD = new CalendarDate((Date) dlg.endDate.getModel().getValue());
ProjectManager.createProject(title, description, startD, endD);
CurrentStorage.get().storeProjectManager();
}
示例5: newProject
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
public static void newProject() {
ProjectDialog dlg = new ProjectDialog(null, Local.getString("New project"));
Dimension dlgSize = dlg.getSize();
// dlg.setSize(dlgSize);
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.setVisible(true);
if (dlg.CANCELLED) {
return;
}
String title = dlg.prTitleField.getText();
CalendarDate startD = new CalendarDate((Date) dlg.startDate.getModel().getValue());
CalendarDate endD = null;
if (dlg.endDateChB.isSelected()) {
endD = new CalendarDate((Date) dlg.endDate.getModel().getValue());
}
Project prj = ProjectManager.createProject(title, startD, endD);
/*
* if (dlg.freezeChB.isSelected()) prj.freeze();
*/
CurrentStorage.get().storeProjectManager();
}
示例6: newProject
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
public static void newProject() {
ProjectDialog dlg = new ProjectDialog(null, Local.getString("New project"));
Dimension dlgSize = dlg.getSize();
//dlg.setSize(dlgSize);
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.setVisible(true);
if (dlg.CANCELLED)
return;
String title = dlg.prTitleField.getText();
CalendarDate startD = new CalendarDate((Date) dlg.startDate.getModel().getValue());
CalendarDate endD = null;
if (dlg.endDateChB.isSelected())
endD = new CalendarDate((Date) dlg.endDate.getModel().getValue());
Project prj = ProjectManager.createProject(title, startD, endD);
/*if (dlg.freezeChB.isSelected())
prj.freeze();*/
CurrentStorage.get().storeProjectManager();
}
示例7: setup
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@Before
public void setup() {
project1 = ProjectManager.createProject("tagTester1", CalendarDate.today(), tomorrow());
project2 = ProjectManager.createProject("tagTester2", CalendarDate.today(), tomorrow());
project1.addTag(tag1);
project1.addTag(tag2);
project1.addTag(tag3);
project2.addTag(tag4);
project2.addTag(tag5);
CurrentStorage.get().storeProjectManager();
System.out.println(ProjectManager.getAllProjects().get(0).getTagsAsString());
}
示例8: setUp
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
project = ProjectManager.createProject("1","FirstProject",new CalendarDate(1,1,2017),new CalendarDate(1,1,2018));
Element root = new Element("psp");
Element projectNode = new Element(PSP.ELEMENT_NAME);
projectNode.addAttribute(new Attribute(PSP.ID_ATTRIBUTE, project.getID()));
Element locNode = new Element(LocManager.ELEMENT_NAME);
locNode.appendChild("101");
root.appendChild(projectNode);
projectNode.appendChild(locNode);
PSP.root = root;
}
示例9: setUpBeforeClass
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
project1 = ProjectManager.createProject("tagTester1", CalendarDate.today(), tomorrow());
project2 = ProjectManager.createProject("tagTester2", CalendarDate.today(), tomorrow());
project1.addTag(tag1);
project1.addTag(tag2);
project1.addTag(tag3);
project2.addTag(tag4);
project2.addTag(tag5);
CurrentStorage.get().storeProjectManager();
ProjectManager.init();
Tag.init();
Tag.removeTag("");
}
示例10: setUp
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
Project project = ProjectManager.createProject("1","FirstProject",new CalendarDate(1,1,2017),new CalendarDate(1,1,2018));
Element root = new Element("psp");
Element projectNode = new Element("project");
projectNode.addAttribute(new Attribute("projectid", "1"));
Element timeloglistNode = new Element("timeloglist");
Element yearNode = new Element("year");
yearNode.addAttribute(new Attribute("year", "2017"));
Element monthNode = new Element("month");
monthNode.addAttribute(new Attribute("month", "1"));
Element dayNode = new Element("day");
dayNode.addAttribute(new Attribute("day","1"));
dayNode.addAttribute(new Attribute("date", "1/1/2017"));
Element timelog = new Element("timelog");
timelog.addAttribute(new Attribute("id","1"));
timelog.addAttribute(new Attribute("phase","Code"));
timelog.addAttribute(new Attribute("interruption","0"));
timelog.addAttribute(new Attribute("comments","test"));
timelog.addAttribute(new Attribute("timestart","2017-04-07 17:24"));
timelog.addAttribute(new Attribute("timestop","2017-04-07 17:25"));
root.appendChild(projectNode);
projectNode.appendChild(timeloglistNode);
timeloglistNode.appendChild(yearNode);
yearNode.appendChild(monthNode);
monthNode.appendChild(dayNode);
dayNode.appendChild(timelog);
PSP.root = root;
testLog = ((TimeLog[])TimeLogManager.getTimeLogsForProject(project).toArray(new TimeLog[0]))[0];
}
示例11: setUp
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
Project project = ProjectManager.createProject("1","FirstProject",new CalendarDate(1,1,2017),new CalendarDate(1,1,2018));
Element root = new Element("psp");
Element projectNode = new Element(PSP.ELEMENT_NAME);
projectNode.addAttribute(new Attribute(PSP.ID_ATTRIBUTE, project.getID()));
Element listNode = new Element(DefectLogManager.ELEMENT_NAME);
Element yearNode = new Element("year");
yearNode.addAttribute(new Attribute("year", "2017"));
Element monthNode = new Element("month");
monthNode.addAttribute(new Attribute("month", "1"));
Element dayNode = new Element("day");
dayNode.addAttribute(new Attribute("day","1"));
dayNode.addAttribute(new Attribute("date", "1/1/2017"));
Element log = new Element(DefectLogManager.CHILD_ELEMENT);
log.addAttribute(new Attribute("number","1"));
log.addAttribute(new Attribute("type", PSP.Defect.Syntax.toString()));
log.addAttribute(new Attribute("inject", PSP.Phase.Code.toString()));
log.addAttribute(new Attribute("remove", PSP.Phase.Test.toString()));
log.addAttribute(new Attribute("date","2017-04-07 17:24"));
log.addAttribute(new Attribute("fix","5"));
log.addAttribute(new Attribute("reference","5"));
log.addAttribute(new Attribute("description","this is a test"));
root.appendChild(projectNode);
projectNode.appendChild(listNode);
listNode.appendChild(yearNode);
yearNode.appendChild(monthNode);
monthNode.appendChild(dayNode);
dayNode.appendChild(log);
PSP.root = root;
testLog = ((DefectLog[])DefectLogManager.getDefectLogsForProject(project).toArray(new DefectLog[0]))[0];
}
示例12: setUp
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
IconFontSwing.register(GoogleMaterialDesignIcons.getIconFont());
projBeforeTest = ProjectManager.getAllProjectsNumber();
activeProjBeforeTest = ProjectManager.getActiveProjectsNumber();
tp1 = ProjectManager.createProject("testProj1", new CalendarDate(1,3,2017), new CalendarDate(1,4,2017));
tp2 = ProjectManager.createProject("testProj2", new CalendarDate(1,3,2017), null);
tp3 = ProjectManager.createProject("testProj3", new CalendarDate(1,3,2017), new CalendarDate(15,3,2017));
tp4 = ProjectManager.createProject("testProj4", new CalendarDate(1,4,2017), new CalendarDate(1,5,2017));
tp5 = ProjectManager.createProject("testProj5", new CalendarDate(1,4,2017), new CalendarDate(1,5,2017), "Green");
CurrentDate.set(new CalendarDate(17,3,2017));
}
示例13: setUpBefore
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@Before
public void setUpBefore() throws Exception {
prjInjected = ProjectManager.createProject("Test", "Something About a project", startDate, endDate);
prjExpected = ProjectManager.createProject("Test", "Something About a project", startDateExpected, endDateExpected);
teamInjected = new CurrentProject();
teamExpected = new CurrentProject();
}
示例14: testEndAfterStart
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
/**
* Test End date is before start date.
*/
@Test
public void testEndAfterStart() {
ProjectManager.createProject("6", "Basic Test", CalendarDate.tomorrow(), CalendarDate.today());
assertTrue(allProj+1 == ProjectManager.getAllProjectsNumber());
Project testPrj = ProjectManager.getProject("6");
assertTrue(testPrj.getEndDate().equals(testPrj.getStartDate()));
}
示例15: testNormalDeleteProject
import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
/**
* Tests an appropriate project deletion.
*/
@Test
public void testNormalDeleteProject() {
if(allProj < 1) {
ProjectManager.createProject("Default", CalendarDate.today(), null);
}
ProjectManager.removeProject("1");
assertTrue(allProj-1 == ProjectManager.getAllProjectsNumber());
}