本文整理汇总了Java中net.sf.memoranda.CurrentNote.set方法的典型用法代码示例。如果您正苦于以下问题:Java CurrentNote.set方法的具体用法?Java CurrentNote.set怎么用?Java CurrentNote.set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.CurrentNote
的用法示例。
在下文中一共展示了CurrentNote.set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: currentDateChanged
import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
/**
* If the date is changed it updates the display.
* @param newdate
*/
void currentDateChanged(CalendarDate newdate) {
Cursor cur = App.getFrame().getCursor();
App.getFrame().setCursor(waitCursor);
if (!changedByHistory) {
History.add(new HistoryItem(newdate, CurrentProject.get()));
}
if (!dateChangedByCalendar) {
calendarIgnoreChange = true;
calendar.set(newdate);
calendarIgnoreChange = false;
}
/*if ((currentNote != null) && !changedByHistory && !addedToHistory)
History.add(new HistoryItem(currentNote));*/
currentNoteChanged(currentNote,true);
currentNote = CurrentProject.getNoteList().getNoteForDate(newdate);
CurrentNote.set(currentNote,true);
currentDate = CurrentDate.get();
/*addedToHistory = false;
if (!changedByHistory) {
if (currentNote != null) {
History.add(new HistoryItem(currentNote));
addedToHistory = true;
}
}*/
currentDateLabel.setText(newdate.getFullDateString());
if ((currentNote != null) && (currentNote.isMarked())) {
currentDateLabel.setIcon(IconFontSwing.buildIcon(GoogleMaterialDesignIcons.STAR, 8, ColorMap.ICON));
currentDateLabel.setHorizontalTextPosition(SwingConstants.LEFT);
}
else {
currentDateLabel.setIcon(null);
}
updateIndicators(newdate, CurrentProject.getTaskList());
App.getFrame().setCursor(cur);
}
示例2: currentDateChanged
import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
void currentDateChanged(CalendarDate newdate) {
Cursor cur = App.getFrame().getCursor();
App.getFrame().setCursor(waitCursor);
if (!changedByHistory) {
History.add(new HistoryItem(newdate, CurrentProject.get()));
}
if (!dateChangedByCalendar) {
calendarIgnoreChange = true;
calendar.set(newdate);
calendarIgnoreChange = false;
}
/*if ((currentNote != null) && !changedByHistory && !addedToHistory)
History.add(new HistoryItem(currentNote));*/
currentNoteChanged(currentNote,true);
currentNote = CurrentProject.getNoteList().getNoteForDate(newdate);
CurrentNote.set(currentNote,true);
currentDate = CurrentDate.get();
/*addedToHistory = false;
if (!changedByHistory) {
if (currentNote != null) {
History.add(new HistoryItem(currentNote));
addedToHistory = true;
}
}*/
currentDateLabel.setText(newdate.getFullDateString());
updateFullDateFormat();//Test
if ((currentNote != null) && (currentNote.isMarked())) {
currentDateLabel.setIcon(bookmarkIcon);
currentDateLabel.setHorizontalTextPosition(SwingConstants.LEFT);
}
else {
currentDateLabel.setIcon(null);
}
updateIndicators(newdate, CurrentProject.getTaskList());
App.getFrame().setCursor(cur);
}
示例3: currentDateChanged
import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
void currentDateChanged(CalendarDate newdate) {
Cursor cur = App.getFrame().getCursor();
App.getFrame().setCursor(waitCursor);
if (!changedByHistory) {
History.add(new HistoryItem(newdate, CurrentProject.get()));
}
if (!dateChangedByCalendar) {
calendarIgnoreChange = true;
calendar.set(newdate);
calendarIgnoreChange = false;
}
/*if ((currentNote != null) && !changedByHistory && !addedToHistory)
History.add(new HistoryItem(currentNote));*/
currentNoteChanged(currentNote,true);
currentNote = CurrentProject.getNoteList().getNoteForDate(newdate);
CurrentNote.set(currentNote,true);
currentDate = CurrentDate.get();
/*addedToHistory = false;
if (!changedByHistory) {
if (currentNote != null) {
History.add(new HistoryItem(currentNote));
addedToHistory = true;
}
}*/
currentDateLabel.setText(newdate.getFullDateString());
if ((currentNote != null) && (currentNote.isMarked())) {
currentDateLabel.setIcon(bookmarkIcon);
currentDateLabel.setHorizontalTextPosition(SwingConstants.LEFT);
}
else {
currentDateLabel.setIcon(null);
}
updateIndicators(newdate, CurrentProject.getTaskList());
App.getFrame().setCursor(cur);
}
示例4: ppClearNote_actionPerformed
import net.sf.memoranda.CurrentNote; //导入方法依赖的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())) {
/* Debug */ System.out.println("[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();
}
示例5: newNoteCap
import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
public void newNoteCap(){
CurrentNote.set(null, true);
setDocument(null);
this.titleField.requestFocus();
this.tagsField.requestFocus();
}
示例6: ppClearNote_actionPerformed
import net.sf.memoranda.CurrentNote; //导入方法依赖的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'"
+ 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 = notesList.getNote(notesList.getSelectedIndices()[i]);
if (CurrentProject.getNoteList().getActiveNote() != null
&& note.getDate().equals(CurrentProject.getNoteList().getActiveNote().getDate())) {
/* Debug */ System.out.println("[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();
}
示例7: currentDateChanged
import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
void currentDateChanged(CalendarDate newdate) {
Cursor cur = App.getFrame().getCursor();
App.getFrame().setCursor(waitCursor);
if (!changedByHistory) {
History.add(new HistoryItem(newdate, CurrentProject.get()));
}
if (!dateChangedByCalendar) {
calendarIgnoreChange = true;
calendar.set(newdate);
calendarIgnoreChange = false;
}
/*
* if ((currentNote != null) && !changedByHistory && !addedToHistory)
* History.add(new HistoryItem(currentNote));
*/
currentNoteChanged(currentNote, true);
currentNote = CurrentProject.getNoteList().getNoteForDate(newdate);
CurrentNote.set(currentNote, true);
currentDate = CurrentDate.get();
/*
* addedToHistory = false; if (!changedByHistory) { if (currentNote !=
* null) { History.add(new HistoryItem(currentNote)); addedToHistory =
* true; } }
*/
currentDateLabel.setText(newdate.getFullDateString());
if ((currentNote != null) && (currentNote.isMarked())) {
currentDateLabel.setIcon(bookmarkIcon);
currentDateLabel.setHorizontalTextPosition(SwingConstants.LEFT);
} else {
currentDateLabel.setIcon(null);
}
updateIndicators(newdate, CurrentProject.getTaskList());
App.getFrame().setCursor(cur);
}
示例8: newB_actionPerformed
import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
void newB_actionPerformed(ActionEvent e) {
CurrentNote.set(null, true);
setDocument(null);
this.titleField.requestFocus();
}
示例9: ppClearNote_actionPerformed
import net.sf.memoranda.CurrentNote; //导入方法依赖的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())){
/*Debug*/ System.out.println("[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();
}
示例10: setActiveNote
import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
void setActiveNote() {
Note note = (Note) notesList.getNote(notesList.getSelectedIndex());
CurrentDate.set(note.getDate());
CurrentNote.set(note,true);
}
示例11: setActiveNote
import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
void setActiveNote() {
Note note = (Note) notesList.getNote(notesList.getSelectedIndex());
CurrentDate.set(note.getDate());
CurrentNote.set(note,true);
}
示例12: ppClearNote_actionPerformed
import net.sf.memoranda.CurrentNote; //导入方法依赖的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: newB_actionPerformed
import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
private void newB_actionPerformed() {
CurrentNote.set(null, true);
setDocument(null);
this.titleField.requestFocus();
}
示例14: setActiveNote
import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
private void setActiveNote() {
Note note = notesList.getNote(notesList.getSelectedIndex());
CurrentDate.set(note.getDate());
CurrentNote.set(note, true);
}
示例15: ppClearNote_actionPerformed
import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
private void ppClearNote_actionPerformed() {
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'"
+ 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 = notesList.getNote(notesList.getSelectedIndices()[i]);
if (CurrentProject.getNoteList().getActiveNote() != null && note.getDate().equals(CurrentProject.getNoteList().getActiveNote().getDate())) {
/*Debug*/
System.out.println("[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();
}