Class myphysicslab.lab.view.DisplaySpring

Provided By
All Implemented Interfaces

Displays a myphysicslab.lab.model.Spring. Can show either a jagged or straight line, see #drawMode. Can have a different color when compressed or expanded, see #colorCompressed and #colorExpanded. The width determines how wide back-and-forth the jagged lines go, see #width.

The position is reported as the midpoint of the Spring by #getPosition. The position is determined by the position of the Spring, so #setPosition has no effect, and the DisplaySpring is never dragable.

new DisplaySpring( spring, proto )


the Spring to display


the prototype DisplaySpring to inherit properties from

Instance Methods

Instance Properties

Static Properties