本文整理汇总了Java中net.sf.memoranda.CurrentProject.set方法的典型用法代码示例。如果您正苦于以下问题:Java CurrentProject.set方法的具体用法?Java CurrentProject.set怎么用?Java CurrentProject.set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.CurrentProject
的用法示例。
在下文中一共展示了CurrentProject.set方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testColor
import net.sf.memoranda.CurrentProject; //导入方法依赖的package包/类
@Test
public void testColor() {
assertEquals(ProjectManager.getProject(tp5.getID()).getColor(),"Green");
CurrentProject.set(ProjectManager.getProject(tp5.getID()));
assertEquals(Palette.getColorPalette(),"Green");
CurrentProject.set(ProjectManager.getProject(tp4.getID()));
assertEquals(Palette.getColorPalette(), "Blue");
}
示例2: historyChanged
import net.sf.memoranda.CurrentProject; //导入方法依赖的package包/类
void historyChanged(HistoryItem hi) {
changedByHistory = true;
CurrentProject.set(hi.getProject());
CurrentDate.set(hi.getDate());
changedByHistory = false;
}
示例3: ppOpenProject_actionPerformed
import net.sf.memoranda.CurrentProject; //导入方法依赖的package包/类
void ppOpenProject_actionPerformed(ActionEvent e) {
CurrentProject.set(prjTablePanel.getSelectedProject());
prjTablePanel.updateUI();
ppDeleteProject.setEnabled(false);
ppOpenProject.setEnabled(false);
}
示例4: setUp
import net.sf.memoranda.CurrentProject; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
// get testing values
injectPhase = PSP.Phase.Test.toString();
removePhase = PSP.Phase.PostMortem.toString();
numDefects = String.valueOf(120);
actualDefect = PSP.Defect.Syntax.toString();
// prep values
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_FORMAT);
String actualDate = "2017-04-07 08:00";
LocalDateTime date = LocalDateTime.parse(actualDate, formatter);
// set testing values
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()));
// defect logs
Element defectloglistNode = new Element("defectloglist");
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 defectlog = new Element("defectlog");
defectlog.addAttribute(new Attribute("id","1"));
defectlog.addAttribute(new Attribute("date", actualDate));
defectlog.addAttribute(new Attribute("inject", injectPhase.toString()));
defectlog.addAttribute(new Attribute("remove", removePhase.toString()));
defectlog.addAttribute(new Attribute("type", actualDefect.toString()));
defectlog.addAttribute(new Attribute("number", String.valueOf(numDefects)));
defectlog.addAttribute(new Attribute("fix", "0"));
defectlog.addAttribute(new Attribute("reference", "0"));
defectlog.addAttribute(new Attribute("comments", "test"));
// build xml
root.appendChild(projectNode);
//projectNode.appendChild(listNode);
projectNode.appendChild(defectloglistNode);
//listNode.appendChild(estimateNode);
defectloglistNode.appendChild(yearNode);
yearNode.appendChild(monthNode);
monthNode.appendChild(dayNode);
dayNode.appendChild(defectlog);
PSP.root = root;
testDefectTable = new DefectSummaryTable();
CurrentProject.set(project);
}
示例5: setUp
import net.sf.memoranda.CurrentProject; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
// get testing values
estimatePhase = PSP.Phase.Code.toString();
actualPhase = PSP.Phase.Code.toString();
estimateMin = String.valueOf(90);
actualMin = String.valueOf(120);
// prep values
int estimateLoc = 0;
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
String actualTimeStart = "2017-04-07 08:00";
LocalDateTime timeStart = LocalDateTime.parse(actualTimeStart, formatter);
LocalDateTime timeStop = timeStart.plusMinutes(Integer.parseInt(actualMin));
String actualTimeStop = timeStop.format(formatter);
// set testing values
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()));
// estimates
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", String.valueOf(estimateLoc)));
estimateNode.addAttribute(new Attribute("phase", estimatePhase.toString()));
estimateNode.addAttribute(new Attribute("minutes", String.valueOf(estimateMin)));
estimateNode.addAttribute(new Attribute("comments","this is a test"));
// time logs
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", actualPhase.toString()));
timelog.addAttribute(new Attribute("interruption","0"));
timelog.addAttribute(new Attribute("comments","test"));
timelog.addAttribute(new Attribute("timestart",actualTimeStart));
timelog.addAttribute(new Attribute("timestop",actualTimeStop));
// build xml
root.appendChild(projectNode);
projectNode.appendChild(listNode);
projectNode.appendChild(timeloglistNode);
listNode.appendChild(estimateNode);
timeloglistNode.appendChild(yearNode);
yearNode.appendChild(monthNode);
monthNode.appendChild(dayNode);
dayNode.appendChild(timelog);
PSP.root = root;
testTimeTable = new TimeSummaryTable();
CurrentProject.set(project);
}
示例6: switchToProject_actionPerformed
import net.sf.memoranda.CurrentProject; //导入方法依赖的package包/类
void switchToProject_actionPerformed(ActionEvent e) {
CurrentProject.set(mainPanel.getSelectedProject());
mainPanel.updateUI();
removeProjectB.setEnabled(false);
editProjectB.setEnabled(true);
}