Skip to main content

How about a few more [b]Spring[/b]s

1 reply [Last post]
soupdragon
Offline
Joined: 2006-01-07

I've been using SpringLayout recently and it seem to me it could be a lot more versatile with a few extra Spring functions.

I've created Spring classes which track the actual rather than the prefferred height or width of an object. This allows me to position components as a proportion of the container size, and so that they track the container size.

Sometimes we could also do with minimum and maximum springs, for example to determine a preffered hieght of a container when we don't know up front which of two components wants to be taller.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mthornton
Offline
Joined: 2003-06-10

maximum springs already exist: To obtain a Spring which is the maximum of two other springs: Spring.max(a, b).
Minimum can be formed from the maximum of minus springs.