Element target;
switch (DOM.eventGetType(event)) {
case Event.ONMOUSEOVER:
target = event.getTarget();
if(target.getClassName().equals("tc-notes-note") ||target.getClassName().equals("tc-notes-linknote")){
TCNote note = noteLookup.get(target);
if(null != note)
Info.display( (note.getType() == TCNote.TYPE_PARAGRAPH ? "Paragraph" : "Link")+ " Note", note.getText());
}
break;
case Event.ONCLICK:
target = event.getTarget();
if(target.getClassName().equals("tc-notes-note") ||target.getClassName().equals("tc-notes-linknote")){
TCNote note = noteLookup.get(target);
if(null != note){
new NotesPanel(note, new NotePanelCallback<TCNote, Integer>(){
public void callback(TCNote note, Integer type) {
if(type == NotesPanel.NOTE_REMOVED)
removeNote(note);