本文整理了Java中javax.swing.JEditorPane.setCaretColor()
方法的一些代码示例,展示了JEditorPane.setCaretColor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JEditorPane.setCaretColor()
方法的具体详情如下:
包路径:javax.swing.JEditorPane
类名称:JEditorPane
方法名:setCaretColor
暂无
代码示例来源:origin: de.sciss/jsyntaxpane
jEdtTest.setCaretColor(new java.awt.Color(153, 204, 255));
jEdtTest.addCaretListener(new javax.swing.event.CaretListener() {
public void caretUpdate(javax.swing.event.CaretEvent evt) {
代码示例来源:origin: org.netbeans.api/org-jruby
text.setCaretColor(new Color(0xa4, 0x00, 0x00));
text.setBackground(new Color(0xf2, 0xf2, 0xf2));
text.setForeground(new Color(0xa4, 0x00, 0x00));
代码示例来源:origin: eu.mihosoft.vrl/vrl
editor.setBackground(Color.white);
editor.setForeground(Color.black);
editor.setCaretColor(Color.black);
editor.setOpaque(true);
代码示例来源:origin: de.sciss/syntaxpane
/**
* Installs the View on the given EditorPane. This is called by Swing and
* can be used to do anything you need on the JEditorPane control. Here
* I set some default Actions.
*/
@Override
public void install(JEditorPane editorPane) {
super.install(editorPane);
// get our font
String fontName = getProperty("DefaultFont");
Font font = DEFAULT_FONT;
if (fontName != null) {
font = Font.decode(fontName);
}
editorPane.setFont(font);
Configuration conf = getConfig();
Color caretColor = conf.getColor(CONFIG_CARETCOLOR, Color.BLACK);
editorPane.setCaretColor(caretColor);
Color selectionColor = getConfig().getColor(CONFIG_SELECTION, new Color(0x99ccff));
editorPane.setSelectionColor(selectionColor);
addActions(editorPane);
addComponents(editorPane);
addPopupMenu(editorPane);
}
代码示例来源:origin: de.sciss/jsyntaxpane
/**
* Install the View on the given EditorPane. This is called by Swing and
* can be used to do anything you need on the JEditorPane control. Here
* I set some default Actions.
*
* @param editorPane
*/
@Override
public void install(JEditorPane editorPane) {
super.install(editorPane);
// get our font
String fontName = getProperty("DefaultFont");
Font font = DEFAULT_FONT;
if (fontName != null) {
font = Font.decode(fontName);
}
editorPane.setFont(font);
Configuration conf = getConfig();
Color caretColor = conf.getColor(CONFIG_CARETCOLOR, Color.BLACK);
editorPane.setCaretColor(caretColor);
Color selectionColor = getConfig().getColor(CONFIG_SELECTION, new Color(0x99ccff));
editorPane.setSelectionColor(selectionColor);
addActions(editorPane);
addComponents(editorPane);
addPopupMenu(editorPane);
}
代码示例来源:origin: freeplane/freeplane
textfield.setCaretColor(nodeTextColor);
final StringBuilder ruleBuilder = new StringBuilder(100);
ruleBuilder.append("body {");
代码示例来源:origin: freeplane/freeplane
if(textColor != null){
editorPane.setForeground(textColor);
editorPane.setCaretColor(textColor);
内容来源于网络,如有侵权,请联系作者删除!