本文整理了Java中javax.swing.JEditorPane.setForeground()
方法的一些代码示例,展示了JEditorPane.setForeground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JEditorPane.setForeground()
方法的具体详情如下:
包路径:javax.swing.JEditorPane
类名称:JEditorPane
方法名:setForeground
暂无
代码示例来源:origin: com.eas.platypus/platypus-js-grid
@Override
public void setForeground(Color fg) {
super.setForeground(fg);
}
/*
代码示例来源:origin: bobbylight/RSyntaxTextArea
fg = SystemColor.textText;
textArea.setForeground(fg);
代码示例来源:origin: org.gephi/ui-components
@Override
public void setForeground(Color color) {
super.setForeground(color);
setText(originalText);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui
public void setForeground(Color color) {
Color foreground = getForeground();
if (foreground != null && foreground.equals(color)) return;
super.setForeground(color);
forceSetText = true;
setText(getText());
}
代码示例来源:origin: stackoverflow.com
ep = First.ep;
ep.setText(jtf.getText());
ep.setForeground(Color.red);
代码示例来源:origin: triplea-game/triplea
notesPanel.setEditable(false);
notesPanel.setContentType("text/html");
notesPanel.setForeground(Color.BLACK);
setLayout(new BorderLayout());
final JSplitPane mainSplit = new JSplitPane();
代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit
PluginDetailPanel()
{
setLayout(new BorderLayout());
pluginDetail = new JEditorPane();
pluginDetail.setEditable(false);
pluginDetail.setContentType("text/html");
pluginDetail.setBackground(jEdit.getColorProperty("view.bgColor"));
pluginDetail.setForeground(jEdit.getColorProperty("view.fgColor"));
pluginDetail.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, true);
title = new JLabel();
add(title, BorderLayout.NORTH);
JScrollPane scroll = new JScrollPane(pluginDetail);
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
add(scroll);
} //}}}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public void configurarCores() {
setBackground(ColorController.FUNDO_MEDIO);
if(Configuracoes.getInstancia().isTemaDark()){
rotulo.setForeground(ColorController.AMARELO);
}else{
rotulo.setForeground(ColorController.FUNDO_ESCURO);
}
rotuloVAtual.setForeground(ColorController.COR_LETRA);
rotuloNovaV.setForeground(ColorController.COR_LETRA);
labelAba.setForeground(ColorController.COR_LETRA);
labelAba.setBackground(ColorController.FUNDO_CLARO);
jEditorPane1.setBackground(ColorController.FUNDO_CLARO);
jEditorPane1.setForeground(ColorController.COR_LETRA);
if(WeblafUtils.weblafEstaInstalado())
{
WeblafUtils.configurarBotao(botaoBaixar, ColorController.AMARELO, ColorController.FUNDO_ESCURO, ColorController.FUNDO_CLARO, ColorController.COR_LETRA, 5, true);
WeblafUtils.configuraWebLaf(jScrollPane1);
}
}
代码示例来源:origin: org.jodd/jodd-wot
detailsData.setForeground(new Color(33, 33, 33));
detailsData.setBorder(BorderFactory.createLineBorder(new Color(100, 100, 244), 1));
detailsData.setPreferredSize(new Dimension(150, INITIAL_HEIGHT));
componentData.setForeground(new Color(33, 33, 33));
componentData.setBorder(BorderFactory.createLineBorder(new Color(100, 100, 244), 1));
componentData.setPreferredSize(new Dimension(INITIAL_WIDTH, 36));
代码示例来源:origin: stackoverflow.com
JEditorPane dtrpnTypeTextHere = new JEditorPane();
dtrpnTypeTextHere.setContentType("type/normal");
dtrpnTypeTextHere.setToolTipText("");
dtrpnTypeTextHere.setFont(new Font("Arial", Font.PLAIN, 16));
dtrpnTypeTextHere.setForeground(Color.GREEN);
dtrpnTypeTextHere.setBackground(Color.BLACK);
dtrpnTypeTextHere.setBounds(10, 23, 1152, 671);
contentPane.add(dtrpnTypeTextHere);
int length = dtrpnTypeTextHere.getDocument().getLength();
String text = dtrpnTypeTextHere.getDocument().getText(0, length);
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public void configurarCores() {
painelSelecionadorPlugins.setBackground(ColorController.FUNDO_MEDIO);
painelPluginsDisponiveis.setBackground(ColorController.FUNDO_MEDIO);
editorStyleSet(painelEditorTutorial);
painelEditorTutorial.setBackground(ColorController.FUNDO_CLARO);
painelEditorTutorial.setForeground(ColorController.COR_LETRA);
setBackground(ColorController.FUNDO_MEDIO);
if (WeblafUtils.weblafEstaInstalado()) {
WeblafUtils.configuraWebLaf(scrollPlugins);
WeblafUtils.configuraWebLaf(scrollTutorial);
WeblafUtils.configurarBotao(botaoInstalarPlugins, ColorController.FUNDO_ESCURO, ColorController.COR_LETRA_TITULO, ColorController.FUNDO_CLARO, ColorController.COR_LETRA, 7, true);
WeblafUtils.configurarBotao(botaoSelecionarTodos, ColorController.FUNDO_ESCURO, ColorController.COR_LETRA_TITULO, ColorController.FUNDO_CLARO, ColorController.COR_LETRA, 7, true);
}
}
/**
代码示例来源:origin: org.java.net.substance/substance
@Override
public void run() {
if (editorPane == null)
return;
Color foregr = editorPane.getForeground();
if ((foregr == null) || (foregr instanceof UIResource)) {
editorPane
.setForeground(SubstanceColorUtilities
.getForegroundColor(SubstanceLookAndFeel
.getCurrentSkin(editorPane)
.getEnabledColorScheme(
SubstanceLookAndFeel
.getDecorationType(editorPane))));
}
}
});
代码示例来源:origin: com.github.insubstantial/substance
@Override
public void run() {
if (editorPane == null)
return;
Color foregr = editorPane.getForeground();
if ((foregr == null) || (foregr instanceof UIResource)) {
editorPane
.setForeground(SubstanceColorUtilities
.getForegroundColor(SubstanceLookAndFeel
.getCurrentSkin(editorPane)
.getEnabledColorScheme(
SubstanceLookAndFeel
.getDecorationType(editorPane))));
}
}
});
代码示例来源: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));
Font font = console.findFont("Monospaced", Font.PLAIN, 14,
new String[] {"Monaco", "Andale Mono"});
代码示例来源:origin: triplea-game/triplea
gameNotesPane.setEditable(false);
gameNotesPane.setContentType("text/html");
gameNotesPane.setForeground(Color.BLACK);
代码示例来源:origin: Multibit-Legacy/multibit-hd
editorPane.setForeground(Themes.currentTheme.text());
代码示例来源:origin: com.fifesoft/autocomplete
fg = SystemColor.textText;
textArea.setForeground(fg);
代码示例来源:origin: com.fifesoft/rsyntaxtextarea
fg = SystemColor.textText;
textArea.setForeground(fg);
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
editorPane.setForeground(ColorController.AMARELO);
HTMLEditorKit kit = new HTMLEditorKit();
editorPane.setEditorKit(kit);
代码示例来源:origin: freeplane/freeplane
final JEditorPane editorPane = htmlEditorPanel.getEditorPane();
if(textColor != null){
editorPane.setForeground(textColor);
editorPane.setCaretColor(textColor);
内容来源于网络,如有侵权,请联系作者删除!