if (InputEvent.MOUSE_DOWN.equals(event)) {
// get the presenters
Map<String, MarkMapPresenter> presenters = getMainComposite().getMapMarkGraphic().getPresenters();
// iterate the presenters and see if the point belongs to any mark
MarkModel mark = null;
Set<Entry<String, MarkMapPresenter>> entrySet = presenters.entrySet();
Iterator<Entry<String, MarkMapPresenter>> iter = entrySet.iterator();
while (iter.hasNext()) {
Entry<String, MarkMapPresenter> entry = iter.next();
MarkMapPresenter mapPresenter = entry.getValue();
if (mapPresenter.eventHandler(InputEvent.DELETE, point.x, point.y)) {
mark = mapPresenter.getMarkModel();
break;
}
}
if (mark != null) {
deleteOldEditors();
int index = getMarkIndexWithinTheTable(mark);
TableItem item = coordinatesTable.getItem(index);
item.setText(1, ""); //$NON-NLS-1$
item.setText(2, ""); //$NON-NLS-1$
mark.setXCoord(Double.NaN);
mark.setYCoord(Double.NaN);
this.cmd.evalPrecondition();
getMainComposite().refreshMapGraphicLayer();
}