本文整理汇总了Java中net.sf.memoranda.Project.getTitle方法的典型用法代码示例。如果您正苦于以下问题:Java Project.getTitle方法的具体用法?Java Project.getTitle怎么用?Java Project.getTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.Project
的用法示例。
在下文中一共展示了Project.getTitle方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: generateProjectInfo
import net.sf.memoranda.Project; //导入方法依赖的package包/类
static String generateProjectInfo(Project p, CalendarDate date, Collection expandedTasks) {
String s = "<h2><a href=\"memoranda:project#" + p.getID() + "\">" + p.getTitle() + "</a></h2>\n"
+ "<table border=\"0\" width=\"100%\" cellpadding=\"2\" bgcolor=\"#D4F6F6\"><tr><td>"
+ Local.getString("Start date") + ": <i>" + p.getStartDate().getMediumDateString() + "</i>\n";
if (p.getEndDate() != null)
s += "<br>" + Local.getString("End date") + ": <i>" + p.getEndDate().getMediumDateString() + "</i>\n";
return s + generateTasksInfo(p, date, expandedTasks) + generateTagsInfo(p);
}
示例3: generateProjectInfo
import net.sf.memoranda.Project; //导入方法依赖的package包/类
static String generateProjectInfo(Project p, CalendarDate date, Collection expandedTasks) {
String s = "<h2><a href=\"memoranda:project#"
+ p.getID()
+ "\">"
+ p.getTitle()
+ "</a></h2>\n"
+ "<table border=\"0\" width=\"100%\" cellpadding=\"2\" bgcolor=\"#EFEFEF\"><tr><td>"
+ Local.getString("Start date")+": <i>"+p.getStartDate().getMediumDateString()+"</i>\n";
if (p.getEndDate() != null)
s += "<br>" + Local.getString("End date")+": <i>"+p.getEndDate().getMediumDateString()
+"</i>\n";
return s + generateTasksInfo(p, date,expandedTasks);
}
示例4: ppDeleteProject_actionPerformed
import net.sf.memoranda.Project; //导入方法依赖的package包/类
void ppDeleteProject_actionPerformed(ActionEvent e) {
String msg;
Project prj;
Vector toremove = new Vector();
if (prjTablePanel.projectsTable.getSelectedRows().length > 1)
msg =
Local.getString("Delete")
+ " "
+ prjTablePanel.projectsTable.getSelectedRows().length
+ " "
+ Local.getString("projects")
+ "\n"
+ Local.getString("Are you sure?");
else {
prj = prjTablePanel.getSelectedProject();
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;
for (int i = 0;
i < prjTablePanel.projectsTable.getSelectedRows().length;
i++) {
prj =
(net.sf.memoranda.Project) prjTablePanel
.projectsTable
.getModel()
.getValueAt(
prjTablePanel.projectsTable.getSelectedRows()[i],
ProjectsTablePanel.PROJECT);
toremove.add(prj.getID());
}
for (int i = 0; i < toremove.size(); i++) {
ProjectManager.removeProject((String) toremove.get(i));
}
CurrentStorage.get().storeProjectManager();
prjTablePanel.projectsTable.clearSelection();
prjTablePanel.updateUI();
setMenuEnabled(false);
}
示例5: removeProject_actionPerformed
import net.sf.memoranda.Project; //导入方法依赖的package包/类
void removeProject_actionPerformed(ActionEvent e) {
String msg;
Project prj;
Vector toremove = new Vector();
if (mainPanel.projectsTable.getSelectedRows().length > 1){
msg =
Local.getString("Delete")
+ " "
+ mainPanel.projectsTable.getSelectedRows().length
+ " "
+ Local.getString("projects")
+ "\n"
+ Local.getString("Are you sure?");
} else {
prj = mainPanel.getSelectedProject();
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;
}
for (int i = 0;i < mainPanel.projectsTable.getSelectedRows().length;i++) {
prj =
(net.sf.memoranda.Project) mainPanel
.projectsTable
.getModel()
.getValueAt(
mainPanel.projectsTable.getSelectedRows()[i],
ProjectsTablePanel.PROJECT);
toremove.add(prj.getID());
}
for (int i = 0; i < toremove.size(); i++) {
ProjectManager.removeProject((String) toremove.get(i));
}
CurrentStorage.get().storeProjectManager();
mainPanel.projectsTable.clearSelection();
mainPanel.updateUI();
//setMenuEnabled(false);
}
示例6: ppDeleteProject_actionPerformed
import net.sf.memoranda.Project; //导入方法依赖的package包/类
void ppDeleteProject_actionPerformed(ActionEvent e) {
String msg;
Project prj;
Vector<String> toRemove = new Vector<String>();
if (prjTablePanel.projectsTable.getSelectedRows().length > 1)
msg =
Local.getString("Delete")
+ " "
+ prjTablePanel.projectsTable.getSelectedRows().length
+ " "
+ Local.getString("projects")
+ "\n"
+ Local.getString("Are you sure?");
else {
prj = prjTablePanel.getSelectedProject();
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;
for (int i = 0;
i < prjTablePanel.projectsTable.getSelectedRows().length;
i++) {
prj =
(net.sf.memoranda.Project) prjTablePanel
.projectsTable
.getModel()
.getValueAt(
prjTablePanel.projectsTable.getSelectedRows()[i],
ProjectsTablePanel.PROJECT);
toRemove.add(prj.getID());
}
for (String remove : toRemove) {
ProjectManager.removeProject(remove);
}
CurrentStorage.get().storeProjectManager();
prjTablePanel.projectsTable.clearSelection();
prjTablePanel.updateUI();
setMenuEnabled(false);
}