00001 package DisplayGUI; 00002 00003 import is.*; 00004 import Sct.Serializable; 00005 import Sct.IS.*; 00006 00011 public class IVTestSelection { 00012 00013 String resultObjectHeader; // the header of the control object name 00014 String testObjectName; 00015 00016 IVScanControl iv; 00017 00018 00019 public IVTestSelection(String testObjectName) { 00020 00021 this.testObjectName = testObjectName; 00022 00023 try { 00024 iv = new IVScanControl(); 00025 GuiComponents.System.ISInterface.getInstance().getRepository().getValue(testObjectName, iv); 00026 }catch(Exception e2) { 00027 System.err.println("SctGUI::IVTestSelection : Exception extracting IVScan Control data : "+e2.toString()); 00028 iv=null; 00029 } 00030 if(iv==null) resultObjectHeader=null; 00031 else resultObjectHeader = isSCTDBData() ? "SCTDBData.IVScanData."+Integer.toString(iv.runNo)+"."+Integer.toString(iv.scanNo)+"." : "RetrievedData.IVScanData."+Integer.toString(iv.runNo)+"."+Integer.toString(iv.scanNo)+"."; 00032 } 00033 00034 00035 public String getResultObjectHeader() { 00036 return resultObjectHeader; 00037 } 00038 public int getRunNo() { 00039 if(iv==null) return -1; 00040 else return iv.runNo; 00041 } 00042 public int getScanNo() { 00043 if(iv==null) return -1; 00044 else return iv.scanNo; 00045 } 00046 public String[] getVList() { 00047 return iv.voltageData; 00048 } 00049 00050 public boolean isSCTDBData() { 00051 return testObjectName.startsWith("SCTDBData"); 00052 } 00053 00054 00055 } 00056