equal
deleted
inserted
replaced
139 for (int i = numChildren - 1; i >= 0; i--) { |
139 for (int i = numChildren - 1; i >= 0; i--) { |
140 children[i].setBounds(xLocation, yLocation, maxSize.width, maxSize.height); |
140 children[i].setBounds(xLocation, yLocation, maxSize.width, maxSize.height); |
141 xLocation += xOffset; |
141 xLocation += xOffset; |
142 } |
142 } |
143 } |
143 } |
|
144 |
|
145 @Override |
|
146 public Dimension minimumLayoutSize(Container c) { |
|
147 if (c != null) { |
|
148 Component[] children = c.getComponents(); |
|
149 if (children != null && children.length > 0) { |
|
150 int numChildren = children.length; |
|
151 Insets cInsets = c.getInsets(); |
|
152 int extraHeight = cInsets.top + cInsets.bottom; |
|
153 int extraWidth = cInsets.left + cInsets.right; |
|
154 int okCancelButtonWidth = extraWidth |
|
155 + (kOKCancelButtonWidth * numChildren) |
|
156 + (numChildren - 1) * padding; |
|
157 int okbuttonHeight = extraHeight + kButtonHeight; |
|
158 Dimension minSize = super.minimumLayoutSize(c); |
|
159 return new Dimension(Math.max(minSize.width, |
|
160 okCancelButtonWidth), |
|
161 Math.max(minSize.height, okbuttonHeight)); |
|
162 } |
|
163 } |
|
164 return new Dimension(0, 0); |
|
165 } |
144 } |
166 } |
145 } |
167 } |