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


Java ProjectManager.getActiveProjectsNumber方法代码示例

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


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

示例1: 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));
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:13,代码来源:ProjectManagerTest.java

示例2: getRowCount

import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@Override
public int getRowCount() {
	if (activeOnly) {
		return ProjectManager.getActiveProjectsNumber();
	}
	return ProjectManager.getAllProjectsNumber();
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:8,代码来源:ProjectsTablePanel.java

示例3: RemoveProjAction

import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
public  RemoveProjAction() {
    super(Local.getString("Delete Project"), 
    new ImageIcon(AppFrame.class.getResource("resources/icons/removeproject.png")));
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.ALT_MASK));
    if(!CurrentProject.get().getTitle().equals("Default Project") || 
    		ProjectManager.getActiveProjectsNumber() > 1) 
    	setEnabled(true);
    else
    	setEnabled(false);
    refresh(CurrentDate.get());

}
 
开发者ID:cst316,项目名称:spring16project-Korn,代码行数:13,代码来源:AgendaPanel.java

示例4: refreshProjButtons

import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
static void refreshProjButtons() {
	//Refreshes delete project button.
	if(!CurrentProject.get().getTitle().equals("Default Project") || 
       		ProjectManager.getActiveProjectsNumber() > 1) 
       	removeProjB.setEnabled(true);
       else
       	removeProjB.setEnabled(false);
}
 
开发者ID:cst316,项目名称:spring16project-Korn,代码行数:9,代码来源:AgendaPanel.java

示例5: BDeleteProject_actionPerformed

import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
public void BDeleteProject_actionPerformed(ActionEvent e) {
	String msg;
	Project prj;
	prj = CurrentProject.get();
	msg = Local.getString("Delete project")
				+ " '"
				+ prj.getTitle()
				+ "'.\n"
				+ Local.getString("Are you sure?");

	int n =
		JOptionPane.showConfirmDialog(
			App.getFrame(),
			msg,
			Local.getString("Delete project"),
			JOptionPane.YES_NO_OPTION);
	if (n != JOptionPane.YES_OPTION)
		return;
	
	if(ProjectManager.getActiveProjectsNumber() > 1) 
		if(((Project)ProjectManager.getActiveProjects().toArray()[1]).equals(prj))
			CurrentProject.set((Project)(ProjectManager.getActiveProjects().toArray()[0]));
		else
			CurrentProject.set((Project)(ProjectManager.getActiveProjects().toArray()[1]));
	else
		CurrentProject.set(ProjectManager.createProject("Default Project", CalendarDate.today(), null));
	ProjectManager.removeProject(prj.getID());
	CurrentProject.set(CurrentProject.get());
	CurrentStorage.get().storeProjectManager();
	prjTablePanel.projectsTable.clearSelection();
	prjTablePanel.updateUI();
	setMenuEnabled(false);
	AgendaPanel.refresh(CalendarDate.today());
}
 
开发者ID:cst316,项目名称:spring16project-Korn,代码行数:35,代码来源:ProjectsPanel.java

示例6: getRowCount

import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
public int getRowCount() {
    if (activeOnly)
        return ProjectManager.getActiveProjectsNumber();
    return ProjectManager.getAllProjectsNumber();
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:6,代码来源:ProjectsTablePanel.java


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