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


Java CurrentProject类代码示例

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


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

示例1: currentProjectChanged

import net.sf.memoranda.CurrentProject; //导入依赖的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));*/
        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,项目名称:Neukoelln_SER316,代码行数:25,代码来源:DailyItemsPanel.java

示例2: selectPanel

import net.sf.memoranda.CurrentProject; //导入依赖的package包/类
public void selectPanel(String pan) {
      if (calendar.jnCalendar.renderer.getTask() != null) {
          calendar.jnCalendar.renderer.setTask(null);
       //   calendar.jnCalendar.updateUI();
      }
      if (pan.equals("TASKS") && (tasksPanel.taskTable.getSelectedRow() > -1)) {
          Task t =
              CurrentProject.getTaskList().getTask(
                  tasksPanel
                      .taskTable
                      .getModel()
                      .getValueAt(tasksPanel.taskTable.getSelectedRow(), TaskTable.TASK_ID)
                      .toString());
          calendar.jnCalendar.renderer.setTask(t);
     //     calendar.jnCalendar.updateUI();
      }
      boolean isAg = pan.equals("AGENDA");
      agendaPanel.setActive(isAg);
      if (isAg)
      	agendaPanel.refresh(CurrentDate.get());
      cardLayout1.show(editorsPanel, pan);
      cardLayout2.show(mainTabsPanel, pan + "TAB");
calendar.jnCalendar.updateUI();
CurrentPanel=pan;
  }
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:26,代码来源:DailyItemsPanel.java

示例3: selectPanel

import net.sf.memoranda.CurrentProject; //导入依赖的package包/类
public void selectPanel(String pan) {
      if (calendar.jnCalendar.renderer.getTask() != null) {
          calendar.jnCalendar.renderer.setTask(null);
       //   calendar.jnCalendar.updateUI();
      }
      if (pan.equals("TASKS") && (tasksPanel.taskTable.getSelectedRow() > -1)) {
          Task t =
              CurrentProject.getTaskList().getTask(
                  tasksPanel
                      .taskTable
                      .getModel()
                      .getValueAt(tasksPanel.taskTable.getSelectedRow(), TaskTable.TASK_ID)
                      .toString());
          calendar.jnCalendar.renderer.setTask(t);
     //     calendar.jnCalendar.updateUI();
      }
      boolean isAg = pan.equals("AGENDA");
      agendaPanel.setActive(isAg);
      if (isAg)
      	agendaPanel.refresh(CurrentDate.get());                
  	cardLayout1.show(editorsPanel, pan);
      cardLayout2.show(mainTabsPanel, pan + "TAB");
calendar.jnCalendar.updateUI();
CurrentPanel=pan;
  }
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:26,代码来源:DailyItemsPanel.java

示例4: generateAllProjectsInfo

import net.sf.memoranda.CurrentProject; //导入依赖的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,项目名称:Reinickendorf_SER316,代码行数:17,代码来源:AgendaGenerator.java

示例5: fillPSPFields

import net.sf.memoranda.CurrentProject; //导入依赖的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

示例6: initTable

import net.sf.memoranda.CurrentProject; //导入依赖的package包/类
/**
 * Create table for resources panel.
 */
public void initTable() {
    Vector v = CurrentProject.getResourcesList().getAllResources();
    files = new Vector();
    for (int i = 0; i < v.size(); i++) {
        Resource r = (Resource)v.get(i);
        if (!r.isInetShortcut()) {
            File f = new File(r.getPath());
            if (f.isFile())
                files.add(r);
        }
        else 
            files.add(r);
    }

}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:19,代码来源:ResourcesTable.java

示例7: selectPanel

import net.sf.memoranda.CurrentProject; //导入依赖的package包/类
/**
 * Based on the panel selected refresh the GUI.
 * @param pan
 */
public void selectPanel(String pan) {
    if (calendar.jnCalendar.renderer.getTask() != null) {
        calendar.jnCalendar.renderer.setTask(null);
     //   calendar.jnCalendar.updateUI();
    }
    if (pan.equals("TASKS") && (tasksPanel.taskTable.getSelectedRow() > -1)) {
        Task t =
            CurrentProject.getTaskList().getTask(
                tasksPanel
                    .taskTable
                    .getModel()
                    .getValueAt(tasksPanel.taskTable.getSelectedRow(), TaskTable.TASK_ID)
                    .toString());
        calendar.jnCalendar.renderer.setTask(t);
   //     calendar.jnCalendar.updateUI();
    }
    boolean isAg = pan.equals("AGENDA");
    if (isAg)
        dayViewPanel.changeDay(CurrentDate.get());
    cardLayout1.show(editorsPanel, pan);
    cardLayout2.show(mainTabsPanel, pan + "TAB");
    calendar.jnCalendar.updateUI();
    CurrentPanel=pan;
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:29,代码来源:DailyItemsPanel.java

示例8: makeExpandButton

import net.sf.memoranda.CurrentProject; //导入依赖的package包/类
/**
 * Makes the button that the user can press to make a project the current
 * project.
 * @param color the color of the button
 * @return button
 */
private JButton makeExpandButton(Color color) {
    JButton button = new JButton("+");
    button.setFont(new Font(new JLabel().getFont().getName(), Font.BOLD, 18));
    button.setForeground(color);

    // Make the button look like a label
    button.setOpaque(false);
    button.setContentAreaFilled(false);
    button.setBorderPainted(false);

    // Change the current project
    button.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            CurrentProject.set(project);
            parentPanel.projectChanged();
        }
    });

    return button;
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:28,代码来源:DayViewProjectListing.java

示例9: test

import net.sf.memoranda.CurrentProject; //导入依赖的package包/类
@Test
public void test() {
	
	TaskTable taskTable = new TaskTable();
	
	int rc = taskTable.getRowCount();
	taskTable.selectAll();
	int[] list = taskTable.getSelectedRows();
	for(int i = 0; i < rc; i++){
		Task t =
				CurrentProject.getTaskList().getTask(
		                taskTable.getModel().getValueAt(list[i], TaskTable.TASK_ID).toString());
		assertFalse(t.getID() == "100");
	}
	
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:17,代码来源:TestCase.java

示例10: ResourcesTable

import net.sf.memoranda.CurrentProject; //导入依赖的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,项目名称:SER316-Munich,代码行数:20,代码来源:ResourcesTable.java

示例11: ResourcesTable

import net.sf.memoranda.CurrentProject; //导入依赖的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, PSP psp) {

		}

		public void projectWasChanged() {
			tableChanged();
		}
	});
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:21,代码来源:ResourcesTable.java

示例12: getTaskTime

import net.sf.memoranda.CurrentProject; //导入依赖的package包/类
/**
 * This method gets the task time and returns it in a string format
 * of the total minutes. 
 * @param taskID the taskID to get time from.
 * @return This is the total time of that phase. 
 */
public String getTaskTime(String taskID){
	DecimalFormat formatter = new DecimalFormat("#0.00");
	PSP cuPSP = CurrentProject.getPSP();
	String ID = cuPSP.gettipAttr(taskID);
	Task task = CurrentProject.getTaskList().getTask(ID);
	String amount = task.getTimeSpent();
	if(amount.compareTo("No time logged.")==0){
		return("0.0");
	} 
	else{
		int toFigure = task.getSpentDays();
		toFigure = toFigure*24;
		toFigure +=task.getSpentHours();
		toFigure = toFigure*60;
		toFigure +=task.getSpentMinutes();
		return(formatter.format(toFigure));
	}
	
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:26,代码来源:PSPTrackingPanel.java

示例13: ResourcesTable

import net.sf.memoranda.CurrentProject; //导入依赖的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, TimeLogList tll, ResourcesList rl) {                
           
        }
        public void projectWasChanged() {
             tableChanged();
        }
    });
}
 
开发者ID:ser316asu,项目名称:Wilmersdorf_SER316,代码行数:20,代码来源:ResourcesTable.java

示例14: parentTimeLog_actionPerformed

import net.sf.memoranda.CurrentProject; //导入依赖的package包/类
void parentTimeLog_actionPerformed(ActionEvent e) {
	String timelogID = timeLogTable.getModel().getValueAt(timeLogTable.getSelectedRow(), timeLogTable.TIMELOG_ID).toString();

	TimeLog tl = CurrentProject.getTimeLogList().getTimeLog(timelogID);
	/*XXX Task t2 = CurrentProject.getTaskList().getTask(taskTable.getCurrentRootTask());

       String parentTaskId = t2.getParent();
       if((parentTaskId == null) || (parentTaskId.equals(""))) {
           parentTaskId = null;
       }
       taskTable.setCurrentRootTask(parentTaskId); 
       taskTable.tableChanged();*/

	parentPanel.updateIndicators();
	//taskTable.updateUI();
}
 
开发者ID:ser316asu,项目名称:Wilmersdorf_SER316,代码行数:17,代码来源:TimeLogPanel.java

示例15: newResB_actionPerformed

import net.sf.memoranda.CurrentProject; //导入依赖的package包/类
void newResB_actionPerformed(ActionEvent e) {
	AddResourceDialog dlg = new AddResourceDialog(App.getFrame(), Local.getString("New resource"));
	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;
	if (dlg.localFileRB.isSelected()) {
		String fpath = dlg.pathField.getText();
		String description = dlg.descriptionField.getText();
		MimeType mt = MimeTypesList.getMimeTypeForFile(fpath);
		if (mt.getMimeTypeId().equals("__UNKNOWN")) {
			mt = addResourceType(fpath);
			if (mt == null)
				return;
		}
		if (!checkApp(mt))
			return;
		// if file if projectFile, than copy the file and change url.
		if (dlg.projectFileCB.isSelected()) {
			fpath = copyFileToProjectDir(fpath);
			CurrentProject.getResourcesList().addResource(fpath, description, false, true);
		} else
			CurrentProject.getResourcesList().addResource(fpath, description);
		resourcesTable.tableChanged();
	} else {
		if (!Util.checkBrowser())
			return;
		CurrentProject.getResourcesList().addResource(dlg.urlField.getText(), dlg.descriptionField.getText(), true,
				false);
		resourcesTable.tableChanged();
	}
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:36,代码来源:ResourcesPanel.java


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