public ResizeDirection getResizableDirection() { return getState(false).resizableDirection; } }
public void setResizableDirection(ResizeDirection direction) { getState().resizableDirection = direction; }
/** * @deprecated Use {@link CubaResizableTextAreaWrapper#getResizableDirection()} instead */ @Deprecated public boolean isResizable() { return getState(false).resizableDirection != ResizeDirection.NONE; }
@Override public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); if (getState(false).resizableDirection.equals(ResizeDirection.BOTH) && isPercentageSize()) { LoggerFactory.getLogger(CubaResizableTextAreaWrapper.class).warn( "TextArea with percentage size can not be resizable"); getState().resizableDirection = ResizeDirection.NONE; } else if (getState(false).resizableDirection.equals(ResizeDirection.VERTICAL) && Unit.PERCENTAGE.equals(getHeightUnits())) { LoggerFactory.getLogger(CubaResizableTextAreaWrapper.class).warn( "TextArea height with percentage size can not be resizable to vertical direction"); getState().resizableDirection = ResizeDirection.NONE; } else if (getState(false).resizableDirection.equals(ResizeDirection.HORIZONTAL) && (Unit.PERCENTAGE.equals(getWidthUnits()))) { LoggerFactory.getLogger(CubaResizableTextAreaWrapper.class).warn( "TextArea width with percentage size can not be resizable to horizontal direction"); getState().resizableDirection = ResizeDirection.NONE; } }