本文整理了Java中org.eclipse.swt.widgets.Shell.addPaintListener()
方法的一些代码示例,展示了Shell.addPaintListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.addPaintListener()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:addPaintListener
暂无
代码示例来源:origin: pentaho/pentaho-kettle
splash.addPaintListener( new PaintListener() {
public void paintControl( PaintEvent e ) {
StringBuilder sb = new StringBuilder();
代码示例来源: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: stackoverflow.com
shell.addPaintListener(painter);
final Label l = new Label(shell, SWT.NONE);
l.setBounds(10, 10, 60, 40);
代码示例来源:origin: org.eclipse.e4.ui.workbench.addons/swt
public Overlay(Shell shell) {
baseShell = shell;
Rectangle cr = baseShell.getClientArea();
Rectangle trim = baseShell.computeTrim(cr.x, cr.y, cr.width, cr.height);
offsetX = -trim.x;
offsetY = -trim.y;
overlayShell = new Shell(baseShell, SWT.NO_TRIM | SWT.ON_TOP);
overlayShell.setBounds(baseShell.getBounds());
overlayShell.setBackground(baseShell.getDisplay().getSystemColor(
SWT.COLOR_DARK_GREEN));
overlayShell.setAlpha(128);
blue = new Color(baseShell.getDisplay(), 0, 0, 128);
overlayShell.addPaintListener(new PaintListener() {
public void paintControl(PaintEvent e) {
e.gc.setForeground(blue);
e.gc.setBackground(blue);
for (Adornment adornment : adornments) {
adornment.drawAdornment(e.gc);
}
}
});
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
shell.addPaintListener(e -> e.gc.drawString(ControlExample.getResourceString("PopupMenuHere"), 20, 20));
shell.open ();
shellCount++;
代码示例来源: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.swt.examples
public Shell open (Display display) {
final Color red = new Color(display, 0xFF, 0, 0);
final Shell shell = new Shell (display);
shell.addPaintListener(event -> {
GC gc = event.gc;
gc.setForeground(red);
Rectangle rect = shell.getClientArea();
gc.drawRectangle(rect.x + 10, rect.y + 10, rect.width - 20, rect.height - 20);
gc.drawString(resHello.getString("Hello_world"), rect.x + 20, rect.y + 20);
});
shell.addDisposeListener (e -> red.dispose());
shell.open ();
return shell;
}
}
代码示例来源: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.e4.ui.workbench.addons.swt
public Overlay(Shell shell) {
baseShell = shell;
Rectangle cr = baseShell.getClientArea();
Rectangle trim = baseShell.computeTrim(cr.x, cr.y, cr.width, cr.height);
offsetX = -trim.x;
offsetY = -trim.y;
overlayShell = new Shell(baseShell, SWT.NO_TRIM | SWT.ON_TOP);
overlayShell.setBounds(baseShell.getBounds());
overlayShell.setBackground(baseShell.getDisplay().getSystemColor(
SWT.COLOR_DARK_GREEN));
overlayShell.setAlpha(128);
blue = new Color(baseShell.getDisplay(), 0, 0, 128);
overlayShell.addPaintListener(e -> {
e.gc.setForeground(blue);
e.gc.setBackground(blue);
for (Adornment adornment : adornments) {
adornment.drawAdornment(e.gc);
}
});
}
代码示例来源: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: org.eclipse/org.eclipse.jdt.ui
fPopup.addPaintListener(new PaintListener() {
public void paintControl(PaintEvent pe) {
pe.gc.drawPolygon(getPolygon(true));
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
fPopup.addPaintListener(new PaintListener() {
@Override
public void paintControl(PaintEvent pe) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
fPopup.addPaintListener(new PaintListener() {
@Override
public void paintControl(PaintEvent pe) {
代码示例来源:origin: org.eclipse.xtext/ui
popup.addPaintListener(new PaintListener() {
public void paintControl(PaintEvent pe) {
pe.gc.drawPolygon(getPolygon(true));
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.addons.swt
stylingEngine.style(overlayFrame);
overlayFrame.addPaintListener(e -> {
for (int i = 0; i < images.size(); i++) {
Image image = images.get(i);
代码示例来源:origin: BiglySoftware/BiglyBT
shell.addPaintListener(new PaintListener() {
代码示例来源:origin: BiglySoftware/BiglyBT
shell.addPaintListener(new PaintListener() {
@Override
public void paintControl(PaintEvent e) {
代码示例来源:origin: org.eclipse.e4.ui.workbench.addons/swt
stylingEngine.style(overlayFrame);
overlayFrame.addPaintListener(new PaintListener() {
public void paintControl(PaintEvent e) {
for (int i = 0; i < images.size(); i++) {
内容来源于网络,如有侵权,请联系作者删除!