- Timestamp:
- 07/11/08 21:11:12 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/org/openmicroscopy/shoola/agents/dataBrowser/layout/PlateLayout.java
r5538 r5540 36 36 //Application-internal dependencies 37 37 import org.openmicroscopy.shoola.agents.dataBrowser.browser.CellDisplay; 38 import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplay; 38 39 import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageNode; 39 40 import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageSet; 40 41 import org.openmicroscopy.shoola.agents.dataBrowser.browser.WellImageNode; 42 43 import pojos.ImageData; 41 44 42 45 … … 120 123 col.add(cell); 121 124 else row.add(cell); 122 } else 125 } else { 123 126 l.add(n); 127 } 128 124 129 } 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 } 126 141 //First need to set width and height 127 142 Dimension d = col.get(0).getPreferredSize(); … … 152 167 d = wiNode.getPreferredSize(); 153 168 wiNode.setBounds(width+c*maxDim.width, height+r*maxDim.height, 154 maxDim.width, maxDim.height);169 d.width, d.height); 155 170 } 156 171 }
