public void boundsChanged(Style style) { String entityId= DragomeEntityManager.getEntityId(style.getVisualComponent()); if (element == null) element= WebServiceLocator.getInstance().getDomHandler().getElementBySelector("[" + AbstractHTMLComponentRenderer.COMPONENT_ID_ATTRIBUTE + "=\"" + entityId + "\"]"); String styleString= "position: relative; left: ${left}px;top: ${top}px;"; styleString= styleString.replace("${left}", style.getBounds().getX() + ""); styleString= styleString.replace("${top}", style.getBounds().getY() + ""); if (element != null) element.setAttribute("style", styleString); } }
public boolean equals(Object obj) { if (obj instanceof VisualBounds) { VisualBounds otherBounds= (VisualBounds) obj; return getWidth() == otherBounds.getWidth() && getHeight() == otherBounds.getHeight() && getX() == otherBounds.getX() && getY() == otherBounds.getY(); } return false; }