Changeset 3496


Ignore:
Timestamp:
12/26/07 07:55:09 (12 years ago)
Author:
melissa
Message:

Added "open all series" option.

Location:
trunk/loci/plugins
Files:
2 edited

Legend:

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

    r3482 r3496  
    246246      } 
    247247 
    248       if (seriesCount > 1) { 
     248      if (seriesCount > 1 && !options.openAllSeries()) { 
    249249        status = options.promptSeries(r, seriesLabels, series); 
    250250        if (!statusOk(status)) return; 
    251251      } 
     252 
     253      if (options.openAllSeries()) Arrays.fill(series, true); 
    252254 
    253255      // -- Step 4c: prompt for the range of planes to import, if necessary -- 
  • trunk/loci/plugins/ImporterOptions.java

    r3482 r3496  
    112112  public static final String PREF_WINDOWLESS = "bioformats.windowless"; 
    113113  public static final String PREF_VIRTUAL = "bioformats.virtual"; 
     114  public static final String PREF_ALL_SERIES = "bioformats.openAllSeries"; 
    114115 
    115116  // labels for user dialog; when trimmed these double as argument & macro keys 
     
    136137  public static final String LABEL_SERIES = "series"; 
    137138  public static final String LABEL_VIRTUAL = "Use virtual stack"; 
     139  public static final String LABEL_ALL_SERIES = "Open all series"; 
    138140 
    139141  // -- Fields - GUI components -- 
     
    153155  private Choice mergeChoice; 
    154156  private Checkbox virtualBox; 
     157  private Checkbox allSeriesBox; 
    155158 
    156159  // -- Fields - core options -- 
     
    174177  private String seriesString; 
    175178  private boolean virtual; 
     179  private boolean openAllSeries; 
    176180 
    177181  private String location; 
     
    202206  public String getMergeOption() { return mergeOption; } 
    203207  public boolean isVirtual() { return virtual; } 
     208  public boolean openAllSeries() { return openAllSeries; } 
    204209 
    205210  public boolean isViewNone() { return VIEW_NONE.equals(stackFormat); } 
     
    242247  public void setWindowless(boolean b) { windowless = b; } 
    243248  public void setVirtual(boolean b) { virtual = b; } 
     249  public void setOpenAllSeries(boolean b) { openAllSeries = b; } 
    244250 
    245251  /** Loads default option values from IJ_Prefs.txt. */ 
     
    263269    windowless = Prefs.get(PREF_WINDOWLESS, false); 
    264270    virtual = Prefs.get(PREF_VIRTUAL, false); 
     271    openAllSeries = Prefs.get(PREF_ALL_SERIES, false); 
    265272 
    266273    // set SDT intensity property, if available 
     
    290297    Prefs.set(PREF_WINDOWLESS, windowless); 
    291298    Prefs.set(PREF_VIRTUAL, virtual); 
     299    Prefs.set(PREF_ALL_SERIES, openAllSeries); 
    292300  } 
    293301 
     
    332340      seriesString = Macro.getValue(arg, LABEL_SERIES, "0"); 
    333341      virtual = getMacroValue(arg, LABEL_VIRTUAL, virtual); 
     342      openAllSeries = getMacroValue(arg, LABEL_ALL_SERIES, openAllSeries); 
    334343 
    335344      location = Macro.getValue(arg, LABEL_LOCATION, location); 
     
    516525    gd.addCheckbox(LABEL_AUTOSCALE, autoscale); 
    517526    gd.addCheckbox(LABEL_VIRTUAL, virtual); 
     527    gd.addCheckbox(LABEL_ALL_SERIES, openAllSeries); 
    518528 
    519529    // extract GUI components from dialog and add listeners 
     
    539549      autoscaleBox = (Checkbox) boxes.get(9); 
    540550      virtualBox = (Checkbox) boxes.get(10); 
     551      allSeriesBox = (Checkbox) boxes.get(11); 
    541552      for (int i=0; i<boxes.size(); i++) { 
    542553        ((Checkbox) boxes.get(i)).addItemListener(this); 
     
    560571    autoscale = gd.getNextBoolean(); 
    561572    virtual = gd.getNextBoolean(); 
     573    openAllSeries = gd.getNextBoolean(); 
    562574 
    563575    return STATUS_OK; 
Note: See TracChangeset for help on using the changeset viewer.