本文整理了Java中org.eclipse.swt.widgets.Scrollable.printWidget()
方法的一些代码示例,展示了Scrollable.printWidget()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scrollable.printWidget()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Scrollable
类名称:Scrollable
方法名:printWidget
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void printWidget (GC gc, int /*long*/ drawable, int depth, int x, int y) {
Region oldClip = new Region (gc.getDevice ());
Region newClip = new Region (gc.getDevice ());
Point loc = DPIUtil.autoScaleDown(new Point (x, y));
gc.getClipping (oldClip);
Rectangle rect = getBounds ();
newClip.add (oldClip);
newClip.intersect (loc.x, loc.y, rect.width, rect.height);
gc.setClipping (newClip);
super.printWidget (gc, drawable, depth, x, y);
Rectangle clientRect = getClientAreaInPixels ();
Point pt = display.mapInPixels (this, parent, clientRect.x, clientRect.y);
clientRect.x = x + pt.x - rect.x;
clientRect.y = y + pt.y - rect.y;
newClip.intersect (DPIUtil.autoScaleDown(clientRect));
gc.setClipping (newClip);
Control [] children = _getChildren ();
for (int i=children.length-1; i>=0; --i) {
Control child = children [i];
if (child.getVisible ()) {
Point location = child.getLocationInPixels ();
child.printWidget (gc, drawable, depth, x + location.x, y + location.y);
}
}
gc.setClipping (oldClip);
oldClip.dispose ();
newClip.dispose ();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
void printWidget (GC gc, long /*int*/ drawable, int depth, int x, int y) {
Region oldClip = new Region (gc.getDevice ());
Region newClip = new Region (gc.getDevice ());
Point loc = DPIUtil.autoScaleDown(new Point (x, y));
gc.getClipping (oldClip);
Rectangle rect = getBounds ();
newClip.add (oldClip);
newClip.intersect (loc.x, loc.y, rect.width, rect.height);
gc.setClipping (newClip);
super.printWidget (gc, drawable, depth, x, y);
Rectangle clientRect = getClientAreaInPixels ();
Point pt = display.mapInPixels (this, parent, clientRect.x, clientRect.y);
clientRect.x = x + pt.x - rect.x;
clientRect.y = y + pt.y - rect.y;
newClip.intersect (DPIUtil.autoScaleDown(clientRect));
gc.setClipping (newClip);
Control [] children = _getChildren ();
for (int i=children.length-1; i>=0; --i) {
Control child = children [i];
if (child.getVisible ()) {
Point location = child.getLocationInPixels ();
child.printWidget (gc, drawable, depth, x + location.x, y + location.y);
}
}
gc.setClipping (oldClip);
oldClip.dispose ();
newClip.dispose ();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void printWidget (GC gc, int /*long*/ drawable, int depth, int x, int y) {
Region oldClip = new Region (gc.getDevice ());
Region newClip = new Region (gc.getDevice ());
Point loc = DPIUtil.autoScaleDown(new Point (x, y));
gc.getClipping (oldClip);
Rectangle rect = getBounds ();
newClip.add (oldClip);
newClip.intersect (loc.x, loc.y, rect.width, rect.height);
gc.setClipping (newClip);
super.printWidget (gc, drawable, depth, x, y);
Rectangle clientRect = getClientAreaInPixels ();
Point pt = display.mapInPixels (this, parent, clientRect.x, clientRect.y);
clientRect.x = x + pt.x - rect.x;
clientRect.y = y + pt.y - rect.y;
newClip.intersect (DPIUtil.autoScaleDown(clientRect));
gc.setClipping (newClip);
Control [] children = _getChildren ();
for (int i=children.length-1; i>=0; --i) {
Control child = children [i];
if (child.getVisible ()) {
Point location = child.getLocationInPixels ();
child.printWidget (gc, drawable, depth, x + location.x, y + location.y);
}
}
gc.setClipping (oldClip);
oldClip.dispose ();
newClip.dispose ();
}
内容来源于网络,如有侵权,请联系作者删除!