public void valueChanged(ListSelectionEvent lse) {
   final String S_ProcName = "valueChanged";
   ICFBamSysClusterObj selectedObj;
   if (lse.getValueIsAdjusting()) {
     return;
   }
   if (dataTable == null) {
     return;
   }
   int dataRow = dataTable.getSelectedRow();
   int modelIndex = dataTable.convertRowIndexToModel(dataRow);
   FinderTableModel tblDataModel = getDataModel();
   Object selectedRowData = tblDataModel.getValueAt(modelIndex, COLID_ROW_HEADER);
   if (selectedRowData != null) {
     if (selectedRowData instanceof ICFBamSysClusterObj) {
       int selectedCount = dataTable.getSelectedRowCount();
       if (selectedCount <= 0) {
         selectedObj = null;
       } else if (selectedCount == 1) {
         selectedObj = (ICFBamSysClusterObj) selectedRowData;
       } else {
         selectedObj = null;
       }
     } else {
       selectedObj = null;
       throw CFLib.getDefaultExceptionFactory()
           .newUnsupportedClassException(
               getClass(),
               S_ProcName,
               "selectedRowData",
               selectedRowData,
               "ICFBamSysClusterObj");
     }
   } else {
     selectedObj = null;
   }
   Container cont = getParent();
   while ((cont != null) && (!(cont instanceof CFJInternalFrame))) {
     cont = cont.getParent();
   }
   if (cont != null) {
     CFJInternalFrame frame = (CFJInternalFrame) cont;
     if (frame instanceof ICFBamSwingSysClusterJPanelCommon) {
       ICFBamSwingSysClusterJPanelCommon jpanelCommon =
           (ICFBamSwingSysClusterJPanelCommon) frame;
       jpanelCommon.setSwingFocus(selectedObj);
     }
   }
 }
 public void mousePressed(MouseEvent e) {
   if (e.getButton() != MouseEvent.BUTTON1) {
     return;
   }
   if (e.getClickCount() != 2) {
     return;
   }
   JTable table = (JTable) e.getSource();
   Point p = e.getPoint();
   int row = table.rowAtPoint(p);
   if (row < 0) {
     return;
   }
   FinderTableModel model = getDataModel();
   ICFBamSysClusterObj o = (ICFBamSysClusterObj) model.getValueAt(row, COLID_ROW_HEADER);
   if (o == null) {
     return;
   }
   JInternalFrame frame = swingSchema.getSysClusterFactory().newViewEditJInternalFrame(o);
   ((ICFBamSwingSysClusterJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.View);
   if (frame == null) {
     return;
   }
   Container cont = getParent();
   while ((cont != null) && (!(cont instanceof JInternalFrame))) {
     cont = cont.getParent();
   }
   if (cont != null) {
     JInternalFrame myInternalFrame = (JInternalFrame) cont;
     myInternalFrame.getDesktopPane().add(frame);
     frame.setVisible(true);
     frame.show();
   }
 }
 public void setSwingFocus(ICFLibAnyObj value) {
   final String S_ProcName = "setSwingFocus";
   if ((value == null) || (value instanceof ICFSecuritySysClusterObj)) {
     super.setSwingFocus(value);
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newUnsupportedClassException(
             getClass(), S_ProcName, "value", value, "ICFSecuritySysClusterObj");
   }
   ((ICFBamSwingSysClusterJPanelCommon) swingViewEditJPanel).setSwingFocus(value);
   ICFBamSysClusterObj argFocus = (ICFBamSysClusterObj) value;
   if ((argFocus != null) && (!argFocus.getIsNew())) {
     argFocus = (ICFBamSysClusterObj) argFocus.read(true);
     super.setSwingFocus(argFocus);
   }
 }
 public void actionPerformed(ActionEvent e) {
   final String S_ProcName = "actionPerformed";
   if (getSwingFocusAsSysCluster() != null) {
     if (null == getSwingFocusAsSysCluster().getEdit()) {
       JInternalFrame frame =
           swingSchema
               .getSysClusterFactory()
               .newAskDeleteJInternalFrame(getSwingFocusAsSysCluster());
       ((ICFBamSwingSysClusterJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.View);
       getDesktopPane().add(frame);
       frame.setVisible(true);
       frame.show();
     } else {
       throw CFLib.getDefaultExceptionFactory()
           .newUsageException(
               getClass(),
               S_ProcName,
               "Cannot begin deletion of an object already edited by another window instance");
     }
   }
 }
 public void setPanelMode(CFJPanel.PanelMode value) {
   CFJPanel.PanelMode oldMode = getPanelMode();
   if (oldMode == value) {
     return;
   }
   super.setPanelMode(value);
   ((ICFBamSwingSysClusterJPanelCommon) swingViewEditJPanel).setPanelMode(value);
   if (value == CFJPanel.PanelMode.View) {
     if (actionEdit != null) {
       actionEdit.setEnabled(true);
     }
     if (actionSave != null) {
       actionSave.setEnabled(false);
     }
     if (actionDelete != null) {
       actionDelete.setEnabled(true);
     }
     if (actionClose != null) {
       actionClose.setEnabled(true);
     }
   } else if (value == CFJPanel.PanelMode.Edit) {
     if (actionEdit != null) {
       actionEdit.setEnabled(false);
     }
     if (actionSave != null) {
       actionSave.setEnabled(true);
     }
     if (actionDelete != null) {
       actionDelete.setEnabled(false);
     }
     if (actionClose != null) {
       actionClose.setEnabled(true);
     }
   } else if (value == CFJPanel.PanelMode.Add) {
     if (actionEdit != null) {
       actionEdit.setEnabled(false);
     }
     if (actionSave != null) {
       actionSave.setEnabled(true);
     }
     if (actionDelete != null) {
       actionDelete.setEnabled(false);
     }
     if (actionClose != null) {
       actionClose.setEnabled(true);
     }
   } else {
     if (actionEdit != null) {
       actionEdit.setEnabled(false);
     }
     if (actionSave != null) {
       actionSave.setEnabled(false);
     }
     if (actionDelete != null) {
       actionDelete.setEnabled(false);
     }
     if (actionClose != null) {
       actionClose.setEnabled(true);
     }
   }
 }