public void actionPerformed(ActionEvent e) {
   final String S_ProcName = "actionPerformed";
   ICFCrmSchemaObj schemaObj = swingSchema.getSchema();
   if (schemaObj == null) {
     throw CFLib.getDefaultExceptionFactory()
         .newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj");
   }
   ICFSecurityServiceTypeObj selectedInstance = getSwingFocusAsServiceType();
   if (selectedInstance != null) {
     String classCode = selectedInstance.getClassCode();
     if ("SVCT".equals(classCode)) {
       JInternalFrame frame =
           swingSchema.getServiceTypeFactory().newAskDeleteJInternalFrame(selectedInstance);
       ((ICFCrmSwingServiceTypeJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.View);
       frame.addInternalFrameListener(getViewEditInternalFrameListener());
       getDesktopPane().add(frame);
       frame.setVisible(true);
       frame.show();
     } else {
       throw CFLib.getDefaultExceptionFactory()
           .newUnsupportedClassException(
               getClass(),
               S_ProcName,
               "selectedInstance",
               selectedInstance,
               "ICFCrmServiceTypeObj");
     }
   }
 }
 public CFInternetSwingServiceTypeViewEditJInternalFrame(
     ICFInternetSwingSchema argSchema, ICFSecurityServiceTypeObj argFocus) {
   super();
   final String S_ProcName = "construct-schema-focus";
   if (argSchema == null) {
     throw CFLib.getDefaultExceptionFactory()
         .newNullArgumentException(getClass(), S_ProcName, 1, "argSchema");
   }
   setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
   // argFocus is optional; focus may be set later during execution as
   // conditions of the runtime change.
   swingSchema = argSchema;
   swingFocus = argFocus;
   if ((argFocus != null) && (!argFocus.getIsNew())) {
     argFocus = (ICFInternetServiceTypeObj) argFocus.read(true);
     swingFocus = argFocus;
   }
   swingViewEditJPanel = argSchema.getServiceTypeFactory().newViewEditJPanel(argFocus);
   setContentPane(swingViewEditJPanel);
   Dimension dim = new Dimension(1024, 480);
   setSize(dim);
   dim = new Dimension(320, 240);
   setMinimumSize(dim);
   setTitle("View/Edit Service Type");
   setJMenuBar(getFrameMenuBar());
   setIconifiable(true);
   setMaximizable(true);
   setResizable(true);
   setClosable(false);
 }
 public void actionPerformed(ActionEvent e) {
   final String S_ProcName = "actionPerformed";
   ICFSecurityServiceTypeObj focus = getSwingFocusAsServiceType();
   if (focus != null) {
     ICFInternetServiceTypeEditObj editObj = (ICFInternetServiceTypeEditObj) (focus.getEdit());
     if (editObj != null) {
       setPanelMode(CFJPanel.PanelMode.Update);
     } else {
       throw CFLib.getDefaultExceptionFactory()
           .newUsageException(
               getClass(), S_ProcName, "Cannot save on object that isn't being edited");
     }
   }
   try {
     setClosed(true);
   } catch (Exception x) {
   }
 }
 public void actionPerformed(ActionEvent e) {
   ICFSecurityServiceTypeObj focus = getSwingFocusAsServiceType();
   if (focus != null) {
     ICFInternetServiceTypeEditObj editObj = (ICFInternetServiceTypeEditObj) focus.getEdit();
     if (editObj != null) {
       if (editObj.getIsNew()) {
         editObj.endEdit();
         setSwingFocus(null);
         setPanelMode(CFJPanel.PanelMode.Unknown);
       } else {
         editObj.endEdit();
         setPanelMode(CFJPanel.PanelMode.View);
       }
     }
   }
   try {
     setClosed(true);
   } catch (Exception x) {
   }
 }