/** * Sets the visible width of the input area in characters. The default is 20 characters. Also * affects the line break position when the wrap mode is set to HARD. * * @param cols The visible width of the input area in characters. */ @PropertySetter(value = "cols", defaultValue = "20", description = "The visible width of the input area in characters.") public void setCols(int cols) { Assert.isTrue(cols > 0, () -> "Cols must be greater than zero"); propertyChange("cols", this.cols, this.cols = cols, true); }
/** * Sets the auto-scroll setting. If true, the control will ensure that the last line of input is * always visible, scrolling if necessary. * * @param autoScroll The auto-scroll setting. */ @PropertySetter(value = "autoScroll", defaultValue = "false", description = "If true, the control will ensure that the last line of input " + "is always visible, scrolling if necessary.") public void setAutoScroll(boolean autoScroll) { propertyChange("autoScroll", this.autoScroll, this.autoScroll = autoScroll, true); }
/** * Sets the visible number of rows in the input area. The default is 2 rows. * * @param rows The visible number of rows in the input area. */ @PropertySetter(value = "rows", defaultValue = "2", description = "The visible number of rows in the input area.") public void setRows(int rows) { Assert.isTrue(rows > 0, () -> "Rows must be greater than zero"); propertyChange("rows", this.rows, this.rows = rows, true); }
/** * Sets the wrap mode. * * @param wrap The wrap mode. * @see WrapMode */ @PropertySetter(value = "wrap", defaultValue = "soft", description = "Text wrapping behavior when submitting a form.") public void setWrap(WrapMode wrap) { propertyChange("wrap", this.wrap, this.wrap = defaultify(wrap, WrapMode.SOFT), true); }