コード例 #1
0
ファイル: ObjectManager.java プロジェクト: cmci/tango
 private void setSortKeys() {
   if (currentChannels != null && currentChannels.length == 1) {
     MeasurementKey mkey =
         new MeasurementKey(new int[] {currentChannels[0].getIdx()}, MeasurementObject.Number);
     System.out.println("Query:" + mkey.toString());
     ((ObjectManagerLayout) layout).setKeys(Core.getExperiment().getKeys().get(mkey));
   } else {
     ((ObjectManagerLayout) layout).unableSortKeys();
   }
 }
コード例 #2
0
ファイル: ObjectManager.java プロジェクト: cmci/tango
 private void sort(String key, Object3DGui[] objectsGui, int structureIdx) {
   Object3DGui.setAscendingOrger(((ObjectManagerLayout) layout).getAscendingOrder());
   HashMap<Integer, BasicDBObject> objects =
       Core.getExperiment().getConnector().getObjects(currentNucId, structureIdx);
   boolean notFound = false;
   for (Object3DGui o : objectsGui) {
     BasicDBObject dbo = objects.get(o.getLabel());
     if (dbo != null) {
       if (dbo.containsField(key)) o.setValue(dbo.getDouble(key));
       else {
         o.setValue(-1);
         notFound = true;
       }
     }
   }
   if (notFound)
     ij.IJ.log("Warning measurement: " + key + " not found for one or several objects");
   Arrays.sort(objectsGui);
 }