Changeset 1892


Ignore:
Timestamp:
12/04/06 17:28:34 (13 years ago)
Author:
chris
Message:

browser:
1) resolved conflict in LociDataBrowser
2) fixed slice-group portion of OptionsWindow to
represent actual internal sizes of slice groups
in the file.
3) if internal size is only one, the group will not
be displayed. This may lead to some interesting stuff
where only "Second" group is displayed, but my guess
is that this cannot happen in practice with the mechanics
of FileStitcher.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/browser/OptionsWindow.java

    r1857 r1892  
    128128 
    129129    JLabel sliceLab = new JLabel("\u00B7" + "Slice-Groups in File" + "\u00B7"); 
    130     JLabel zLab = new JLabel(sizeZ + " slice(s):"); 
    131     JLabel tLab = new JLabel(sizeT + " slice(s):"); 
    132     JLabel cLab = new JLabel(sizeC + " slice(s):"); 
    133130    JLabel blockLab = new JLabel("\u00B7" + "Blocks in Filenames" + "\u00B7"); 
    134     JLabel fileLab = new JLabel("Filename:"); 
     131 
    135132    Vector blockLabelsV = new Vector(); 
    136133    for(int i = 0;i<blocks.length;i++) { 
     
    193190    filePane.add(sufLab); 
    194191     
     192    int[] internalSizes = new int[3]; 
     193    for(int i = 0;i<internalSizes.length;i++) { 
     194      internalSizes[i] = getOrderSize(i); 
     195    } 
     196     
     197    JLabel zLab = new JLabel("First ("+ internalSizes[0] + "):"); 
     198    JLabel tLab = new JLabel("Second (" + internalSizes[1] + "):"); 
     199    JLabel cLab = new JLabel("Third (" + internalSizes[2] + "):"); 
     200    JLabel fileLab = new JLabel("Filename:"); 
     201     
    195202    String rowString = "pref," + TAB + ",pref,pref,pref," + TAB + 
    196203      ",pref,pref"; 
     
    208215    disPane.add(zLab,cc.xy(2,3)); 
    209216    disPane.add(zGroup,cc.xy(4,3)); 
    210     disPane.add(tLab,cc.xy(2,4)); 
    211     disPane.add(tGroup,cc.xy(4,4)); 
    212     disPane.add(cLab,cc.xy(2,5)); 
    213     disPane.add(cGroup,cc.xy(4,5)); 
     217    if(internalSizes[1] != 1) { 
     218      disPane.add(tLab,cc.xy(2,4)); 
     219      disPane.add(tGroup,cc.xy(4,4)); 
     220    } 
     221    if(internalSizes[2] != 1) { 
     222      disPane.add(cLab,cc.xy(2,5)); 
     223      disPane.add(cGroup,cc.xy(4,5)); 
     224    } 
    214225    disPane.add(blockPanel,cc.xyw(1,7,5)); 
    215226    disPane.add(fileLab,cc.xy(2,8)); 
     
    481492  } 
    482493   
     494  private int getOrderSize(int i) { 
     495    int thisSize = 1; 
     496    switch(order.charAt(i)) { 
     497      case 'Z': 
     498        thisSize = sizeZ; 
     499        thisSize /= getBlockCount(0); 
     500        break; 
     501      case 'T': 
     502        thisSize = sizeT; 
     503        thisSize /= getBlockCount(1); 
     504        break; 
     505      case 'C': 
     506        thisSize = sizeC; 
     507        thisSize /= getBlockCount(2); 
     508        break; 
     509    } 
     510    return thisSize; 
     511  } 
     512   
     513  private int getBlockCount(int index) { 
     514    int total = 0; 
     515    int[] blockSizes = fp.getCount(); 
     516    for(int i = 0;i<blockBoxes.length;i++) { 
     517      if (blockBoxes[i].getSelectedIndex() == index) { 
     518        total += blockSizes[i]; 
     519      } 
     520    } 
     521    if (total == 0) total = 1; 
     522    return total; 
     523  } 
     524   
    483525  private int getAxis(int i) { 
    484526    switch (i) { 
Note: See TracChangeset for help on using the changeset viewer.