public void valueChanged(ListSelectionEvent lse) { final String S_ProcName = "valueChanged"; ICFFreeSwitchTenantObj 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 ICFFreeSwitchTenantObj) { int selectedCount = dataTable.getSelectedRowCount(); if (selectedCount <= 0) { selectedObj = null; } else if (selectedCount == 1) { selectedObj = (ICFFreeSwitchTenantObj) selectedRowData; } else { selectedObj = null; } } else { selectedObj = null; throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "selectedRowData", selectedRowData, "ICFFreeSwitchTenantObj"); } } 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 ICFFreeSwitchSwingTenantJPanelCommon) { ICFFreeSwitchSwingTenantJPanelCommon jpanelCommon = (ICFFreeSwitchSwingTenantJPanelCommon) frame; jpanelCommon.setSwingFocus(selectedObj); } } }
public void valueChanged(ListSelectionEvent lse) { final String S_ProcName = "valueChanged"; ICFFreeSwitchFSSFProfileAliasObj selectedObj; if (lse.getValueIsAdjusting()) { return; } if (dataTable == null) { return; } int dataRow = dataTable.getSelectedRow(); int modelIndex = dataTable.convertRowIndexToModel(dataRow); PickerTableModel tblDataModel = getDataModel(); Object selectedRowData = tblDataModel.getValueAt(modelIndex, COLID_ROW_HEADER); if (selectedRowData != null) { if (selectedRowData instanceof ICFFreeSwitchFSSFProfileAliasObj) { int selectedCount = dataTable.getSelectedRowCount(); if (selectedCount <= 0) { selectedObj = null; } else if (selectedCount == 1) { selectedObj = (ICFFreeSwitchFSSFProfileAliasObj) selectedRowData; } else { selectedObj = null; } } else { selectedObj = null; throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "selectedRowData", selectedRowData, "ICFFreeSwitchFSSFProfileAliasObj"); } } else { selectedObj = null; } setSwingFocus(selectedObj); adjustFeedback(); }