本文整理了Java中org.eclipse.swt.widgets.Scrollable.topHandle()
方法的一些代码示例,展示了Scrollable.topHandle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scrollable.topHandle()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Scrollable
类名称:Scrollable
方法名:topHandle
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) {
super.redrawWidget (x, y, width, height, redrawAll, all, trim);
if (!gtk_widget_get_realized (handle)) return;
if (!trim) return;
int /*long*/ topHandle = topHandle (), paintHandle = paintHandle ();
if (topHandle == paintHandle) return;
int /*long*/ window = gtk_widget_get_window (topHandle);
GdkRectangle rect = new GdkRectangle ();
if (redrawAll) {
GtkAllocation allocation = new GtkAllocation ();
OS.gtk_widget_get_allocation (topHandle, allocation);
rect.width = allocation.width;
rect.height = allocation.height;
} else {
int [] destX = new int [1], destY = new int [1];
OS.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY);
rect.x = destX [0];
rect.y = destY [0];
rect.width = Math.max (0, width);
rect.height = Math.max (0, height);
}
OS.gdk_window_invalidate_rect (window, rect, all);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) {
super.redrawWidget (x, y, width, height, redrawAll, all, trim);
if (!gtk_widget_get_realized (handle)) return;
if (!trim) return;
long /*int*/ topHandle = topHandle (), paintHandle = paintHandle ();
if (topHandle == paintHandle) return;
long /*int*/ window = gtk_widget_get_window (topHandle);
GdkRectangle rect = new GdkRectangle ();
if (redrawAll) {
GtkAllocation allocation = new GtkAllocation ();
OS.gtk_widget_get_allocation (topHandle, allocation);
rect.width = allocation.width;
rect.height = allocation.height;
} else {
int [] destX = new int [1], destY = new int [1];
OS.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY);
rect.x = destX [0];
rect.y = destY [0];
rect.width = Math.max (0, width);
rect.height = Math.max (0, height);
}
OS.gdk_window_invalidate_rect (window, rect, all);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) {
super.redrawWidget (x, y, width, height, redrawAll, all, trim);
if (!gtk_widget_get_realized (handle)) return;
if (!trim) return;
int /*long*/ topHandle = topHandle (), paintHandle = paintHandle ();
if (topHandle == paintHandle) return;
int /*long*/ window = gtk_widget_get_window (topHandle);
GdkRectangle rect = new GdkRectangle ();
if (redrawAll) {
GtkAllocation allocation = new GtkAllocation ();
OS.gtk_widget_get_allocation (topHandle, allocation);
rect.width = allocation.width;
rect.height = allocation.height;
} else {
int [] destX = new int [1], destY = new int [1];
OS.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY);
rect.x = destX [0];
rect.y = destY [0];
rect.width = Math.max (0, width);
rect.height = Math.max (0, height);
}
OS.gdk_window_invalidate_rect (window, rect, all);
}
内容来源于网络,如有侵权,请联系作者删除!