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


Java ProjectManager类代码示例

本文整理汇总了Java中net.sf.memoranda.ProjectManager的典型用法代码示例。如果您正苦于以下问题:Java ProjectManager类的具体用法?Java ProjectManager怎么用?Java ProjectManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ProjectManager类属于net.sf.memoranda包,在下文中一共展示了ProjectManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import net.sf.memoranda.ProjectManager; //导入依赖的package包/类
public static void init() {
	tags = new HashSet<String>();
	
	try {
		Vector<Project> projects = ProjectManager.getAllProjects();
		for (int i = 0; i < projects.size(); i++) {
			Elements tagElements = projects.get(i).getTags();
			for (int j = 0; j < tagElements.size(); j++) {
				tags.add(tagElements.get(j).getAttributeValue("name").toLowerCase());
			}
		}
		tags.add(" ");
	} catch (Exception e) {
		Util.error(e);
	}
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:17,代码来源:Tag.java

示例2: tagB_actionPerformed

import net.sf.memoranda.ProjectManager; //导入依赖的package包/类
void tagB_actionPerformed(ActionEvent e) {
	ProjectTagDialog dlg = new ProjectTagDialog(App.getFrame(), Local.getString("Add new tag"));
   	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;
	// create Tag				
   	
	ProjectComboItem projectitem =  (ProjectComboItem)dlg.project.getSelectedItem();
	String projectid = projectitem.getValue();

	Project p=ProjectManager.getProject(projectid);
	
	Util.debug("Adding tag "+dlg.tag.getText()+ " for project " + projectitem.getValue());	
	if(Tag.addTagToProject(dlg.tag.getText(),p)){
		JOptionPane.showMessageDialog(null, Local.getString("Tag added successfully to project ")+p.getTitle());
	}
	else{
		JOptionPane.showMessageDialog(null, Local.getString("Tag was not added to project ")+p.getTitle());
	}
		
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:26,代码来源:ProjectsPanel.java

示例3: 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];
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:20,代码来源:EstimateTest.java

示例4: upgradeTaskList

import net.sf.memoranda.ProjectManager; //导入依赖的package包/类
public static boolean upgradeTaskList(String publicId) {
    int vid = getIndexOfVersion(publicId);
    
    if (vid == (VERSIONS.length - 1)) {
        Util.debug("Version " + publicId + " is the latest version, skipping upgrade");
        return false;
    }
    else {
        // get all projects
        Vector projects = ProjectManager.getAllProjects();
        String[] projectIds = new String[projects.size()];
        int c = 0;
        for (Iterator iter = projects.iterator(); iter.hasNext();) {
            Project prj = (Project) iter.next();
            projectIds[c++] = prj.getID();
        }
        
        // keep upgrading until it's the current version
        while (vid < (VERSIONS.length - 1)) {
            if(vid == 0) {
                upgrade1_1d1(projectIds);
            }            
            vid++;
        }
        return true;
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:28,代码来源:TaskListVersioning.java

示例5: generateAllProjectsInfo

import net.sf.memoranda.ProjectManager; //导入依赖的package包/类
static String generateAllProjectsInfo(CalendarDate date, Collection expandedTasks) {
	String s =
			"<td width=\"66%\" valign=\"top\">"
					+ "<h1>"
					+ Local.getString("Projects and tasks")
					+ "</h1>\n";
	s += generateProjectInfo(CurrentProject.get(), date, expandedTasks);        
	for (Iterator i = ProjectManager.getActiveProjects().iterator();
			i.hasNext();
			) {
		Project p = (Project) i.next();
		if (!p.getID().equals(CurrentProject.get().getID()))
			s += generateProjectInfo(p, date, expandedTasks);
	}
	return s + "</td>";
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:17,代码来源:AgendaGenerator.java

示例6: 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();
}
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:20,代码来源:ProjectDialog.java

示例7: 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();
}
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:23,代码来源:DefectListCreationTest.java

示例8: 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();
}
 
开发者ID:cst316,项目名称:spring16project-Modula-2,代码行数:23,代码来源:ProjectDialog.java

示例9: 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();
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:25,代码来源:ProjectDialog.java

示例10: 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();
}
 
开发者ID:cst316,项目名称:spring16project-Korn,代码行数:22,代码来源:ProjectDialog.java

示例11: generateAllProjectsInfo

import net.sf.memoranda.ProjectManager; //导入依赖的package包/类
static String generateAllProjectsInfo(CalendarDate date, Collection expandedTasks) {
	String s =
			"<td width=\"66%\" valign=\"top\">"
					+ "<h1>"
					+ Local.getString("Projects and tasks")
					+ "</h1>\n";
	/* commenting out for now shows how to create new html buttons (as ugly as they are)
	 *  Applications Specific URLs are created in AgendaPanel.hyperlinkUpdate();
	 *  s += "<table><tr><td><a href=\"memoranda:newtask\"><b>"+Local.getString("New Task")+"</a></td></tr></table>";
	 */
	s += generateProjectInfo(CurrentProject.get(), date, expandedTasks);        
	for (Iterator i = ProjectManager.getActiveProjects().iterator();
			i.hasNext();
			) {
		Project p = (Project) i.next();
		if (!p.getID().equals(CurrentProject.get().getID()))
			s += generateProjectInfo(p, date, expandedTasks);
	}
	return s + "</td>";
}
 
开发者ID:cst316,项目名称:spring16project-Korn,代码行数:21,代码来源:AgendaGenerator.java

示例12: populateMap

import net.sf.memoranda.ProjectManager; //导入依赖的package包/类
private void populateMap() {
	Iterator<Project> itr = ProjectManager.getAllProjects().iterator();
	while (itr.hasNext()) {
		Project current = itr.next();
		HashMap<String,String> currentMap = new HashMap<String,String>();
		prjToTagToEditedMap.put(current, currentMap);
		
		String[] tags = current.getTagsArray();
		for (int i = 0; i < tags.length; i++) {
			currentMap.put(tags[i], tags[i]);
		}
	}
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:14,代码来源:EditProjectTagController.java

示例13: openProjectManager

import net.sf.memoranda.ProjectManager; //导入依赖的package包/类
/**
 * @see net.sf.memoranda.util.Storage#openProjectManager()
 */
public void openProjectManager() {
    if (!new File(JN_DOCPATH + ".projects").exists()) {
        ProjectManager._doc = null;
        return;
    }
    /*DEBUG*/
    System.out.println(
        "[DEBUG] Open project manager: " + JN_DOCPATH + ".projects");
    ProjectManager._doc = openDocument(JN_DOCPATH + ".projects");
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:14,代码来源:FileStorage.java

示例14: storeProjectManager

import net.sf.memoranda.ProjectManager; //导入依赖的package包/类
/**
 * @see net.sf.memoranda.util.Storage#storeProjectManager(nu.xom.Document)
 */
public void storeProjectManager() {
    /*DEBUG*/
    System.out.println(
        "[DEBUG] Save project manager: " + JN_DOCPATH + ".projects");
    saveDocument(ProjectManager._doc, JN_DOCPATH + ".projects");
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:10,代码来源:FileStorage.java

示例15: generateAllProjectsInfo

import net.sf.memoranda.ProjectManager; //导入依赖的package包/类
static String generateAllProjectsInfo(CalendarDate date, Collection expandedTasks) {
	String s = "<td width=\"66%\" valign=\"top\">" + "<h1>" + Local.getString("PROJECTS, TASKS AND TAGS")
			+ "</h1>\n";
	s += generateProjectInfo(CurrentProject.get(), date, expandedTasks);
	for (Iterator i = ProjectManager.getActiveProjects().iterator(); i.hasNext();) {
		Project p = (Project) i.next();
		if (!p.getID().equals(CurrentProject.get().getID()))
			s += generateProjectInfo(p, date, expandedTasks);

	}
	return s + "</td>";
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:13,代码来源:AgendaGenerator.java


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