public String printLineList() { String str; str = new String(); for (MyLine m : lineList) { str += m.toString() + "\n"; } return str; }
public String calculateInCentimeters() { String result; result = ""; double distX, distY, dist; pixelToCentimetersConfig(); for (MyLine m : lineList) { distX = (m.getP2().getX() - m.getP1().getX()) / propX; distY = (m.getP1().getY() - m.getP2().getY()) / propY; dist = Math.sqrt(distX * distX + distY * distY); result += String.format("%.2f", dist) + "\n"; } return result; }