📄 109cfd60375d001c1d6dc81ac93d0459
字号:
package cn.nawang.test;
import java.awt.Color;
import javax.swing.text.BadLocationException;
import javax.swing.text.Style;
import javax.swing.text.StyleConstants;
import javax.swing.text.StyleContext;
import javax.swing.text.StyledDocument;
public class HelpTxt {
public static String helpDoc =
"<b><font size=12>规则 计分 排行版 源码 BUG规则 计分 排行版 源码 BUG规则 计分 排行版 源码 BUG规则 计分 排行版 源码 BUG规则 计分 排行版 源码 BUG规则 计分 排行版 源码 BUG规则 计分 排行版 源码 BUG规则 计分 排行版 源码 BUG规则 计分 排行版 源码 BUG规则 计分 排行版 源码 BUG规则 计分 排行版 源码 BUG</font></b>";
public HelpTxt(StyledDocument helpDoc) {
// TODO Auto-generated constructor stub
}
// public StyledDocument insertDoc(StyledDocument helpDoc, String content, String currentStyle)
// {
// try{
// helpDoc.insertString(helpDoc.getLength(), content, helpDoc.getStyle(currentStyle));
// }
// catch(BadLocationException e)
// {
// System.err.println("BadLocationException: "+e);
// }
// return helpDoc;
// }
// public void createStyle(String style, StyledDocument doc, int size, int bold, int underline, Color color, String fontName)
// {
// Style sys = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE);
// Style s = doc.addStyle(style, sys);
// StyleConstants.setFontSize(s, size);
// StyleConstants.setBold(s, (bold==1)?true:false);
// StyleConstants.setUnderline(s, (underline==1)?true:false);
// StyleConstants.setForeground(s, color);
// StyleConstants.setFontFamily(s, fontName);
// }
// public void createHelpTxt()
// {
// createStyle("title01", this.helpDoc, 18, 1, 1, new Color(0x374d76), "黑体");
// createStyle("contentZh", this.helpDoc, 12, 0, 0, new Color(0x374d76), "宋体");
// createStyle("title02", this.helpDoc, 18, 1, 0, new Color(0x374d76), "黑体");
// createStyle("contentEn", this.helpDoc, 12, 0, 0, new Color(0x374d76), "Arial");
// }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -