本文整理汇总了Java中net.sf.memoranda.util.Util.debug方法的典型用法代码示例。如果您正苦于以下问题:Java Util.debug方法的具体用法?Java Util.debug怎么用?Java Util.debug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.util.Util
的用法示例。
在下文中一共展示了Util.debug方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTaskElement
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
private Element getTaskElement(String id) {
/*Nodes nodes = XQueryUtil.xquery(_doc, "//task[@id='" + id + "']");
if (nodes.size() > 0) {
Element el = (Element) nodes.get(0);
return el;
}
else {
Util.debug("Task " + id + " cannot be found in project " + _project.getTitle());
return null;
} */
Element el = (Element)elements.get(id);
if (el == null) {
Util.debug("Task " + id + " cannot be found in project " + _project.getTitle());
}
return el;
}
示例2: changeDay
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
/**
* Changes the day to display information about.
* @param date the day to change to
*/
public void changeDay(CalendarDate date) {
Util.debug("Switch day view to display info for " + date);
lastDate = date;
removeAll();
repaint();
if (EventsManager.isFreeDay(date) && ProjectManager.isFreeDay(date)) {
add(freeDayPanel);
} else {
addTitle();
updateEvents(date);
updateProjects();
addBottomSpacer();
}
}
示例3: createTask
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
public Task createTask(CalendarDate startDate, CalendarDate endDate, String text, int priority, long effort, String description, String parentTaskId) {
Element el = new Element("task");
el.addAttribute(new Attribute("startDate", startDate.toString()));
el.addAttribute(new Attribute("endDate", endDate != null? endDate.toString():""));
String id = Util.generateId();
el.addAttribute(new Attribute("id", id));
el.addAttribute(new Attribute("progress", "0"));
el.addAttribute(new Attribute("effort", String.valueOf(effort)));
el.addAttribute(new Attribute("priority", String.valueOf(priority)));
Element txt = new Element("text");
txt.appendChild(text);
el.appendChild(txt);
Element desc = new Element("description");
desc.appendChild(description);
el.appendChild(desc);
if (parentTaskId == null) {
_root.appendChild(el);
}
else {
Element parent = getTaskElement(parentTaskId);
parent.appendChild(el);
}
elements.put(id, el);
Util.debug("Created task with parent " + parentTaskId);
return new TaskImpl(el, this);
}
示例4: getTimeLogElement
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
private Element getTimeLogElement(String id) {
Element el = (Element)elements.get(id);
if (el == null) {
Util.debug("Timelog " + id + " cannot be found in project " + _project.getTitle());
}
return el;
}
示例5: newEventB_actionPerformed
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
void newEventB_actionPerformed(ActionEvent e) {
Calendar cdate = CurrentDate.get().getCalendar();
// round down to hour
cdate.set(Calendar.MINUTE,0);
Util.debug("Default time is " + cdate);
newEventB_actionPerformed(e, null, cdate.getTime(), cdate.getTime());
}
示例6: actionPerformed
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent e) {
try {
undo.undo();
} catch (CannotUndoException ex) {
Util.debug("Unable to undo: " + ex);
ex.printStackTrace();
}
update();
redoAction.update();
}
示例7: copyFileToProjectDir
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
/**
* Copy a file to the directory of the current project
* @param srcStr The path of the source file.
* @param destStr The destination path.
* @return The new path of the file.
*/
String copyFileToProjectDir(String srcStr) {
String JN_DOCPATH = Util.getEnvDir();
String baseName;
int i = srcStr.lastIndexOf( File.separator );
if ( i != -1 ) {
baseName = srcStr.substring(i+1);
} else
baseName = srcStr;
String destStr = JN_DOCPATH + CurrentProject.get().getID()
+ File.separator + "_projectFiles" + File.separator + baseName;
File f = new File(JN_DOCPATH + CurrentProject.get().getID() + File.separator + "_projectFiles");
if (!f.exists()) {
f.mkdirs();
}
Util.debug("Copy file from: "+srcStr+" to: "+destStr);
try {
FileInputStream in = new FileInputStream(srcStr);
FileOutputStream out = new FileOutputStream(destStr);
byte[] buf = new byte[4096];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
out.close();
in.close();
}
catch (IOException e) {
System.err.println(e.toString());
}
return destStr;
}
示例8: refresh
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
public void refresh(CalendarDate date) {
viewer.setText(AgendaGenerator.getAgenda(date,expandedTasks));
SwingUtilities.invokeLater(new Runnable() {
public void run() {
if(gotoTask != null) {
viewer.scrollToReference(gotoTask);
scrollPane.setViewportView(viewer);
Util.debug("Set view port to " + gotoTask);
}
}
});
Util.debug("Summary updated.");
}
示例9: getTask
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
public Task getTask(String id) {
Util.debug("Getting task " + id);
return new TaskImpl(getTaskElement(id), this);
}
示例10: getTask
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
/**
* @see net.sf.memoranda.TaskList#getTask(String)
*/
public Task getTask(String id) {
Util.debug("Getting task " + id);
return new TaskImpl(getTaskElement(id), this);
}
示例11: createTimeLog
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
@Override
public TimeLog createTimeLog(CalendarDate startDate, String parentTimeLogID, String timeLogTaskName,
int startHour, int startMin, int startPeriod, int endHour, int endMin, int endPeriod,
int interruptTime, int deltaTime, String description) {
Element el = new Element("timelog");
el.addAttribute(new Attribute("startDate", startDate.toString()));
String id = Util.generateId();
el.addAttribute(new Attribute("id", id));
el.addAttribute(new Attribute("startHour", String.valueOf(startHour)));
el.addAttribute(new Attribute("startMin", String.valueOf(startMin)));
el.addAttribute(new Attribute("startPeriod", String.valueOf(startPeriod)));
el.addAttribute(new Attribute("endHour", String.valueOf(endHour)));
el.addAttribute(new Attribute("endMin", String.valueOf(endMin)));
el.addAttribute(new Attribute("endPeriod", String.valueOf(endPeriod)));
el.addAttribute(new Attribute("interruptTime", String.valueOf(interruptTime)));
el.addAttribute(new Attribute("deltaTime", String.valueOf(deltaTime)));
Element txt = new Element("timeLogTaskName");
txt.appendChild(timeLogTaskName);
el.appendChild(txt);
Element desc = new Element("description");
desc.appendChild(description);
el.appendChild(desc);
if (parentTimeLogID == null) {
_root.appendChild(el);
}
else {
Element parent = getTimeLogElement(parentTimeLogID);
parent.appendChild(el);
}
Util.debug("Created timelog with parent " + parentTimeLogID);
elements.put(id, el);
return new TimeLogImpl(el, this);
}
示例12: ppClearNote_actionPerformed
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
void ppClearNote_actionPerformed(ActionEvent e) {
String msg;
if (notesList.getSelectedIndices().length > 1)
msg =
Local.getString(Local.getString("Clear"))
+ " "
+ notesList.getSelectedIndices().length
+ " "
+ Local.getString("notes")
+ "\n"
+ Local.getString("Are you sure?");
else
msg =
Local.getString("Clear note")
+ "\n'"
+ ((Note) notesList.getNote(notesList.getSelectedIndex())).getDate().getFullDateString()
+ "'\n"
+ Local.getString("Are you sure?");
int n =
JOptionPane.showConfirmDialog(
App.getFrame(),
msg,
Local.getString("Clear note"),
JOptionPane.YES_NO_OPTION);
if (n != JOptionPane.YES_OPTION)
return;
for (int i = 0; i < notesList.getSelectedIndices().length; i++) {
Note note = (Note) notesList.getNote(notesList.getSelectedIndices()[i]);
if(CurrentProject.getNoteList().getActiveNote() != null && note.getDate().equals(CurrentProject.getNoteList().getActiveNote().getDate())){
Util.debug("Current note removed");
CurrentNote.set(null,true);
}
CurrentProject.getNoteList().removeNote(note.getDate(), note.getId());
CurrentStorage.get().removeNote(note);
}
bookmarksListPanel.notesList.update();
searchPanel.notesList.update();
notesListPanel.notesList.update();
notesList.updateUI();
notesList.clearSelection();
// notesList.requestFocus();*/
// ((AppFrame)App.getFrame()).workPanel.dailyItemsPanel.editorPanel.editor.requestFocus();
}
示例13: App
import net.sf.memoranda.util.Util; //导入方法依赖的package包/类
public App(boolean fullmode) {
super();
IconFontSwing.register(GoogleMaterialDesignIcons.getIconFont());
if (fullmode)
fullmode = !Configuration.get("START_MINIMIZED").equals("yes");
/* DEBUG */
if (!fullmode)
Util.debug("Minimized mode");
if (!Configuration.get("SHOW_SPLASH").equals("no")){
showSplash();
}
Util.debug(VERSION_INFO);
Util.debug(Configuration.get("LOOK_AND_FEEL").toString());
try {
if (Configuration.get("LOOK_AND_FEEL").equals("system"))
UIManager.setLookAndFeel(
UIManager.getSystemLookAndFeelClassName());
else if (Configuration.get("LOOK_AND_FEEL").equals("default"))
UIManager.setLookAndFeel(
UIManager.getCrossPlatformLookAndFeelClassName());
else if (
Configuration.get("LOOK_AND_FEEL").toString().length() > 0)
UIManager.setLookAndFeel(
Configuration.get("LOOK_AND_FEEL").toString());
} catch (Exception e) {
new ExceptionDialog(e, "Error when initializing a pluggable look-and-feel. Default LF will be used.", "Make sure that specified look-and-feel library classes are on the CLASSPATH.");
}
if (Configuration.get("FIRST_DAY_OF_WEEK").equals("")) {
String fdow;
if (Calendar.getInstance().getFirstDayOfWeek() == 2)
fdow = "mon";
else
fdow = "sun";
Configuration.put("FIRST_DAY_OF_WEEK", fdow);
Configuration.saveConfig();
Util.debug("first day of week is set to " + fdow);
}
Palette.setPalette(CurrentProject.get().getColor());
showLogin();
login.dispose();
EventsScheduler.init();
frame = AppFrame.getAppFrame();
if (fullmode) {
init();
}
if (!Configuration.get("SHOW_SPLASH").equals("no"))
splash.dispose();
}