@Override
public void componentSelected(MenuEvent ce) {
//
final NoteItem mItem = (NoteItem) tabPanel.getSelectedItem().getWidget(0);
String id = mItem.getId();
new NotesPanel(id, TCNote.TYPE_PARAGRAPH, new NotePanelCallback<TCNote, Integer>(){
public void callback(TCNote note, Integer type) {
if(type == NotesPanel.NOTE_ADDED)
mItem.addNote(note);
}
});
}
});
matchMenu.add(addNote);
MenuItem addNoteMatch = new MenuItem("Add Note to Match");
addNoteMatch.setIconStyle("icon-menu-addNote");
addNoteMatch.addSelectionListener(new SelectionListener<MenuEvent>(){
@Override
public void componentSelected(MenuEvent ce) {
//
final NoteItem mItem = (NoteItem) tabPanel.getSelectedItem().getWidget(0);
String id = mItem.getId();
new NotesPanel(id, TCNote.TYPE_LINK, new NotePanelCallback<TCNote, Integer>(){
public void callback(TCNote note, Integer type) {
if(type == NotesPanel.NOTE_ADDED)
mItem.addNote(note);
}
});