mirror of https://github.com/apache/jmeter.git
JSyntaxTextArea : Ability to set font
This closes #91 Bugzilla Id: 58933 git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1731546 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e70f0fc497
commit
0cde9358f9
|
|
@ -1079,6 +1079,9 @@ beanshell.server.file=../extras/startup.bsh
|
|||
#jsyntaxtextarea.codefolding=true
|
||||
# Set 0 to disable undo feature in JSyntaxTextArea
|
||||
#jsyntaxtextarea.maxundos=50
|
||||
# Change the font on the (JSyntax) Text Areas. (Useful for HiDPI screens)
|
||||
#jsyntaxtextarea.font.family=Hack
|
||||
#jsyntaxtextarea.font.size=14
|
||||
|
||||
# Set this to false to disable the use of JSyntaxTextArea for the Console Logger panel
|
||||
#loggerpanel.usejsyntaxtext=true
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.apache.jmeter.gui.util;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.jmeter.util.JMeterUtils;
|
||||
|
|
@ -39,6 +40,8 @@ public class JSyntaxTextArea extends RSyntaxTextArea {
|
|||
private static final boolean LINE_WRAP = JMeterUtils.getPropDefault("jsyntaxtextarea.linewrap", true);
|
||||
private static final boolean CODE_FOLDING = JMeterUtils.getPropDefault("jsyntaxtextarea.codefolding", true);
|
||||
private static final int MAX_UNDOS = JMeterUtils.getPropDefault("jsyntaxtextarea.maxundos", 50);
|
||||
private static final String USER_FONT_FAMILY = JMeterUtils.getPropDefault("jsyntaxtextarea.font.family", JSyntaxTextArea.getDefaultFont().getName());
|
||||
private static final int USER_FONT_SIZE = JMeterUtils.getPropDefault("jsyntaxtextarea.font.size", JSyntaxTextArea.getDefaultFont().getSize());
|
||||
|
||||
@Deprecated
|
||||
public JSyntaxTextArea() {
|
||||
|
|
@ -90,6 +93,7 @@ public class JSyntaxTextArea extends RSyntaxTextArea {
|
|||
super.setLineWrap(LINE_WRAP);
|
||||
super.setWrapStyleWord(WRAP_STYLE_WORD);
|
||||
this.disableUndo = disableUndo;
|
||||
setFont(new Font(USER_FONT_FAMILY, Font.PLAIN, USER_FONT_SIZE));
|
||||
if(disableUndo) {
|
||||
// We need to do this to force recreation of undoManager which
|
||||
// will use the disableUndo otherwise it would always be false
|
||||
|
|
|
|||
|
|
@ -210,6 +210,7 @@ Summary
|
|||
<li><bug>58987</bug>Report/Dashboard: Improve error reporting.</li>
|
||||
<li><bug>58870</bug>TableEditor: minimum size is too small. Contributed by Vincent Herilier (vherilier at gmail.com)</li>
|
||||
<li><bug>59037</bug>Drop HtmlParserHTMLParser and dependencies on htmlparser and htmllexer</li>
|
||||
<li><bug>58933</bug>JSyntaxTextArea : Ability to set font. Contributed by Denis Kirpichenkov (denis.kirpichenkov at gmail.com)</li>
|
||||
</ul>
|
||||
<ch_section>Non-functional changes</ch_section>
|
||||
<ul>
|
||||
|
|
@ -341,6 +342,7 @@ Summary
|
|||
<li>Antonio Gomes Rodrigues (ra0077 at gmail.com)</li>
|
||||
<li>Harrison Termotto (harrison dot termotto at stonybrook.edu</li>
|
||||
<li>Vincent Herilier (vherilier at gmail.com)</li>
|
||||
<li>Denis Kirpichenkov (denis.kirpichenkov at gmail.com)</li>
|
||||
</ul>
|
||||
|
||||
<br/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue