Package simtools.data

Examples of simtools.data.DataSource


    }

    void readCheckBox(){
        Object o = _sourceTree.getSelectedSourceOrCollection();
        if (_cb.isSelected() && o instanceof DataSource) {
            DataSource d=(DataSource) o;
            _tfName.setText(d.getInformation().toString());
            _tfValue.setEnabled(false);
            _v.data[0]= d;
            _editor.setNewValues(_v);

        } else {
View Full Code Here


      case 1:
        return new Double(values[getMappingIndex(rowIndex)]);
      case 2:
        return Boolean.valueOf(sources[getMappingIndex(rowIndex)]!=null);
      case 3:
        DataSource ds=sources[getMappingIndex(rowIndex)];
        if(ds==null){
          return "";
        }
        return DataInfo.getLabel(ds);
 
View Full Code Here

                return rowIndex==0 ? "X" : rowIndex==1 ? "Y" : "Z";
            } else if(columnIndex ==1){
                // Use Float to reduce max number of digits
                return Float.toString((float) _v.doubleValues[rowIndex]);
            } else if(columnIndex ==2){
                DataSource d=_v.data[rowIndex];
                return Boolean.valueOf(d!=null);
            } else if(columnIndex == 3){
                DataSource d=_v.data[rowIndex];
                return (d==null) ? "" : d.getInformation().toString();
            }
            throw new RuntimeException("Invalid column index");
        }
View Full Code Here

        return existingDsc.get(id);
    }

    // Check if an empty data source shall be returned
    if (EmptyDataSourcePool.global.containsEmptyCollection(dscId)){
      DataSource emptyDs;
      if ((emptyDs = (DataSource)EmptyDataSourcePool.global.getEmptyDataSource(id))==null){
        emptyDs = createEmptyDatasource(id, dscId, optionalInformation);
        EmptyDataSourcePool.global.addEmptyDaSource(id, (EmptyDataSource)emptyDs);
      }
      if (emptyDs!=null)
        return emptyDs; 
    }
    DataSource foundDS = null;
    DataSourceCollection adsc = null;
    String fileName = dscId.substring(marker.length());
    do {
      File f = chooseFile(fileName, id);
      if ( (f != null) && (f.exists()) ){
View Full Code Here

TOP

Related Classes of simtools.data.DataSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.