public synchronized void updateDoc(EventPackage eventPackage) {
		if (eventPackage.eventType.equals("INSERT")) {
			try {
				doc.insertString(eventPackage.offset, eventPackage.inserted,
						new SimpleAttributeSet());
			} catch (BadLocationException e) {
				e.printStackTrace();
			}
			f.docPosMoved(docNum, eventPackage.offset, eventPackage.len);
		} else if (eventPackage.eventType.equals("REMOVE")) {

			try {
				doc.remove(eventPackage.offset, eventPackage.len);
			} catch (BadLocationException e) {
				e.printStackTrace();
			}
			f.docPosMoved(docNum, eventPackage.offset, -eventPackage.len);
		}
	}