本文整理了Java中org.netbeans.api.visual.widget.Widget.setForeground()
方法的一些代码示例,展示了Widget.setForeground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.setForeground()
方法的具体详情如下:
包路径:org.netbeans.api.visual.widget.Widget
类名称:Widget
方法名:setForeground
[英]Sets the widget foreground color.
[中]设置小部件的前景色。
代码示例来源:origin: eu.limetri.client/mapviewer-nb-swing
@Override
public void propertyChange(PropertyChangeEvent evt) {
LOGGER.log(Level.FINEST, "Received a PropertyChangeEvent for property {0}", evt.getPropertyName());
if (evt.getPropertyName().equals(Layer.PROP_PALETTE)) {
Palette palette = ((Palette) evt.getNewValue());
LOGGER.log(Level.FINEST, "Updating {0}'s palette to {1}", new String[]{node.getName(), palette.toString()});
List<Widget> widgets = scene.findWidgets(node);
for (Widget widget : widgets) {
Color color = ((Palette) evt.getNewValue()).getColorForState(widget.getState());
widget.setForeground(color);
}
scene.validate();
}
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
(int) (sourceColor.getBlue () + progress * (targetColor.getBlue () - sourceColor.getBlue ()))
);
widget.setForeground (color);
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
(int) (sourceColor.getBlue () + progress * (targetColor.getBlue () - sourceColor.getBlue ()))
);
widget.setForeground (color);
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
public void installUI (VMDNodeWidget widget) {
widget.setBorder (BORDER60);
Widget header = widget.getHeader ();
header.setBackground (COLOR60_HOVER_BACKGROUND);
header.setBorder (VMDOriginalColorScheme.BORDER_PIN);
Widget pinsSeparator = widget.getPinsSeparator ();
pinsSeparator.setForeground (VMDOriginalColorScheme.BORDER_CATEGORY_BACKGROUND);
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
public void installUI (VMDNodeWidget widget) {
widget.setBorder (BORDER60);
Widget header = widget.getHeader ();
header.setBackground (COLOR60_HOVER_BACKGROUND);
header.setBorder (VMDOriginalColorScheme.BORDER_PIN);
Widget pinsSeparator = widget.getPinsSeparator ();
pinsSeparator.setForeground (VMDOriginalColorScheme.BORDER_CATEGORY_BACKGROUND);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
public void installUI (VMDNodeWidget widget) {
widget.setBorder (VMDFactory.createVMDNodeBorder ());
widget.setOpaque (false);
Widget header = widget.getHeader ();
header.setBorder (BORDER_PIN);
header.setBackground (COLOR_SELECTED);
header.setOpaque (false);
Widget minimize = widget.getMinimizeButton ();
minimize.setBorder (BORDER_MINIMIZE);
Widget pinsSeparator = widget.getPinsSeparator ();
pinsSeparator.setForeground (BORDER_CATEGORY_BACKGROUND);
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
public void installUI (VMDNodeWidget widget) {
widget.setBorder (VMDFactory.createVMDNodeBorder ());
widget.setOpaque (false);
Widget header = widget.getHeader ();
header.setBorder (BORDER_PIN);
header.setBackground (COLOR_SELECTED);
header.setOpaque (false);
Widget minimize = widget.getMinimizeButton ();
minimize.setBorder (BORDER_MINIMIZE);
Widget pinsSeparator = widget.getPinsSeparator ();
pinsSeparator.setForeground (BORDER_CATEGORY_BACKGROUND);
}
内容来源于网络,如有侵权,请联系作者删除!