Merge pull request #1831 from BFGD/notes-wrap-fix

Fix notepad wrap
This commit is contained in:
Adam
2018-04-23 11:16:13 -04:00
committed by GitHub

View File

@@ -25,7 +25,7 @@
package net.runelite.client.plugins.notes; package net.runelite.client.plugins.notes;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JEditorPane; import javax.swing.JTextArea;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.text.BadLocationException; import javax.swing.text.BadLocationException;
import javax.swing.text.Document; import javax.swing.text.Document;
@@ -40,7 +40,7 @@ import java.awt.event.FocusListener;
@Slf4j @Slf4j
public class NotesPanel extends PluginPanel public class NotesPanel extends PluginPanel
{ {
private final JEditorPane notesEditor = new JEditorPane(); private final JTextArea notesEditor = new JTextArea();
void init(NotesConfig config) void init(NotesConfig config)
{ {
@@ -55,7 +55,8 @@ public class NotesPanel extends PluginPanel
final JLabel notesHeader = new JLabel("Notes"); final JLabel notesHeader = new JLabel("Notes");
add(notesHeader, BorderLayout.NORTH); add(notesHeader, BorderLayout.NORTH);
notesEditor.setContentType("text/plain"); notesEditor.setLineWrap(true);
notesEditor.setWrapStyleWord(true);
// load note text // load note text
String data = config.notesData(); String data = config.notesData();