Set the string property to display as a Multi-line Text area.
@return this builder
@throws IllegalStateException if the property type is not {@link Property.Type#String}
177949
public PropertyBuilder renderingAsTextarea() {
        if (this.type != Property.Type.String) {
            throw new IllegalStateException("stringRenderingTextarea can only be applied to a String property");
        }
        return renderingOption(StringRenderingConstants.DISPLAY_TYPE_KEY, StringRenderingConstants.DisplayType
                .MULTI_LINE);
    }
760847
public Element getStringPatternsElement() {
        final Element referenceDataCatalogElement = getReferenceDataCatalogElement();

        final Element stringPatternsElement =
                getOrCreateChildElementByTagName(referenceDataCatalogElement, "string-patterns");
        if (stringPatternsElement == null) {
            throw new IllegalStateException("Could not find <string-patterns> element in configuration file");
        }
        return stringPatternsElement;
    }
956554
protected static Properties stringToProperties(String propertiesString)
    {
        Properties properties = new Properties();

        if (propertiesString != null) {
            try {
                properties.load(new StringReader(propertiesString));
            }
            catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

        return properties;
    }
313890
public String getAsText() {

        Object value = getValue();
        if (value == null) {
            return "";
        }

        String propertyName = null; // used in error handling below
        try {
            StringBuffer label = new StringBuffer();

            for (int i = 0; i < properties.length; i++) {
                propertyName = properties[i];
                Class<?> propertyType = PropertyUtils.getPropertyType(value, propertyName);
                Object propertyValue = PropertyUtils.getNestedProperty(value, propertyName);
                PropertyEditor editor = registry.findCustomEditor(propertyType, registryPropertyNamePrefix + propertyName);
                if (editor == null) {
                    label.append(propertyValue);
                } else {
                    editor.setValue(propertyValue);
                    label.append(editor.getAsText());
                    editor.setValue(null);
                }
                
                if (i < (properties.length - 1)) {
                    label.append(separator);
                }
            }
            
            return label.toString();
            
        } catch (Exception e) {
            throw new IllegalArgumentException("Couldn't access " + propertyName + 
                    " of " + value.getClass().getName() + " : " +
                    e.getMessage(), e);
        }

    }
598777
private static String lineExpand(String keyString, Map properties) {

        //System.out.println("DEBUG : expand(String, Properties), keyString: " + keyString);

        //if ("".equals(keyString))
        //throw new Exception("empty key string");

        if (resolvesToLiteral(keyString)) {
            //System.out.println("DEBUG : keyString: " + keyString + " is a literal");
            return keyString;
        }
        //System.out.println("DEBUG : expand(String, Properties), keyString: " + keyString + " does not resolve to literal");

        // look for ${<propName>}'s
        StringTokenizer keyStringTokenizer = new StringTokenizer(keyString, "${}", true);

        // return buffer
        StringBuffer sb = new StringBuffer();

        if (keyStringTokenizer.countTokens() == 1) {
            // we are done here since there is nothing but the final to be expanded string (no real
            // parsing necessary.


            //String rtnString = (String)properties.get(keyString);
            //if (null == rtnString)

            if (!properties.containsKey(keyString)) {
                //System.out.println("unresolved property key : " + keyString);
                return "";
            }
            return (String) properties.get(keyString);

            //throw new Exception("value for property: " + keyString + " is null");
            //System.out.println("quick and dirty, returning: " + rtnString);
            //return rtnString;
        }


        // set all token indicators to false
        boolean dollar = false;
        boolean lp = false;
        boolean rp = false;


        while (keyStringTokenizer.hasMoreTokens()) {
            //System.out.println("got a token");

            // the token matching <propName> in ${<propName>}
            String expTok;

            // seen all tokens, so reset them for next occurrance
            if (dollar == true && lp == true && rp == true) {
                dollar = false;
                lp = false;
                rp = false;
            }

            // get next token based on any of $, {, } characters
            String tok = keyStringTokenizer.nextToken();

            // all token indicators false, means we have a passthru token, so just append to return buffer
            if (dollar == false && lp == false && rp == false) {
                if (!tok.equals("$")) {
                    sb.append(tok);
                }
            }

            // seen ${, but not } => we should have a token here to expand
            if (dollar == true && lp == true && rp == false) {
                // the prop to expand
                if (!tok.equals("}")) {
                    expTok = tok;
                    // append getProperty result of expTok
                    String expVal = (String) properties.get(expTok);
                    if (expVal == null) {
                        //throw new Exception("token expTok " + expTok + " is null");
                        //System.out.println("token expTok \"" + expTok + "\" is null");
                        sb.append("${").append(expTok).append("}");
                    }else{
                        sb.append(expVal);
                    }
                } else {
                    // the } token is now encountered
                    rp = true;
                    continue;
                }
            }

            // ensure we don't see $$, {$, }$
            if (tok.equals("$")) {
                if (dollar == true) {
                    //throw new Exception("parsing error: $$ invalid");
                    throw new PropertyUtilException("parsing error: $$ invalid");
                }
                if (lp == true) {
                    //throw new Exception("parsing error: {$ invalid");
                    throw new PropertyUtilException("parsing error: {$ invalid");
                }
                if (rp == true) {
                    //throw new Exception("parsing error: }$ invalid");
                    throw new PropertyUtilException("parsing error: }$ invalid");
                }
                dollar = true;
                continue;
            }

            // ensure $ is before {, and no {{ or }{
            if (tok.equals("{")) {
                if (dollar == false) {
                    //throw new Exception("parsing error: $ symbol must occur before { symbol");
                    throw new PropertyUtilException("parsing error: $ symbol must occur before { symbol");
                }
                if (lp == true) {
                    //throw new Exception("parsing error: {{ invalid");
                    throw new PropertyUtilException("parsing error: {{ invalid");
                }
                if (rp == true) {
                    //throw new Exception("parsing error: }{ invalid");
                    throw new PropertyUtilException("parsing error: }{ invalid");
                }
                lp = true;
                continue;
            }

            // ensure ${ is before }, and no }{
            if (tok.equals("}")) {
                if (dollar == false) {
                    //throw new Exception("parsing error: $ symbol must occur before } symbol");
                    throw new PropertyUtilException("parsing error: $ symbol must occur before } symbol");
                }
                if (lp == false) {
                    //throw new Exception("parsing error: { symbol must occur before } symbol");
                    throw new PropertyUtilException("parsing error: { symbol must occur before } symbol");
                }
                if (rp == true) {
                    //throw new Exception("parsing error: }} invalid");
                    throw new PropertyUtilException("parsing error: }} invalid");
                }
                rp = true;
                continue;
            }

        }

        if (null == sb.toString() || "".equals(sb.toString()))
        //throw new Exception("null string return:" + keyString);
            throw new PropertyUtilException("null string return:" + keyString);

        //System.out.println("PropertyUtil.expand(), returning: " + sb.toString());
        return sb.toString();

    }
49492
public int setString(String strValue, boolean bDisplayOption, int iMoveMode)
    {
        if ((strValue == null) || (strValue.length() == 0))
            return super.setString(strValue, bDisplayOption, iMoveMode);  // Don't trip change or display
        if (TEN_SPACES.equals(strValue))
            return DBConstants.NORMAL_RETURN;
        return super.setString(strValue, bDisplayOption, iMoveMode);
    }
776066
public String buildPretty() throws IOException {
    try {
      ObjectMapper mapper = new ObjectMapper();
      return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(this);
    } catch (IOException ex) {
      throw ex;
    }
  }
608236
public void setAltText(final String altText) {
		String currAltText = getAltText();

		if (!Objects.equals(altText, currAltText)) {
			getOrCreateComponentModel().altText = altText;
		}
	}
1142852
public void setAsText(String text) throws IllegalArgumentException {
		if (text == null) {
			setValue(null);
		}
		else {
			setValue(new DistinguishedName(text).immutableDistinguishedName());
		}
	}
18490
public DialogPlusBuilder setOutMostMargin(int left, int top, int right, int bottom) {
    this.outMostMargin[0] = left;
    this.outMostMargin[1] = top;
    this.outMostMargin[2] = right;
    this.outMostMargin[3] = bottom;
    return this;
  }
1358365
public TextMatchBinding setText(
                    final Collection<String> text
                    )
    {
        if (text == null  ||  text.size() == 0) {
            clearText();
            return this;
        }

        synchronized (text) {
            for (String  pattern : text) {
                if (pattern == null  ||  pattern.length() == 0) {
                    throw new IllegalArgumentException( "null element" );
                }
            }

            clearText();
            for (String  pattern : text) {
                addText( pattern );
            }
        }

        return this;
    }
416293
public synchronized TextBox setText(String text) {
        String[] split = text.split("\n");
        if (split.length == 0) {
            split = new String[] { "" };
        }
        lines.clear();
        longestRow = 1;
        for(String line : split) {
            addLine(line);
        }
        if(caretPosition.getRow() > lines.size() - 1) {
            caretPosition = caretPosition.withRow(lines.size() - 1);
        }
        if(caretPosition.getColumn() > lines.get(caretPosition.getRow()).length()) {
            caretPosition = caretPosition.withColumn(lines.get(caretPosition.getRow()).length());
        }
        invalidate();
        return this;
    }
1159228
public AsciiTable setPaddingTop(int paddingTop) {
		for(AT_Row row : this.rows){
			if(row.getType()==TableRowType.CONTENT){
				row.setPaddingTop(paddingTop);
			}
		}
		return this;
	}
992382
public OptionBuilder withDescription( String text )
    {
        if (option.getDescription() != null) throw new IllegalArgumentException( "Description given twice" );
        option.setDescription( text );
        return this;
    }
399566
protected static String propertiesToString(Properties properties)
    {
        StringWriter stringWriter = new StringWriter();

        String comments = Properties.class.getName();
        try {
            properties.store(stringWriter, comments);
        }
        catch (IOException e) {
            throw new RuntimeException(e);
        }

        stringWriter.flush();
        String result = stringWriter.toString();

        // let's get rid of the timestamp from the properties as it cannot be disabled
        // in the Properties implementation
        List<String> lines = new ArrayList<>(Arrays.asList(result.split("\n")));
        // Remove the second line
        lines.remove(1);
        // join back
        result = StringUtils.join(lines, "\n");

        return result;
    }
788241
@Override
    public void setAsText(String text) throws IllegalArgumentException {
        try {
            setValue(new ObjectName(text));
        } catch (MalformedObjectNameException e) {
            throw new IllegalArgumentException(e);
        }

    }
684291
public synchronized String getText() {
        if(lines.length == 0) {
            return "";
        }
        StringBuilder bob = new StringBuilder(lines[0]);
        for(int i = 1; i < lines.length; i++) {
            bob.append("\n").append(lines[i]);
        }
        return bob.toString();
    }