private void buildPath(String from, String to) { if (from != null && to != null) { Point2D.Float ptFrom = new Point2D.Float(), ptTo = new Point2D.Float(); matchPoint.reset(from); if (matchPoint.matches()) { setPoint(ptFrom, matchPoint.group(1), matchPoint.group(2)); } matchPoint.reset(to); if (matchPoint.matches()) { setPoint(ptFrom, matchPoint.group(1), matchPoint.group(2)); } if (ptFrom != null && ptTo != null) { path = new GeneralPath(); path.moveTo(ptFrom.x, ptFrom.y); path.lineTo(ptTo.x, ptTo.y); } } paramaterizePath(); }
private void buildPath(String from, String to) { if (from != null && to != null) { Point2D.Float ptFrom = new Point2D.Float(), ptTo = new Point2D.Float(); matchPoint.reset(from); if (matchPoint.matches()) { setPoint(ptFrom, matchPoint.group(1), matchPoint.group(2)); } matchPoint.reset(to); if (matchPoint.matches()) { setPoint(ptFrom, matchPoint.group(1), matchPoint.group(2)); } if (ptFrom != null && ptTo != null) { path = new GeneralPath(); path.moveTo(ptFrom.x, ptFrom.y); path.lineTo(ptTo.x, ptTo.y); } } paramaterizePath(); }
private void buildPath(String from, String to) { if (from != null && to != null) { Point2D.Float ptFrom = new Point2D.Float(), ptTo = new Point2D.Float(); matchPoint.reset(from); if (matchPoint.matches()) { setPoint(ptFrom, matchPoint.group(1), matchPoint.group(2)); } matchPoint.reset(to); if (matchPoint.matches()) { setPoint(ptFrom, matchPoint.group(1), matchPoint.group(2)); } if (ptFrom != null && ptTo != null) { path = new GeneralPath(); path.moveTo(ptFrom.x, ptFrom.y); path.lineTo(ptTo.x, ptTo.y); } } paramaterizePath(); }
private void buildPath(String from, String to) { if (from != null && to != null) { Point2D.Float ptFrom = new Point2D.Float(), ptTo = new Point2D.Float(); matchPoint.reset(from); if (matchPoint.matches()) { setPoint(ptFrom, matchPoint.group(1), matchPoint.group(2)); } matchPoint.reset(to); if (matchPoint.matches()) { setPoint(ptFrom, matchPoint.group(1), matchPoint.group(2)); } if (ptFrom != null && ptTo != null) { path = new GeneralPath(); path.moveTo(ptFrom.x, ptFrom.y); path.lineTo(ptTo.x, ptTo.y); } } paramaterizePath(); }