objStoreDestAddDialog.addAdminEventListener(this);
objStoreDestAddDialog.setLocationRelativeTo(app.getFrame());
}
// This should't happen - menu item should be disabled.
ObjStore os = ((ObjStoreDestListCObj)selObj).getObjStore();
if (!os.isOpen()) {
JOptionPane.showOptionDialog(app.getFrame(),
acr.getString(acr.E_OBJSTORE_NOT_CONNECTED, os.getID()),
acr.getString(acr.I_ADD_OBJSTORE_DEST) + ": " +
acr.getString(acr.I_ERROR_CODE,
AdminConsoleResources.E_OBJSTORE_NOT_CONNECTED),
JOptionPane.YES_NO_OPTION,
JOptionPane.ERROR_MESSAGE, null, close, close[0]);
}
objStoreDestAddDialog.show((ObjStoreDestListCObj)selObj);
} else if (selObj instanceof ObjStoreConFactoryListCObj) {
if (objStoreConFactoryAddDialog == null) {
objStoreConFactoryAddDialog = new ObjStoreConFactoryAddDialog(app.getFrame());
objStoreConFactoryAddDialog.addAdminEventListener(this);
objStoreConFactoryAddDialog.setLocationRelativeTo(app.getFrame());
}
// This should't happen - menu item should be disabled.
ObjStore os = ((ObjStoreConFactoryListCObj)selObj).getObjStore();
if (!os.isOpen()) {
JOptionPane.showOptionDialog(app.getFrame(),
acr.getString(acr.E_OBJSTORE_NOT_CONNECTED, os.getID()),
acr.getString(acr.I_ADD_OBJSTORE_CF) + ": " +
acr.getString(acr.I_ERROR_CODE,
AdminConsoleResources.E_OBJSTORE_NOT_CONNECTED),
JOptionPane.YES_NO_OPTION,
JOptionPane.ERROR_MESSAGE, null, close, close[0]);
return;
}
objStoreConFactoryAddDialog.show((ObjStoreConFactoryListCObj)selObj);
}
break;
case DialogEvent.DELETE_DIALOG:
if (selObj instanceof ObjStoreCObj) {
doDeleteObjStore(selObj);
} else if (selObj instanceof ObjStoreDestCObj) {
doDeleteDestination(selObj);
} else if (selObj instanceof ObjStoreConFactoryCObj) {
doDeleteConnFactory(selObj);
}
break;
case DialogEvent.PROPS_DIALOG:
if (selObj instanceof ObjStoreCObj) {
if (objStorePropsDialog == null) {
ObjStoreCObj osCObj = (ObjStoreCObj)selObj;
ObjStoreListCObj oslCObj = (ObjStoreListCObj)osCObj.getParent();
objStorePropsDialog = new ObjStorePropsDialog(app.getFrame(),
oslCObj);
objStorePropsDialog.addAdminEventListener(this);
objStorePropsDialog.setLocationRelativeTo(app.getFrame());
}
objStorePropsDialog.show((ObjStoreCObj)selObj);
} else if (selObj instanceof ObjStoreDestCObj) {
if (objStoreDestPropsDialog == null) {
objStoreDestPropsDialog = new ObjStoreDestPropsDialog
(app.getFrame());
objStoreDestPropsDialog.addAdminEventListener(this);
objStoreDestPropsDialog.setLocationRelativeTo(app.getFrame());
}
// This should't happen - menu item should be disabled.
ObjStore os = ((ObjStoreDestCObj)selObj).getObjStore();
if (!os.isOpen()) {
JOptionPane.showOptionDialog(app.getFrame(),
acr.getString(acr.E_OBJSTORE_NOT_CONNECTED, os.getID()),
acr.getString(acr.I_OBJSTORE_DEST_PROPS) + ": " +
acr.getString(acr.I_ERROR_CODE,
AdminConsoleResources.E_OBJSTORE_NOT_CONNECTED),
JOptionPane.YES_NO_OPTION,
JOptionPane.ERROR_MESSAGE, null, close, close[0]);
return;
}
objStoreDestPropsDialog.show((ObjStoreDestCObj)selObj);
} else if (selObj instanceof ObjStoreConFactoryCObj) {
if (objStoreConFactoryPropsDialog == null) {
objStoreConFactoryPropsDialog =
new ObjStoreConFactoryPropsDialog(app.getFrame());
objStoreConFactoryPropsDialog.addAdminEventListener(this);
objStoreConFactoryPropsDialog.setLocationRelativeTo
(app.getFrame());
}
// This should't happen - menu item should be disabled.
ObjStore os = ((ObjStoreConFactoryCObj)selObj).getObjStore();
if (!os.isOpen()) {
JOptionPane.showOptionDialog(app.getFrame(),
acr.getString(acr.E_OBJSTORE_NOT_CONNECTED, os.getID()),
acr.getString(acr.I_OBJSTORE_CF_PROPS) + ": " +
acr.getString(acr.I_ERROR_CODE,
AdminConsoleResources.E_OBJSTORE_NOT_CONNECTED),
JOptionPane.YES_NO_OPTION,
JOptionPane.ERROR_MESSAGE, null, close, close[0]);