本文整理了Java中javax.swing.JTextArea.getForeground()
方法的一些代码示例,展示了JTextArea.getForeground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.getForeground()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:getForeground
暂无
代码示例来源:origin: JetBrains/ideavim
private ExOutputPanel(@NotNull Editor editor) {
myEditor = editor;
// Create a text editor for the text and a label for the prompt
BorderLayout layout = new BorderLayout(0, 0);
setLayout(layout);
add(myScrollPane, BorderLayout.CENTER);
add(myLabel, BorderLayout.SOUTH);
setFontForElements();
myText.setBorder(null);
myScrollPane.setBorder(null);
myLabel.setForeground(myText.getForeground());
myLabel.setBackground(myText.getBackground());
setForeground(myText.getForeground());
setBackground(myText.getBackground());
myText.setEditable(false);
setBorder(BorderFactory.createEtchedBorder());
myAdapter = new ComponentAdapter() {
public void componentResized(ComponentEvent e) {
positionPanel();
}
};
// Setup some listeners to handle keystrokes
MoreKeyListener moreKeyListener = new MoreKeyListener(this);
addKeyListener(moreKeyListener);
myText.addKeyListener(moreKeyListener);
}
代码示例来源:origin: jshiell/checkstyle-idea
/**
* Initialise the view.
*/
private void initialise() {
// fake a multi-line label with a text area
descriptionLabel.setText(CheckStyleBundle.message("config.inspection.description"));
descriptionLabel.setEditable(false);
descriptionLabel.setEnabled(false);
descriptionLabel.setWrapStyleWord(true);
descriptionLabel.setLineWrap(true);
descriptionLabel.setOpaque(false);
descriptionLabel.setDisabledTextColor(descriptionLabel.getForeground());
final GridBagConstraints descLabelConstraints = new GridBagConstraints(
0, 0, 3, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST,
GridBagConstraints.BOTH, JBUI.insets(4), 0, 0);
add(descriptionLabel, descLabelConstraints);
}
代码示例来源:origin: stackoverflow.com
public void windowClosed(WindowEvent e)
Color color = textArea.getForeground();
int rgb = color.getRGB();
prefs.put("textAreaColor", Integer.toString(rgb));
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
BorderFactory.createLineBorder(tt.getForeground()),
BorderFactory.createEmptyBorder(0, 3, 0, 3)
));
代码示例来源:origin: org.java.net.substance/substance
@Override
public void run() {
if (!SubstanceLookAndFeel.isCurrentLookAndFeel())
return;
if (textArea == null)
return;
Color foregr = textArea.getForeground();
if ((foregr == null) || (foregr instanceof UIResource)) {
textArea
.setForeground(SubstanceColorUtilities
.getForegroundColor(SubstanceLookAndFeel
.getCurrentSkin(textArea)
.getEnabledColorScheme(
SubstanceLookAndFeel
.getDecorationType(textArea))));
}
}
});
代码示例来源:origin: com.github.insubstantial/substance
@Override
public void run() {
if (!SubstanceLookAndFeel.isCurrentLookAndFeel())
return;
if (textArea == null)
return;
Color foregr = textArea.getForeground();
if ((foregr == null) || (foregr instanceof UIResource)) {
textArea
.setForeground(SubstanceColorUtilities
.getForegroundColor(SubstanceLookAndFeel
.getCurrentSkin(textArea)
.getEnabledColorScheme(
SubstanceLookAndFeel
.getDecorationType(textArea))));
}
}
});
内容来源于网络,如有侵权,请联系作者删除!