javax.swing.JEditorPane.setSelectionColor()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中javax.swing.JEditorPane.setSelectionColor()方法的一些代码示例,展示了JEditorPane.setSelectionColor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JEditorPane.setSelectionColor()方法的具体详情如下:
包路径:javax.swing.JEditorPane
类名称:JEditorPane
方法名:setSelectionColor

JEditorPane.setSelectionColor介绍

暂无

代码示例

代码示例来源:origin: bobbylight/RSyntaxTextArea

textArea.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
textArea.setSelectedTextColor(selFG);
textArea.setSelectionColor(selBG);

代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-widgets-extra

textArea.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
textArea.setSelectedTextColor(selFG);
textArea.setSelectionColor(selBG);

代码示例来源:origin: org.nuiton.thirdparty/rsyntaxtextarea

textArea.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
textArea.setSelectedTextColor(selFG);
textArea.setSelectionColor(selBG);

代码示例来源:origin: org.nuiton/nuiton-widgets

textArea.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
textArea.setSelectedTextColor(selFG);
textArea.setSelectionColor(selBG);

代码示例来源:origin: com.fifesoft/autocomplete

textArea.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
textArea.setSelectedTextColor(selFG);
textArea.setSelectionColor(selBG);

代码示例来源: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: 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: com.fifesoft/rsyntaxtextarea

textArea.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
textArea.setSelectedTextColor(selFG);
textArea.setSelectionColor(selBG);

相关文章

JEditorPane类方法