Returns the preferred dimensions for this layout given the components in the specified target container. @param target the component which needs to be laid out @see Container @see #minimumLayoutSize
(Container target)
| 52 | * @see #minimumLayoutSize |
| 53 | */ |
| 54 | @Override |
| 55 | public Dimension preferredLayoutSize(Container target) { |
| 56 | int membersCnt = target.getComponentCount(); |
| 57 | Dimension[] componentPrefSizes = new Dimension[membersCnt]; |
| 58 | //store the sizes |
| 59 | for(int i = 0; i < membersCnt; i++){ |
| 60 | componentPrefSizes[i] = target.getComponent(i).getPreferredSize(); |
| 61 | } |
| 62 | return getCompositeSize(target, componentPrefSizes); |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Calculates the size of the target container given the sizes of the |
nothing calls this directly
no test coverage detected