List of usage examples for com.vaadin.client ComputedStyle getDoubleProperty
public final double getDoubleProperty(String name)
From source file:com.haulmont.cuba.web.toolkit.ui.client.resizabletextarea.CubaResizableTextAreaWrapperWidget.java
License:Apache License
protected void handleResize(Event event) { //calculate and set the new size if (dragDrop) { int mouseX = event.getClientX(); int mouseY = event.getClientY(); int absoluteLeft = getAbsoluteLeft(); int absoluteTop = getAbsoluteTop(); ComputedStyle cs = new ComputedStyle(getElement().getFirstChildElement()); //do not allow mirror-functionality if (mouseY > absoluteTop + cs.getDoubleProperty("min-height") && mouseX > absoluteLeft + MINIMAL_WIDTH) { int width = mouseX - absoluteLeft + 2; int height = mouseY - absoluteTop + 2; switch (resizableDirection) { case BOTH: setHeight(height + "px"); setWidth(width + "px"); break; case VERTICAL: setHeight(height + "px"); break; case HORIZONTAL: setWidth(width + "px"); break; }/*from w w w . j ava 2 s . c o m*/ if (resizeHandler != null) { resizeHandler.handleResize(); } } } }