本文整理了Java中org.eclipse.swt.widgets.Label.setFontDescription()
方法的一些代码示例,展示了Label.setFontDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setFontDescription()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:setFontDescription
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void setFontDescription (int /*long*/ font) {
super.setFontDescription (font);
if (labelHandle != 0) setFontDescription (labelHandle, font);
if (imageHandle != 0) setFontDescription (imageHandle, font);
// Bug 445801: Work around for computeSize not returning a different value after
// changing font, see https://bugzilla.gnome.org/show_bug.cgi?id=753116
if (OS.GTK3) {
// This updates the pango context and also clears the size request cache on the GTK side.
int originalDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.GTK_TEXT_DIR_RTL : OS.GTK_TEXT_DIR_LTR;
int tempDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.GTK_TEXT_DIR_LTR : OS.GTK_TEXT_DIR_RTL;
OS.gtk_widget_set_direction (labelHandle, tempDirection);
OS.gtk_widget_set_direction (labelHandle, originalDirection);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
void setFontDescription (long /*int*/ font) {
super.setFontDescription (font);
if (labelHandle != 0) setFontDescription (labelHandle, font);
if (imageHandle != 0) setFontDescription (imageHandle, font);
// Bug 445801: Work around for computeSize not returning a different value after
// changing font, see https://bugzilla.gnome.org/show_bug.cgi?id=753116
if (OS.GTK3) {
// This updates the pango context and also clears the size request cache on the GTK side.
int originalDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.GTK_TEXT_DIR_RTL : OS.GTK_TEXT_DIR_LTR;
int tempDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.GTK_TEXT_DIR_LTR : OS.GTK_TEXT_DIR_RTL;
OS.gtk_widget_set_direction (labelHandle, tempDirection);
OS.gtk_widget_set_direction (labelHandle, originalDirection);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void setFontDescription (int /*long*/ font) {
super.setFontDescription (font);
if (labelHandle != 0) setFontDescription (labelHandle, font);
if (imageHandle != 0) setFontDescription (imageHandle, font);
// Bug 445801: Work around for computeSize not returning a different value after
// changing font, see https://bugzilla.gnome.org/show_bug.cgi?id=753116
if (OS.GTK3) {
// This updates the pango context and also clears the size request cache on the GTK side.
int originalDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.GTK_TEXT_DIR_RTL : OS.GTK_TEXT_DIR_LTR;
int tempDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.GTK_TEXT_DIR_LTR : OS.GTK_TEXT_DIR_RTL;
OS.gtk_widget_set_direction (labelHandle, tempDirection);
OS.gtk_widget_set_direction (labelHandle, originalDirection);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
setFontDescription(defaultFont ().handle);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
setFontDescription(defaultFont ().handle);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
setFontDescription(defaultFont ().handle);
内容来源于网络,如有侵权,请联系作者删除!