@Override public void setBounds(Point2D.Double anchor, Point2D.Double lead) { Point2D.Double oldAnchor = getStartPoint(); Point2D.Double oldLead = getEndPoint(); if (!oldAnchor.equals(anchor) || !oldLead.equals(lead)) { willChange(); setBounds(anchor, lead); changed(); fireUndoableEditHappened(new SetBoundsEdit(this, oldAnchor, oldLead, anchor, lead)); } }