public void eventOccured(GUIEvent event) {
String name = event.getName();
try {
if (name.equals("add")) {
final Dialog dialog =
(Dialog) WidgetFactory
.getInstance()
.constructWidget(getClass(), "AddInternationalizationDialog", new GUIEventListener() {
public void eventOccured(GUIEvent event) {
try {
Widget source = event.getSource();
if (event.getName().equals("ok")) {
String key = (String) source.getDataModel().getValue("key");
String value = (String) source.getDataModel().getValue("value");
boolean isNew = (properties.getProperty(key) == null);
properties.setProperty(key, value);
if (isNew)
propertyModel.addRow(new PropertyTableRow(key));
modified = true;
}
((Dialog) source.getParentWidgetByClass(Dialog.class)).dispose();
} catch (Exception e) {
new MessageDialog(e);
}
}
}, new MapDataModel());
dialog.initDialog(frame);
dialog.show();
} else if (name.equals("popup")) {
PopupMenu popup = (PopupMenu) constructWidget("PropertyPopup");
popup.popup(event);
} else if (name.equals("delete")) {
TableRow rows[] = (TableRow[]) dataModel.getValue("property.value");