public List <Line> getAllLines() { if (point1 == null || point2 == null || point3 == null || point4 == null) { return(null); } //calculatePoint4andlenths(); Line l1 = new Line(point1, point2); l1.setColor(this.getColor()); Line l2 = new Line(point2, point3); l2.setColor(this.getColor()); Line l3 = new Line(point3, point4); l3.setColor(this.getColor()); Line l4 = new Line(point4, point1); l4.setColor(this.getColor()); List <Line> listLine = new List <Line>(); listLine.Add(l1); listLine.Add(l2); listLine.Add(l3); listLine.Add(l4); return(listLine); }
public List <Line> getAllLines() { if (startPoint == null || endPoint == null) { return(null); } Line l1 = new Line(startPoint, point12); l1.setColor(this.getColor()); Line l2 = new Line(point12, endPoint); l2.setColor(this.getColor()); Line l3 = new Line(endPoint, point21); l3.setColor(this.getColor()); Line l4 = new Line(point21, startPoint); l4.setColor(this.getColor()); List <Line> listLine = new List <Line>(); listLine.Add(l1); listLine.Add(l2); listLine.Add(l3); listLine.Add(l4); return(listLine); }
public List <Line> getAllLines() { if (point1 == null || point2 == null || point3 == null) { return(null); } List <Line> listLines = new List <Line>(); Line l1 = new Line(point1, point2); l1.setColor(this.getColor()); Line l2 = new Line(point2, point3); l2.setColor(this.getColor()); Line l3 = new Line(point3, point1); l3.setColor(this.getColor()); listLines.Add(l1); listLines.Add(l2); listLines.Add(l3); return(listLines); }