MCPcopy Create free account
hub / github.com/PCGen/pcgen / setText

Method setText

code/src/java/pcgen/gui2/tools/InfoPane.java:85–99  ·  view source on GitHub ↗
(String text)

Source from the content-addressed store, hash-verified

83 }
84
85 public void setText(String text)
86 {
87 //This is done so the vertical scroll bar goes back up to the top when the text is changed
88 EditorKit kit = textPane.getEditorKit();
89 Document newDoc = kit.createDefaultDocument();
90 try
91 {
92 kit.read(new StringReader(text), newDoc, 0);
93 }
94 catch (IOException | BadLocationException ex)
95 {
96 throw new UnreachableError(ex);
97 }
98 textPane.setDocument(newDoc);
99 }
100
101 /**
102 * Adds a hyperlink listener for notification of any changes, for example when a

Callers 15

initMenusMethod · 0.45
createEditMenuMethod · 0.45
createSourcesMenuMethod · 0.45
createToolsMenuMethod · 0.45
createHelpMenuMethod · 0.45
createMenuItemMethod · 0.45
createMenuItemMethod · 0.45
QuickSourceMenuMethod · 0.45
referenceChangedMethod · 0.45
setContextMessageMethod · 0.45
nameMethod · 0.45
actionPerformedMethod · 0.45

Calls 1

readMethod · 0.45

Tested by

no test coverage detected