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


Java Note类代码示例

本文整理汇总了Java中net.sf.memoranda.Note的典型用法代码示例。如果您正苦于以下问题:Java Note类的具体用法?Java Note怎么用?Java Note使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Note类属于net.sf.memoranda包,在下文中一共展示了Note类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setDocument

import net.sf.memoranda.Note; //导入依赖的package包/类
public void setDocument(Note note) {
	// Note note = CurrentProject.getNoteList().getActiveNote();
	// try {
	// this.editor.editor.setPage(CurrentStorage.get().getNoteURL(note));
	editor.document = (HTMLDocument) CurrentStorage.get().openNote(note);
	editor.initEditor();
	if (note != null)
		titleField.setText(note.getTitle());
	else
		titleField.setText("");
	initialTitle = titleField.getText();
	/*
	 * } catch (Exception ex) { new ExceptionDialog(ex); }
	 */
	/*
	 * Document doc = CurrentStorage.get().openNote(note); try {
	 * this.editor.editor.setText(doc.getText(0, doc.getLength())); } catch
	 * (Exception ex){ ex.printStackTrace(); }
	 */
	// .setDocument(CurrentStorage.get().openNote(note));
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:22,代码来源:EditorPanel.java

示例2: setDocument

import net.sf.memoranda.Note; //导入依赖的package包/类
public void setDocument(Note note) {
	// Note note = CurrentProject.getNoteList().getActiveNote();
	// try {
	// this.editor.editor.setPage(CurrentStorage.get().getNoteURL(note));
	editor.document = (HTMLDocument) CurrentStorage.get().openNote(note);
	editor.initEditor();
	if (note != null) {
		titleField.setText(note.getTitle());
		tagsField.setText(note.getTags());
	}
	else {
		titleField.setText("");
		tagsField.setText("");
	}
	initialTitle = titleField.getText();
	initialTags = tagsField.getText();
	/*
	 * } catch (Exception ex) { new ExceptionDialog(ex); }
	 */
	/*
	 * Document doc = CurrentStorage.get().openNote(note); try {
	 * this.editor.editor.setText(doc.getText(0, doc.getLength())); } catch
	 * (Exception ex){ ex.printStackTrace(); }
	 */
	// .setDocument(CurrentStorage.get().openNote(note));
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:27,代码来源:EditorPanel.java

示例3: noteToDocument

import net.sf.memoranda.Note; //导入依赖的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;
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:23,代码来源:NoteIndexer.java

示例4: ppAddBkmrk_actionPerformed

import net.sf.memoranda.Note; //导入依赖的package包/类
void ppAddBkmrk_actionPerformed(ActionEvent e) {
       for (int i = 0; i < notesList.getSelectedIndices().length; i++) {
           Note note = (Note) notesList.getNote(notesList.getSelectedIndices()[i]);
           note.setMark(true);
       }
       notesList.updateUI();
       bookmarksListPanel.notesList.update();
ppSetEnabled();
   }
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:10,代码来源:NotesControlPanel.java

示例5: ppRemoveBkmrk_actionPerformed

import net.sf.memoranda.Note; //导入依赖的package包/类
void ppRemoveBkmrk_actionPerformed(ActionEvent e) {
       for (int i = 0; i < notesList.getSelectedIndices().length; i++) {
           Note note = (Note) notesList.getNote(notesList.getSelectedIndices()[i]);
           note.setMark(false);
       }
       bookmarksListPanel.notesList.update();
ppSetEnabled();
       notesList.updateUI();
notesList.clearSelection();
((AppFrame)App.getFrame()).workPanel.dailyItemsPanel.editorPanel.editor.requestFocus();	
   }
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:12,代码来源:NotesControlPanel.java

示例6: currentNoteChanged

import net.sf.memoranda.Note; //导入依赖的package包/类
void currentNoteChanged(Note note, boolean toSaveCurrentNote) {
//		Util.debug("currentNoteChanged");
		
		if (editorPanel.isDocumentChanged()) {
			if (toSaveCurrentNote) {
	            saveNote();				
			}
			notesControlPane.refresh();
        }
		currentNote = note;
		editorPanel.setDocument(currentNote);
        calendar.set(CurrentDate.get());
		editorPanel.editor.requestFocus();		
	}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:15,代码来源:DailyItemsPanel.java

示例7: ppAddBkmrk_actionPerformed

import net.sf.memoranda.Note; //导入依赖的package包/类
void ppAddBkmrk_actionPerformed(ActionEvent e) {
	for (int i = 0; i < notesList.getSelectedIndices().length; i++) {
		Note note = (Note) notesList.getNote(notesList.getSelectedIndices()[i]);
		note.setMark(true);
	}
	notesList.updateUI();
	bookmarksListPanel.notesList.update();
	ppSetEnabled();
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:10,代码来源:NotesControlPanel.java

示例8: getCellRenderer

import net.sf.memoranda.Note; //导入依赖的package包/类
public ListCellRenderer getCellRenderer() {
       return new DefaultListCellRenderer()  {

    public Component getListCellRendererComponent(
      JList list,
      Object value,            // value to display
      int index,               // cell index
      boolean isSelected,      // is the cell selected
      boolean cellHasFocus)    // the list and the cell have the focus
    {
        JLabel label = (JLabel)super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        String s = value.toString();
        label.setText(s);
        //Note currentNote = CurrentProject.getNoteList().getActiveNote();
	 Note currentNote = CurrentNote.get();
        if (currentNote != null) {
           if (getNote(index).getId().equals(currentNote.getId()))
               label.setFont(label.getFont().deriveFont(Font.BOLD));
        }
        if (getNote(index).isMarked())
           label.setIcon(bookmarkIcon);
        //setIcon();
      /*if (isSelected) {
            setBackground(list.getSelectionBackground());
          setForeground(list.getSelectionForeground());
      }
        else {
          setBackground(list.getBackground());
          setForeground(list.getForeground());
      }
      setEnabled(list.isEnabled());
      setFont(list.getFont());
        setOpaque(true);*/
        label.setToolTipText(s);
        return label;
    }
   };

}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:40,代码来源:NotesList.java

示例9: HTMLFileExport

import net.sf.memoranda.Note; //导入依赖的package包/类
/**
 * Constructor for HTMLFileExport.
 */
public HTMLFileExport(File f, Document doc, Note note, String charset, boolean num, String templFile, boolean xhtml) {
    this.f = f;
    this.doc = (HTMLDocument)doc;
    this.note = note;
    this.charset = charset;
    this.num = num;
    this.templFile = templFile;
    this.xhtml = xhtml;
    doExport();
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:14,代码来源:HTMLFileExport.java

示例10: ppSetEnabled

import net.sf.memoranda.Note; //导入依赖的package包/类
void ppSetEnabled() {
boolean enbl = (notesList.getModel().getSize() > 0) && (notesList.getSelectedIndex() > -1);

ppRemoveBkmrk.setEnabled(enbl && (((Note) notesList.getNote(notesList.getSelectedIndex())).isMarked())
				|| notesList.getSelectedIndices().length > 1);
ppAddBkmrk.setEnabled(enbl && !(((Note) notesList.getNote(notesList.getSelectedIndex())).isMarked())
				|| notesList.getSelectedIndices().length > 1);
ppOpenNote.setEnabled(enbl);
ppClearNote.setEnabled(enbl);
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:11,代码来源:NotesControlPanel.java

示例11: ppSetEnabled

import net.sf.memoranda.Note; //导入依赖的package包/类
void ppSetEnabled() {
boolean enbl = (notesList.getModel().getSize() > 0) && (notesList.getSelectedIndex() > -1);

ppRemoveBkmrk.setEnabled(enbl && (((Note) notesList.getNote(notesList.getSelectedIndex())).isMarked())
                || notesList.getSelectedIndices().length > 1);
ppAddBkmrk.setEnabled(enbl && !(((Note) notesList.getNote(notesList.getSelectedIndex())).isMarked())
                || notesList.getSelectedIndices().length > 1);
ppOpenNote.setEnabled(enbl);
ppClearNote.setEnabled(enbl);
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:11,代码来源:NotesControlPanel.java

示例12: currentNoteChanged

import net.sf.memoranda.Note; //导入依赖的package包/类
/**
 * If a note is changed it is saved and then the panel is refreshed.
 * @param note
 * @param toSaveCurrentNote
 */
void currentNoteChanged(Note note, boolean toSaveCurrentNote) {

    if (editorPanel.isDocumentChanged()) {
        if (toSaveCurrentNote) {
            saveNote();                
        }
        notesControlPane.refresh();
    }
    currentNote = note;
    editorPanel.setDocument(currentNote);
    calendar.set(CurrentDate.get());
    editorPanel.editor.requestFocus();        
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:19,代码来源:DailyItemsPanel.java

示例13: NotesList

import net.sf.memoranda.Note; //导入依赖的package包/类
public NotesList(int type) {
    super();
    if(Configuration.get("NOTES_SORT_ORDER").toString().equalsIgnoreCase("true")) {
        sortOrderDesc = true;
    }
    _type = type;
    this.setFont(new java.awt.Font("Dialog", 0, 11));
    this.setModel(new NotesListModel());
    CurrentDate.addDateListener(new DateListener() {
        public void dateChange(CalendarDate d) {
            updateUI();
        }
    });
    
    CurrentNote.addNoteListener(new NoteListener() {
        public void noteChange(Note n, boolean toSaveCurrentNote) {
            updateUI();
        }
    });

    CurrentProject.addProjectListener(new ProjectListener() {
        public void projectChange(Project p, NoteList nl, TaskList tl, ResourcesList rl) {
        }
        public void projectWasChanged() {
            update();
        }
    });
    this.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:30,代码来源:NotesList.java

示例14: getCellRenderer

import net.sf.memoranda.Note; //导入依赖的package包/类
public ListCellRenderer getCellRenderer() {
       return new DefaultListCellRenderer()  {

    public Component getListCellRendererComponent(
      JList list,
      Object value,            // value to display
      int index,               // cell index
      boolean isSelected,      // is the cell selected
      boolean cellHasFocus)    // the list and the cell have the focus
    {
        JLabel label = (JLabel)super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        String s = value.toString();
        label.setText(s);
        //Note currentNote = CurrentProject.getNoteList().getActiveNote();
        Note currentNote = CurrentNote.get();
        if (currentNote != null) {
           if (getNote(index).getId().equals(currentNote.getId()))
               label.setFont(label.getFont().deriveFont(Font.BOLD));
        }
        if (getNote(index).isMarked())
           label.setIcon(IconFontSwing.buildIcon(GoogleMaterialDesignIcons.STAR, 8, ColorMap.ICON));
        //setIcon();
      /*if (isSelected) {
            setBackground(list.getSelectionBackground());
          setForeground(list.getSelectionForeground());
      }
        else {
          setBackground(list.getBackground());
          setForeground(list.getForeground());
      }
      setEnabled(list.isEnabled());
      setFont(list.getFont());
        setOpaque(true);*/
        label.setToolTipText(s);
        return label;
    }
   };

}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:40,代码来源:NotesList.java

示例15: ppRemoveBkmrk_actionPerformed

import net.sf.memoranda.Note; //导入依赖的package包/类
void ppRemoveBkmrk_actionPerformed(Note note) {
	note.setMark(false);
	bookmarksListPanel.notesList.update();
	ppSetEnabled();
	notesList.updateUI();
	notesList.clearSelection();
	((AppFrame) App.getFrame()).workPanel.dailyItemsPanel.editorPanel.editor.requestFocus();
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:9,代码来源:NotesControlPanel.java


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