public ResizableElementDefaultHandlers(IResizable resizableElement) { this.resizable = resizableElement; if (resizable.getUIPanel() instanceof UIPanel){ this.abPanel = Helper.getAbsolutePanel(resizable); }else{ throw new IllegalStateException("UIPanel is not instance of "+AbsolutePanel.class+ " cannot add resizable handler to UIPanel."); } }
public ResizeUIHandler(IResizable resizableElement) { this.resizableElement = resizableElement; this.handlerManager = new HandlerManager(this); this.mouseState = new MouseState(); this.draggableDefaultHandlers = new DraggableElementDefaultHandlers(this); this.addDragHandler(this); this.setStyleName("resizable-handler"); this.setPixelSize(10, 10); this.getElement().setId(DOM.createUniqueId()); if (resizableElement.getUIPanel() instanceof UIPanel){ this.abspanel = Helper.getAbsolutePanel(resizableElement); }else{ throw new IllegalStateException("UIPanel is not instance of "+AbsolutePanel.class+ " cannot add resizable handler to UIPanel."); } }