Changeset 2959


Ignore:
Timestamp:
07/10/07 13:50:31 (13 years ago)
Author:
melissa
Message:

Fixed a couple of NullPointerExceptions, and several bugs in the editor template.

Location:
trunk/loci/ome/notes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/ome/notes/Template.java

    r2958 r2959  
    586586    String v) 
    587587  { 
     588    if (v == null) return;  
    588589    if (component instanceof JCheckBox) { 
    589590      ((JCheckBox) component).setSelected(v.startsWith("t")); 
     
    592593      String[] enums = t.getEnums(); 
    593594      for (int k=0; k<enums.length; k++) { 
    594         if (enums[k].toLowerCase().equals(v)) { 
     595        if (enums[k].toLowerCase().equals(v.toLowerCase())) { 
    595596          ((JComboBox) component).setSelectedIndex(k); 
    596597          break; 
  • trunk/loci/ome/notes/TemplateTools.java

    r2958 r2959  
    3737  { 
    3838    OMEXMLNode node = findNode(root, map, false); 
     39 
     40    if (node == null && map != null) return null; 
    3941 
    4042    if (node == null) { 
     
    128130 
    129131      int idx = indices[i]; 
    130       node = OMEXMLNode.createNode((Element) nodeList.get(idx));  
     132      if (idx < nodeList.size()) { 
     133        node = OMEXMLNode.createNode((Element) nodeList.get(idx));  
     134      } 
     135      else return null; 
    131136    } 
    132137    
  • trunk/loci/ome/notes/templates/editor.template

    r2780 r2959  
    7777      name "Size Z" 
    7878      type "int" 
    79       valueMap "Image:Pixels:SizeZ" 
     79      valueMap "Image:CustomAttributes:Pixels:SizeZ" 
    8080    } 
    8181 
     
    8484      type "bool" 
    8585      default "false" 
    86       valueMap "Image:Pixels:BigEndian"  
     86      valueMap "Image:CustomAttributes:Pixels:BigEndian"  
    8787    } 
    8888 
     
    9292      values {"uint8", "uint16", "float"} 
    9393      default "float" 
    94       valueMap "Image:Pixels:PixelType"  
     94      valueMap "Image:CustomAttributes:Pixels:PixelType"  
    9595    } 
    9696  } 
Note: See TracChangeset for help on using the changeset viewer.