本文整理汇总了Java中net.sf.memoranda.ProjectImpl类的典型用法代码示例。如果您正苦于以下问题:Java ProjectImpl类的具体用法?Java ProjectImpl怎么用?Java ProjectImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ProjectImpl类属于net.sf.memoranda包,在下文中一共展示了ProjectImpl类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import net.sf.memoranda.ProjectImpl; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
CalendarDate calendarDate1 = new CalendarDate(1, 1, 1970);
Element root1 = new Element("root");
root1.addAttribute(new Attribute("id", "1"));
Project project1 = new ProjectImpl(root1);
histItem1 = new HistoryItem(calendarDate1, project1);
histItem2 = new HistoryItem(calendarDate1, project1);
Element root2 = new Element("root");
root2.addAttribute(new Attribute("id", "2"));
Project project2 = new ProjectImpl(root2);
histItem3 = new HistoryItem(calendarDate1, project2);
CalendarDate calendarDate2 = new CalendarDate(4, 28, 2017);
histItem4 = new HistoryItem(calendarDate2, project1);
}
示例2: search
import net.sf.memoranda.ProjectImpl; //导入依赖的package包/类
private void search() {
try {
DefaultTableModel model = (DefaultTableModel)results.getModel();
Vector<Project> projects = new Vector<Project>();
String selectedItem = tagSelectBox.getSelectedItem().toString();
if(!selectedItem.equals("") && !selectedItem.equals(" ")){
projects=ProjectImpl.findProjectByAllTagName(tagSelectBox.getSelectedItem().toString());
}
else if (!manualTagTextField.getText().toString().equals("")){
projects=ProjectImpl.findProjectByAllTagName(manualTagTextField.getText().toString());
}
if(projects.size()==0){
JOptionPane.showMessageDialog(null, Local.getString("No project found for this tag"));
}
else {
model.setRowCount(0);
for(int i=0;i < projects.size();i++){
model.addRow(new Object[]{projects.get(i).getTitle(), projects.get(i).getTagsAsString()});
}
}
} catch (NullPointerException e) {
Util.error(e);
JOptionPane.showMessageDialog(null, Local.getString("No project found for this tag"));
}
}
示例3: generateTagsInfo
import net.sf.memoranda.ProjectImpl; //导入依赖的package包/类
static String generateTagsInfo(Project p) {
String s = "";
if (ProjectImpl.getTagList(p) == "no") {
s += "<p>" + Local.getString("No tags") + ".</p>\n";
} else {
s += "<p>" + Local.getString("Tags")+": " + ProjectImpl.getTagList(p) + ".</p>\n";
}
return s;
}
示例4: testGetTagsNumber
import net.sf.memoranda.ProjectImpl; //导入依赖的package包/类
@Test
public void testGetTagsNumber() {
Elements prjs = projects.getRootElement().getChildElements("project");
int number=0;
for (int i = 0; i < prjs.size(); i++) {
number+=prjs.get(i).getFirstChildElement("tags").getChildCount();
Project ptest= new ProjectImpl(prjs.get(i));
assertTrue(ptest.getTitle() instanceof String);
assertTrue(ptest instanceof Project);
}
assertTrue(number > 0);
assertFalse(number < 0);
}
示例5: setUp
import net.sf.memoranda.ProjectImpl; //导入依赖的package包/类
/**
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception {
String id = Util.generateId();
Element elem = new Element("project");
elem.addAttribute(new Attribute("id", id));
Project testPrj = new ProjectImpl(elem);
testTL = new TaskListImpl(testPrj);
}
示例6: setUp
import net.sf.memoranda.ProjectImpl; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
String id = Util.generateId();
Element elem = new Element("project");
elem.addAttribute(new Attribute("id", id));
Project testPrj = new ProjectImpl(elem);
testPSP = new PSPListImpl(testPrj);
}
示例7: testGetAllTags
import net.sf.memoranda.ProjectImpl; //导入依赖的package包/类
@Test
public void testGetAllTags() {
assertTrue(ProjectImpl.getAllTags().size() > 0);
assertTrue(ProjectImpl.getAllTags().get(0) instanceof String);
}
示例8: testFindProjectByAllTagName
import net.sf.memoranda.ProjectImpl; //导入依赖的package包/类
@Test
public void testFindProjectByAllTagName() {
assertTrue(ProjectImpl.findProjectByAllTagName(tag3).size() > 0);
assertTrue(ProjectImpl.findProjectByAllTagName(tag3).get(0) instanceof Project);
assertTrue(ProjectImpl.findProjectByAllTagName(tag3) instanceof Vector);
}
示例9: testAddTag
import net.sf.memoranda.ProjectImpl; //导入依赖的package包/类
@Test
public void testAddTag() {
Elements prjs = projects.getRootElement().getChildElements("project");
Project ptest= new ProjectImpl(prjs.get(0));
assertTrue(ptest.addTag("unit test"));
}