Skip to content

Commit

Permalink
Improved list types and removed cast
Browse files Browse the repository at this point in the history
  • Loading branch information
speckyspooky committed May 9, 2024
1 parent c263cd3 commit a447721
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public Object getConstraint(IFigure child) {
*/
@Override
public void layout(IFigure container) {
List<?> children = container.getChildren();
List<? extends IFigure> children = container.getChildren();
Rectangle rulerSize = container.getClientArea();
for (int i = 0; i < children.size(); i++) {
IFigure child = (IFigure) children.get(i);
IFigure child = children.get(i);
Dimension childSize = child.getPreferredSize();
Integer constraint = (Integer) getConstraint(child);
int position = constraint == null ? 0 : (constraint).intValue();
Expand Down

0 comments on commit a447721

Please sign in to comment.