Changeset 3324


Ignore:
Timestamp:
10/29/07 10:01:26 (12 years ago)
Author:
melissa
Message:

Make sure that window titles are <= 128 chars.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/Importer.java

    r3314 r3324  
    605605  { 
    606606    if (stack == null) return; 
    607     ImagePlus imp = new ImagePlus(file + " - " + series, stack); 
     607    String title = file.substring(file.lastIndexOf(File.separator) + 1); 
     608    if (series != null && !file.endsWith(series)) { 
     609      title += " - " + series; 
     610    } 
     611    if (title.length() > 128) { 
     612      String a = title.substring(0, 122); 
     613      String b = title.substring(title.length() - 122); 
     614      title = a + "..." + b; 
     615    } 
     616    ImagePlus imp = new ImagePlus(title, stack); 
    608617    imp.setProperty("Info", "File full path=" + file + 
    609618      "\nSeries name=" + series + "\n"); 
Note: See TracChangeset for help on using the changeset viewer.