Package teamnotepad.entities

Examples of teamnotepad.entities.Note


      if(e.getButton() == 3){
        view.handleRightClickOnNotesTree(e.getX(), e.getY());
      }else if(e.getButton() == 1 && e.getClickCount() == 2){
        Object nodeUserObject = view.getNotebookTreeLastSelectedNode();
        if(nodeUserObject.getClass() == Note.class){
          Note note = (Note)nodeUserObject;
          openNote(note);
        }else if(nodeUserObject.getClass() == SerializedNote.class){
          SerializedNote serializedNote = (SerializedNote) nodeUserObject;
          openSerializedNote(serializedNote);
        }
View Full Code Here


    notebookTree.setModel(treeModel);
    notebookTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  }

  private void addNewEmptyNote(DefaultMutableTreeNode notesSuiteNode, NotesSuite suite, User user) {
    Note blankNote = new Note(user, suite, "[new note]", "Your content here");
    DefaultMutableTreeNode newNoteNode =  new DefaultMutableTreeNode("[add note]", false);
    newNoteNode.setUserObject(blankNote);
    notesSuiteNode.add(newNoteNode);
  }
View Full Code Here

 
  @Test
  public void SerializeNote(){
    String noteContent = "asdf 23 123 lkf aw      e";
    String noteTitle = "kdjoiewo3f lk okj ok jok32 okj sd ";
    Note note = new Note();
    note.setContent(noteContent);
    note.setTitle(noteTitle);
    String expectedOutput = "{\"title\": \"kdjoiewo3f lk okj ok jok32 okj sd \", \"content\": \"asdf 23 123 lkf aw      e\"}";
    String serializedNote = model.serializeNote(note);
    assertTrue(serializedNote.equals(expectedOutput));
  }
View Full Code Here

TOP

Related Classes of teamnotepad.entities.Note

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.