001package horstmann.ch08_umleditor;
002import java.awt.geom.Point2D;
003import java.util.ArrayList;
004
005/**
006   An edge that is shaped like a line with up to
007   three segments with an arrowhead
008 */
009@SuppressWarnings("serial")
010public class ClassRelationshipEdge extends SegmentedLineEdge
011{
012        /**
013      Constructs a straight edge.
014         */
015        public ClassRelationshipEdge()
016        {
017                bentStyle = BentStyle.STRAIGHT;
018        }
019
020        /**
021      Sets the bentStyle property
022      @param newValue the bent style
023         */
024        public void setBentStyle(BentStyle newValue) { bentStyle = newValue; }
025        /**
026      Gets the bentStyle property
027      @return the bent style
028         */
029        public BentStyle getBentStyle() { return bentStyle; }
030
031        public ArrayList<Point2D> getPoints()
032        {
033                return bentStyle.getPath(getStart().getBounds(),
034                                getEnd().getBounds());
035        }
036
037        private BentStyle bentStyle;
038}