• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.clients
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Change
  • Next Change →

Changeset 5540 for trunk/SRC/org/openmicroscopy/shoola/agents/dataBrowser/layout/PlateLayout.java

Show
Ignore:
Timestamp:
07/11/08 21:11:12 (4 months ago)
Author:
jburel
Message:

Fixed layout problem

Files:
1 modified

  • trunk/SRC/org/openmicroscopy/shoola/agents/dataBrowser/layout/PlateLayout.java (modified) (3 diffs)

Legend:

Unmodified
Added
Removed
  • trunk/SRC/org/openmicroscopy/shoola/agents/dataBrowser/layout/PlateLayout.java

    r5538 r5540  
    3636//Application-internal dependencies 
    3737import org.openmicroscopy.shoola.agents.dataBrowser.browser.CellDisplay; 
     38import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplay; 
    3839import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageNode; 
    3940import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageSet; 
    4041import org.openmicroscopy.shoola.agents.dataBrowser.browser.WellImageNode; 
     42 
     43import pojos.ImageData; 
    4144 
    4245 
    … …  
    120123                                                col.add(cell); 
    121124                                        else row.add(cell); 
    122                                 } else  
     125                                } else { 
    123126                                        l.add(n); 
     127                                } 
     128                                         
    124129                        } 
    125                 Dimension maxDim = LayoutUtils.maxChildDim(l); 
     130                //Dimension maxDim = LayoutUtils.maxChildDim(l); 
     131                Dimension maxDim = new Dimension(0, 0); 
     132            Iterator children = l.iterator(); 
     133            ImageDisplay child; 
     134            ImageData img; 
     135            while (children.hasNext()) { 
     136                child = (ImageDisplay) children.next(); 
     137                img = (ImageData) child.getHierarchyObject(); 
     138                if (img.getId() >= 0) 
     139                        maxDim = LayoutUtils.max(maxDim, child.getPreferredSize()); 
     140            } 
    126141                 //First need to set width and height 
    127142                Dimension d = col.get(0).getPreferredSize(); 
    … …  
    152167                        d = wiNode.getPreferredSize(); 
    153168                        wiNode.setBounds(width+c*maxDim.width, height+r*maxDim.height,  
    154                                                         maxDim.width, maxDim.height); 
     169                                                        d.width, d.height); 
    155170                        } 
    156171        } 

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/