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 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); } }