本文整理汇总了Java中java.awt.SystemColor.text方法的典型用法代码示例。如果您正苦于以下问题:Java SystemColor.text方法的具体用法?Java SystemColor.text怎么用?Java SystemColor.text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.SystemColor
的用法示例。
在下文中一共展示了SystemColor.text方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setItem
import java.awt.SystemColor; //导入方法依赖的package包/类
public void setItem(Object anObject) {
value = anObject;
if (value instanceof String) {
setText(NbBundle.getMessage(SplashUISupport.class, "SplashUISupport_color_default"));
super.setForeground(SystemColor.textText);
super.setBackground(SystemColor.text);
} else {
setText("");
super.setBackground((Color) value);
}
}
示例2: getDefaultBG
import java.awt.SystemColor; //导入方法依赖的package包/类
/**
* Returns the default selection background color to use if "default" is
* specified in a theme.
*
* @return The default selection background to use.
* @see #getDefaultSelectionFG()
*/
private static final Color getDefaultBG() {
Color c = UIManager.getColor("nimbusLightBackground");
if (c==null) {
// Don't search for "text", as Nimbus defines that as the text
// component "text" color, but Basic LAFs use it for text
// component backgrounds! Nimbus also defines TextArea.background
// as too dark, not what it actually uses for text area backgrounds
c = UIManager.getColor("TextArea.background");
if (c==null) {
c = new ColorUIResource(SystemColor.text);
}
}
return c;
}
示例3: getBasicSystemColors
import java.awt.SystemColor; //导入方法依赖的package包/类
private Object[] getBasicSystemColors() {
Object[] basicSystemColors = {"desktop", SystemColor.desktop,
"activeCaption", SystemColor.activeCaption,
"activeCaptionText", SystemColor.activeCaptionText,
"activeCaptionBorder", SystemColor.activeCaptionBorder,
"inactiveCaption", SystemColor.inactiveCaption,
"inactiveCaptionText", SystemColor.inactiveCaptionText,
"inactiveCaptionBorder", SystemColor.inactiveCaptionBorder,
"window", SystemColor.window,
"windowBorder", SystemColor.windowBorder,
"windowText", SystemColor.windowText,
"menu", SystemColor.menu,
"menuText", SystemColor.menuText,
"text", SystemColor.text,
"textText", SystemColor.textText,
"textHighlight", SystemColor.textHighlight,
"textHighlightText", SystemColor.textHighlightText,
"textInactiveText", SystemColor.textInactiveText,
"control", SystemColor.control,
"controlText", SystemColor.controlText,
"controlHighlight", SystemColor.controlHighlight,
"controlLtHighlight", SystemColor.controlLtHighlight,
"controlShadow", SystemColor.controlShadow,
"controlDkShadow", SystemColor.controlDkShadow,
"scrollbar", SystemColor.scrollbar,
"info", SystemColor.info,
"infoText", SystemColor.infoText };
return basicSystemColors;
}
示例4: Style
import java.awt.SystemColor; //导入方法依赖的package包/类
private Style(String name) {
this.name = name;
foreground = SystemColor.textText;
background = SystemColor.text;
}