.toContentConstraint(constraint);
final LengthConstraintType w = contentConstraint
.getWidthConstraintType();
final LengthConstraintType h = contentConstraint
.getHeightConstraintType();
Size2D contentSize = null;
if (w == LengthConstraintType.NONE) {
if (h == LengthConstraintType.NONE) {
contentSize = this.arrangeNN(g2);
} else if (h == LengthConstraintType.RANGE) {
throw new RuntimeException("Not yet implemented.");
} else if (h == LengthConstraintType.FIXED) {
throw new RuntimeException("Not yet implemented.");
}
} else if (w == LengthConstraintType.RANGE) {
if (h == LengthConstraintType.NONE) {
throw new RuntimeException("Not yet implemented.");
} else if (h == LengthConstraintType.RANGE) {
throw new RuntimeException("Not yet implemented.");
} else if (h == LengthConstraintType.FIXED) {
throw new RuntimeException("Not yet implemented.");
}
} else if (w == LengthConstraintType.FIXED) {
if (h == LengthConstraintType.NONE) {
throw new RuntimeException("Not yet implemented.");
} else if (h == LengthConstraintType.RANGE) {
throw new RuntimeException("Not yet implemented.");
} else if (h == LengthConstraintType.FIXED) {
contentSize = new Size2D(contentConstraint.getWidth(),
contentConstraint.getHeight());
}
}
return new Size2D(this.calculateTotalWidth(contentSize.getWidth()),
this.calculateTotalHeight(contentSize.getHeight()));
}