本文整理了Java中org.eclipse.swt.widgets.Button.getForeground()
方法的一些代码示例,展示了Button.getForeground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.getForeground()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Button
类名称:Button
方法名:getForeground
暂无
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void handleEvent(Event event){
if(encryptToggle.getSelection()){
Messages.setLanguageText(encryptToggle,"SpeedTestWizard.test.panel.encrypted");
originalColor = encryptToggle.getForeground();
//Color highlightColor = ColorCache.getColor(display,178,78,127);
Color highlightColor = Colors.getSystemColor(display, SWT.COLOR_DARK_YELLOW);
encryptToggle.setBackground(highlightColor);
}else{
Messages.setLanguageText(encryptToggle,"SpeedTestWizard.test.panel.standard");
if(originalColor!=null){
encryptToggle.setBackground(originalColor);
}
}
}//handleEvent
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.tips.ui
private void paintButton(GC gc, Composite providerButton, TipProvider provider) {
gc.setAdvanced(true);
if (!gc.getAdvanced()) {
throw new RuntimeException(Messages.Slider_13);
}
if (provider.equals(fSelectedProvider)) {
gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT));
gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION));
gc.drawRectangle(0, 0, fIconSize + 3, fIconSize + 3);
} else {
gc.setForeground(fLeftButton.getForeground());
gc.setBackground(fLeftButton.getBackground());
boolean mouseIn = getDisplay().getCursorControl() == providerButton;
if (mouseIn) {
gc.drawRectangle(0, 0, fIconSize + 3, fIconSize + 3);
} else {
gc.setBackground(fScroller.getBackground());
}
}
gc.fillRectangle(2, 2, fIconSize, fIconSize);
Image overlay = getUnreadOverlay(providerButton, provider);
gc.drawImage(overlay, 2, 2);
if (overlay != getProviderImage(provider, selectProviderImage(provider))) {
overlay.dispose();
}
}
内容来源于网络,如有侵权,请联系作者删除!