JavaScript is disabled on your browser.
Jitsi: the OpenSource Java VoIP and Instant Messaging client.
java.lang.Object
net.java.sip.communicator.impl.gui.main.chat.replacers.NewlineReplacer
All Implemented Interfaces:
Replacer
public class NewlineReplacer
extends java.lang.Object
implements Replacer
NewlineReplacer for replacing newlines with a combined version of a
<br> tag and a \n character. This special treatment is
necessary because copy-paste operations from the chat window do not recognize
the <br> tags as line breaks.
Author:
Danny van Heumen
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
boolean
expectsPlainText ()
The NewlineReplacer expects HTML content.
void
replace (java.lang.StringBuilder target,
java.lang.String piece)
New line characters are searched and replaced with a combination of
newline and br tag.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
NewlineReplacer
public NewlineReplacer()
Method Detail
replace
public void replace(java.lang.StringBuilder target,
java.lang.String piece)
New line characters are searched and replaced with a combination of
newline and br tag.
Specified by:
replace
in interface Replacer
Parameters:
target
- the destination for to write the replacement result to
piece
- the piece of content to process
Jitsi: the OpenSource Java VoIP and Instant Messaging client.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.