code: public void addText(String str)
  	{
  		if (selectingText)
  			deleteSelectedText();
  
  		final StringBuilder oldText = this.text;
  		final String oldValue = this.text.toString();
  		String newValue = oldText.insert(this.cursor.index, str).toString();
  
  		if (this.filterFunction != null)
  			newValue = this.filterFunction.apply(newValue);
  
  		if (!fireEvent(new ComponentEvent.ValueChange<>(this, oldValue, newValue)))
  			return;
  
  		this.text = new StringBuilder(newValue);
  		guiText.setText(newValue);
  
  		cursor.jumpBy(str.length());
  	}
docs: Adds text at current cursor position. If some text is selected, it's deleted first.
  
  @param str the text