* Fixed chat command handling (\list), the user chat input is now escaped to prevent using html tags.

This commit is contained in:
LevelX2 2014-09-26 19:42:58 +02:00
parent 54ec3b658e
commit 0a068e2258
7 changed files with 53 additions and 41 deletions

View file

@ -38,9 +38,13 @@ public class ColorPane extends JTextPane {
public void append(String s) {
try {
setEditable(true);
kit.insertHTML(doc, doc.getLength(), s, 0, 0, null);
int len = getDocument().getLength();
setCaretPosition(len);
setEditable(false);
// setEditable(true);
//
//
// StyleContext sc = StyleContext.getDefaultStyleContext();
// AttributeSet aset = sc.addAttribute(SimpleAttributeSet.EMPTY, StyleConstants.Foreground, color);
@ -51,7 +55,7 @@ public class ColorPane extends JTextPane {
// setCharacterAttributes(aset, false);
// replaceSelection(s);
//
// setEditable(false);
//
} catch (Exception e) {
e.printStackTrace();
}