Here is the applet called LineSegmentCollectionD.
It's a variation on LineSegmentCollection.
This one lets you move the endpoints of the line segments:

Here are the source files...

LineSegmentCollectionD.java
LineSegmentD.java
LSPointD.java