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


Java Project类代码示例

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


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

示例1: getTreeCellRendererComponent

import net.sf.memoranda.Project; //导入依赖的package包/类
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected,
        boolean expanded, boolean leaf, int row, boolean hasFocus) {
    // if root then just return some component
    // it is not shown anyway
    super.getTreeCellRendererComponent(
            tree, value, selected,
            expanded, leaf, row,
            hasFocus);
    if (value instanceof Project)
        return empty_panel;
    if (!(value instanceof Task))
        return empty_panel;
    Task t = (Task) value; 
    setText(t.getText());
    setToolTipText(t.getDescription());
    setIcon(getStatusIcon(t));
    applyFont(t, this);
    //return getTaskTreeCellRenderer(t, selected, hasFocus);
    return this;
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:21,代码来源:TaskTreeTableCellRenderer.java

示例2: ResourcesTable

import net.sf.memoranda.Project; //导入依赖的package包/类
public ResourcesTable() {
    super();
    initTable();
    sorter = new TableSorter(new ResourcesTableModel());
    sorter.addMouseListenerToHeaderInTable(this);
    setModel(sorter);
    this.setShowGrid(false);
    this.setFont(new Font("Dialog",0,11));
    initColumsWidth();
    //this.setModel(new ResourcesTableModel());
    CurrentProject.addProjectListener(new ProjectListener() {
        public void projectChange(Project p, NoteList nl, TaskList tl, ResourcesList rl) {                
           
        }
        public void projectWasChanged() {
             tableChanged();
        }
    });
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:20,代码来源:ResourcesTable.java

示例3: openNoteList

import net.sf.memoranda.Project; //导入依赖的package包/类
/**
 * @see net.sf.memoranda.util.Storage#openNoteList(net.sf.memoranda.Project)
 */
public NoteList openNoteList(Project prj) {
    String fn = JN_DOCPATH + prj.getID() + File.separator + ".notes";
    if (documentExists(fn)) {
        /*DEBUG*/
        System.out.println(
            "[DEBUG] Open note list: "
                + JN_DOCPATH
                + prj.getID()
                + File.separator
                + ".notes");
        return new NoteListImpl(openDocument(fn), prj);
    }
    else {
        /*DEBUG*/
        System.out.println("[DEBUG] New note list created");
        return new NoteListImpl(prj);
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:22,代码来源:FileStorage.java

示例4: generateAllProjectsInfo

import net.sf.memoranda.Project; //导入依赖的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-Ingolstadt,代码行数:17,代码来源:AgendaGenerator.java

示例5: currentProjectChanged

import net.sf.memoranda.Project; //导入依赖的package包/类
void currentProjectChanged(Project newprj, NoteList nl, TaskList tl, ResourcesList rl) {
//		Util.debug("currentProjectChanged");
        Cursor cur = App.getFrame().getCursor();
        App.getFrame().setCursor(waitCursor);
        if (!changedByHistory)
            History.add(new HistoryItem(CurrentDate.get(), newprj));
        if (editorPanel.isDocumentChanged())
            saveNote();
        /*if ((currentNote != null) && !changedByHistory && !addedToHistory)
                    History.add(new HistoryItem(currentNote));*/
        notesControlPane.refresh();
        eventsControlPane.refresh();

        CurrentProject.save();        
        
        /*addedToHistory = false;
        if (!changedByHistory) {
            if (currentNote != null) {
                History.add(new HistoryItem(currentNote));
                addedToHistory = true;
            }
        }*/
        
        updateIndicators(CurrentDate.get(), tl);
        App.getFrame().setCursor(cur);
    }
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:27,代码来源:DailyItemsPanel.java

示例6: ResourcesTable

import net.sf.memoranda.Project; //导入依赖的package包/类
/**
 * Initialize resources table.
 */
public ResourcesTable() {
    super();
    initTable();
    sorter = new TableSorter(new ResourcesTableModel());
    sorter.addMouseListenerToHeaderInTable(this);
    setModel(sorter);
    this.setShowGrid(false);
    this.setFont(new Font("Dialog",0,11));
    initColumsWidth();
    //this.setModel(new ResourcesTableModel());
    CurrentProject.addProjectListener(new ProjectListener() {
        public void projectChange(Project p, NoteList nl, TaskList tl, ResourcesList rl) {                
           
        }
        public void projectWasChanged() {
             tableChanged();
        }
    });
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:23,代码来源:ResourcesTable.java

示例7: getStatusString

import net.sf.memoranda.Project; //导入依赖的package包/类
String getStatusString(int status) {
    switch (status) {
        case Project.ACTIVE :
            return Local.getString("Active");
        case Project.COMPLETED :
            return Local.getString("Completed");
        case Project.FAILED :
            return Local.getString("Failed");
        case Project.FROZEN :
            return Local.getString("Frozen");
        case Project.SCHEDULED :
            return Local.getString("Scheduled");
        default:
          return "";
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:17,代码来源:ProjectsTablePanel.java

示例8: openNoteList

import net.sf.memoranda.Project; //导入依赖的package包/类
/**
 * @see net.sf.memoranda.util.Storage#openNoteList(net.sf.memoranda.Project)
 */
public NoteList openNoteList(Project prj) {
    String fn = JN_DOCPATH + prj.getID() + File.separator + ".notes";
    if (documentExists(fn)) {
        Util.debug(
            "Open note list: "
                + JN_DOCPATH
                + prj.getID()
                + File.separator
                + ".notes");
        return new NoteListImpl(openDocument(fn), prj);
    }
    else {
        Util.debug("New note list created");
        return new NoteListImpl(prj);
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:20,代码来源:FileStorage.java

示例9: noteToDocument

import net.sf.memoranda.Project; //导入依赖的package包/类
private Document noteToDocument(Note note, String noteHtmlContents) {
	Document d = new Document ();
	
	String id = note.getId ();
	
	Project project = note.getProject();
	
	String projectId = project.getID();
	String projectName = project.getTitle();
	String title = note.getTitle ();		
	String date = note.getDate() != null ? new SimpleDateFormat ("yyyy-MM-dd").format(note.getDate().getDate()) : null;
	
	d.add (new StringField ("id", id, Field.Store.YES));
	d.add (new StringField ("project_id", projectId, Field.Store.YES));
	d.add (new StoredField ("project_name", projectName));
	d.add (new TextField ("title", title, Field.Store.YES));
	d.add (new TextField ("title_cs", title, Field.Store.YES));
	d.add (new TextField ("date", date != null ? date : "", Field.Store.YES));
	d.add (new TextField ("body", noteHtmlContents, Field.Store.YES));
			
	return d;
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:23,代码来源:NoteIndexer.java

示例10: fillPSPFields

import net.sf.memoranda.Project; //导入依赖的package包/类
private void fillPSPFields(Project prj, ProjectDialog dlg) {
	String getPrjLOCcount = "";
	ProjectLOCHandler projectLOCHandler = new ProjectLOCHandler(prj.getID());
	dlg.showPSPAttrs();
	getPrjLOCcount = new ProjectLOCHandler(prj.getID()).getProjectLOC();
	
	dlg.estimatedTime.setText(((PSPProject)prj).getPSPAttr("estimatedTime"));
	dlg.estimatedSize.setText(Local.getString(((PSPProject)prj).getPSPAttr("estimatedSize")));
	dlg.totalTime.setText(Local.getString(((PSPProject) prj).getPSPAttr("totalTime")));
	dlg.totalDefectsInjected.setText(Integer.toString(CurrentProject.getTaskList().calculateTotalInjectedDefects()));
	dlg.totalDefectsRemoved.setText(Local.getString(((PSPProject) prj).getPSPAttr("totalDefectsRemoved")));	        
	dlg.totalLocCountField.setText(projectLOCHandler.getProjectLOC());
	dlg.defectLocRatioField.setText(Double.toString(CurrentProject.getTaskList().calculateInjecteDefectsToLocRatio()));
	
	// dlg.programSize.setText(Local.getString(((PSPProject) prj).getPSPAttr("programSize")));
	
	Util.debug("LOC set up to UI : "+ getPrjLOCcount);
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:19,代码来源:ProjectsPanel.java

示例11: getTreeCellRendererComponent

import net.sf.memoranda.Project; //导入依赖的package包/类
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected,
        boolean expanded, boolean leaf, int row, boolean hasFocus) {
    // if root then just return some component
    // it is not shown anyway
    super.getTreeCellRendererComponent(
            tree, value, selected,
            expanded, leaf, row,
            hasFocus);
    if (value instanceof Project)
        return empty_panel;
    if (!(value instanceof TimeLog))
        return empty_panel;
    TimeLog tl = (TimeLog) value; 
    setText(tl.getTimeLogTask());
    setToolTipText(tl.getDescription());
    return this;
}
 
开发者ID:ser316asu,项目名称:Wilmersdorf_SER316,代码行数:18,代码来源:TimeLogTableCellRenderer.java

示例12: expandRecursively

import net.sf.memoranda.Project; //导入依赖的package包/类
/**
 * @param t
 * @param expandedTasks
 */
private static String expandRecursively(Project p,CalendarDate date, TaskList tl,Task t, Collection expandedTasks, int level) {
	Util.debug("Expanding task " + t.getText() + " level " + level);

	Collection st = tl.getActiveSubTasks(t.getID(),date);

	Util.debug("number of subtasks " + st.size());

	String s = "\n<ul>\n";

	for (Iterator iter = st.iterator(); iter.hasNext();) {
		Task subTask = (Task) iter.next();
		//			if(Context.get("SHOW_ACTIVE_TASKS_ONLY").equals(new Boolean(true))) {
		//                if (!((subTask.getStatus() == Task.ACTIVE) || (subTask.getStatus() == Task.DEADLINE) || (subTask.getStatus() == Task.FAILED))) {
		//                	continue;
		//            	}	
		//			}
		s = s + renderTask(p,date,tl,subTask,level,expandedTasks);
		if (expandedTasks.contains(subTask.getID())) {
			s = s + expandRecursively(p,date,tl,subTask,expandedTasks,level + 1);
		}
	}
	s += "\n</ul>\n";

	return s;
}
 
开发者ID:ser316asu,项目名称:Wilmersdorf_SER316,代码行数:30,代码来源:AgendaGenerator.java

示例13: addTagToProject

import net.sf.memoranda.Project; //导入依赖的package包/类
public static boolean addTagToProject(String tag, Project prj) {
	if (tag==null || prj == null) return false;
	tag = tag.toLowerCase();

	try{
		if (!tags.contains(tag)) {
			tags.add(tag);
		}
		return prj.addTag(tag);
	}
	catch(Exception e){
		Util.error(e);
		return false;
	}
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:16,代码来源:Tag.java

示例14: removeTagFromProject

import net.sf.memoranda.Project; //导入依赖的package包/类
public static boolean removeTagFromProject(String tag, Project prj) {
	if (tag==null || prj==null) return false;
	tag = tag.toLowerCase();
	
	try {
		if (!tags.contains(tag)) {
			return false;
		}
		return prj.removeTag(tag);
	} catch (Exception e) {
		Util.error(e);
		return false;
	}
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:15,代码来源:Tag.java

示例15: createProjectStorage

import net.sf.memoranda.Project; //导入依赖的package包/类
/**
 * @see net.sf.memoranda.util.Storage#createProjectStorage(net.sf.memoranda.Project)
 */
public void createProjectStorage(Project prj) {
    /*DEBUG*/
    System.out.println(
        "[DEBUG] Create project dir: " + JN_DOCPATH + prj.getID());
    File dir = new File(JN_DOCPATH + prj.getID());
    dir.mkdirs();
}
 
开发者ID:ser316asu,项目名称:Wilmersdorf_SER316,代码行数:11,代码来源:FileStorage.java


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