本文整理了Java中org.eclipse.swt.widgets.Shell.setForeground()
方法的一些代码示例,展示了Shell.setForeground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.setForeground()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:setForeground
暂无
代码示例来源:origin: org.apache.uima/uimaj-ep-cas-editor
@Override
public void setForegroundColor(Color foreground) {
mShell.setForeground(foreground);
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
Hover(Shell parent) {
final Display display = parent.getDisplay();
hoverShell = new Shell(parent, SWT.NO_TRIM | SWT.ON_TOP
| SWT.NO_FOCUS | SWT.TOOL);
hoverShell.setBackground(display
.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
hoverShell.setForeground(display
.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
// RAP [bm]:
// hoverShell.addPaintListener(new PaintListener() {
// public void paintControl(PaintEvent pe) {
// pe.gc.drawString(text, hm, hm);
// if (!MAC) {
// pe.gc.drawPolygon(getPolygon(true));
// }
// }
// });
// RAPEND: [bm]
hoverShell.addMouseListener(new MouseAdapter() {
public void mouseDown(MouseEvent e) {
hideHover();
}
});
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.m2e.core.ui
Hover(Shell parent) {
final Display display = parent.getDisplay();
hoverShell = new Shell(parent, SWT.NO_TRIM | SWT.ON_TOP | SWT.NO_FOCUS | SWT.TOOL);
hoverShell.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
hoverShell.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
hoverShell.addPaintListener(new PaintListener() {
public void paintControl(PaintEvent pe) {
pe.gc.drawText(text, hm, hm);
if(!CARBON) {
pe.gc.drawPolygon(getPolygon(true));
}
}
});
hoverShell.addMouseListener(new MouseAdapter() {
public void mouseDown(MouseEvent e) {
hideHover();
}
});
}
代码示例来源:origin: openaudible/openaudible
/**
* Create the Shell and Label for the fake tooltip showing URLs
*/
private void createFakeToolTip() {
fakeToolTip = new Shell(GUI.shell, SWT.ON_TOP);
fakeToolTip.setLayout(LayoutShop.createFillLayout(2, 2));
fakeToolTip.setForeground(GUI.display
.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
fakeToolTip.setBackground(GUI.display
.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
fakeToolTipLabel = new Label(fakeToolTip, SWT.NONE);
fakeToolTipLabel.setForeground(GUI.display
.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
fakeToolTipLabel.setBackground(GUI.display
.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
Hover(Shell parent) {
final Display display = parent.getDisplay();
hoverShell = new Shell(parent, SWT.NO_TRIM | SWT.ON_TOP
| SWT.NO_FOCUS | SWT.TOOL);
hoverShell.setBackground(display
.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
hoverShell.setForeground(display
.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
hoverShell.addPaintListener(pe -> {
pe.gc.drawString(text, hm, hm);
if (!MAC) {
pe.gc.drawPolygon(getPolygon(true));
}
});
hoverShell.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
hideHover();
}
});
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
Hover(Shell parent) {
final Display display = parent.getDisplay();
hoverShell = new Shell(parent, SWT.NO_TRIM | SWT.ON_TOP
| SWT.NO_FOCUS | SWT.TOOL);
hoverShell.setBackground(display
.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
hoverShell.setForeground(display
.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
hoverShell.addPaintListener(pe -> {
pe.gc.drawText(text, hm, hm);
if (!MAC) {
pe.gc.drawPolygon(getPolygon(true));
}
});
hoverShell.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
hideHover();
}
});
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
Hover(Shell parent) {
final Display display = parent.getDisplay();
hoverShell = new Shell(parent, SWT.NO_TRIM | SWT.ON_TOP
| SWT.NO_FOCUS | SWT.TOOL);
hoverShell.setBackground(display
.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
hoverShell.setForeground(display
.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
hoverShell.addPaintListener(pe -> {
pe.gc.drawText(text, hm, hm);
if (!MAC) {
pe.gc.drawPolygon(getPolygon(true));
}
});
hoverShell.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
hideHover();
}
});
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
Hover(Shell parent) {
final Display display = parent.getDisplay();
hoverShell = new Shell(parent, SWT.NO_TRIM | SWT.ON_TOP
| SWT.NO_FOCUS | SWT.TOOL);
hoverShell.setBackground(display
.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
hoverShell.setForeground(display
.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
hoverShell.addPaintListener(pe -> {
pe.gc.drawString(text, hm, hm);
if (!MAC) {
pe.gc.drawPolygon(getPolygon(true));
}
});
hoverShell.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
hideHover();
}
});
}
代码示例来源:origin: BiglySoftware/BiglyBT
shell.setLayout(new FormLayout());
shell.setBackground(Colors.getSystemColor(display, SWT.COLOR_INFO_BACKGROUND));
shell.setForeground(Colors.getSystemColor(display, SWT.COLOR_INFO_FOREGROUND));
代码示例来源:origin: BiglySoftware/BiglyBT
splash.setForeground(Colors.blues[Colors.BLUES_DARKEST]);
splash.addMouseListener(mListener);
splash.addMouseMoveListener(mMoveListener);
内容来源于网络,如有侵权,请联系作者删除!