|
|
|
@ -24,10 +24,10 @@ public class FormHorizontalParallelLine extends AbstractFormParallelLine {
|
|
|
|
|
@Override |
|
|
|
|
public Point getExtendedLineStartPoint(AbstractFormParallelLine parallelLine) { |
|
|
|
|
Point point = new Point(); |
|
|
|
|
if (isVerticalCenterLineBeforeTheParallelLine(parallelLine)) { |
|
|
|
|
point.setLocation(parallelLine.getStartPosition(), parallelLine.getParallelValue()); |
|
|
|
|
} else if (isVerticalCenterLineBehindTheParallelLine(parallelLine)) { |
|
|
|
|
point.setLocation(parallelLine.getEndPosition(), parallelLine.getParallelValue()); |
|
|
|
|
if (parallelLine.isVerticalCenterLineBeforeTheParallelLine(this)) { |
|
|
|
|
point.setLocation(getStartPosition(), getParallelValue()); |
|
|
|
|
} else if (parallelLine.isVerticalCenterLineBehindTheParallelLine(this)) { |
|
|
|
|
point.setLocation(getEndPosition(), getParallelValue()); |
|
|
|
|
} |
|
|
|
|
return point; |
|
|
|
|
} |
|
|
|
@ -35,10 +35,10 @@ public class FormHorizontalParallelLine extends AbstractFormParallelLine {
|
|
|
|
|
@Override |
|
|
|
|
public Point getExtendedLineEndPoint(AbstractFormParallelLine parallelLine) { |
|
|
|
|
Point point = new Point(); |
|
|
|
|
if (isVerticalCenterLineBeforeTheParallelLine(parallelLine)) { |
|
|
|
|
point.setLocation(getStartPosition(), parallelLine.getParallelValue()); |
|
|
|
|
} else if (isVerticalCenterLineBehindTheParallelLine(parallelLine)) { |
|
|
|
|
point.setLocation(getEndPosition(), parallelLine.getParallelValue()); |
|
|
|
|
if (parallelLine.isVerticalCenterLineBeforeTheParallelLine(this)) { |
|
|
|
|
point.setLocation(parallelLine.getStartPosition(), getParallelValue()); |
|
|
|
|
} else if (parallelLine.isVerticalCenterLineBehindTheParallelLine(this)) { |
|
|
|
|
point.setLocation(parallelLine.getEndPosition(), getParallelValue()); |
|
|
|
|
} |
|
|
|
|
return point; |
|
|
|
|
} |
|
|
|
|