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


Java CurrentNote.set方法代码示例

本文整理汇总了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);
   }
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:44,代码来源:DailyItemsPanel.java

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

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

示例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();
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:34,代码来源:NotesControlPanel.java

示例5: newNoteCap

import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
public void newNoteCap(){
	CurrentNote.set(null, true);
	setDocument(null);
	this.titleField.requestFocus();
	this.tagsField.requestFocus();
	
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:8,代码来源:EditorPanel.java

示例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();
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:36,代码来源:NotesControlPanel.java

示例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);
}
 
开发者ID:cst316,项目名称:spring16project-Fortran,代码行数:39,代码来源:DailyItemsPanel.java

示例8: newB_actionPerformed

import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
void newB_actionPerformed(ActionEvent e) {
	CurrentNote.set(null, true);
	setDocument(null);
	this.titleField.requestFocus();
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:6,代码来源:EditorPanel.java

示例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();
    }
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:46,代码来源:NotesControlPanel.java

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

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

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

示例13: newB_actionPerformed

import net.sf.memoranda.CurrentNote; //导入方法依赖的package包/类
private void newB_actionPerformed() {
    CurrentNote.set(null, true);
    setDocument(null);
    this.titleField.requestFocus();
}
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:6,代码来源:EditorPanel.java

示例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);
}
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:6,代码来源:NotesControlPanel.java

示例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();
    }
 
开发者ID:cst316,项目名称:spring16project-Team-Laredo,代码行数:47,代码来源:NotesControlPanel.java


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