org.eclipse.swt.widgets.Text.getTabWidth()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中org.eclipse.swt.widgets.Text.getTabWidth()方法的一些代码示例,展示了Text.getTabWidth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.getTabWidth()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Text
类名称:Text
方法名:getTabWidth

Text.getTabWidth介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

void setTabStops (int tabs) {
  /*
  * Feature in Windows.  Windows expects the tab spacing in
  * dialog units so we must convert from space widths.  Due
  * to round off error, the tab spacing may not be the exact
  * number of space widths, depending on the font.
  */
  int width = (getTabWidth (tabs) * 4) / OS.LOWORD (OS.GetDialogBaseUnits ());
  OS.SendMessage (handle, OS.EM_SETTABSTOPS, 1, new int [] {width});
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void setTabStops (int tabs) {
  if ((style & SWT.SINGLE) != 0) return;
  int tabWidth = getTabWidth (tabs);
  int /*long*/ tabArray = OS.pango_tab_array_new (1, false);
  OS.pango_tab_array_set_tab (tabArray, 0, OS.PANGO_TAB_LEFT, tabWidth);
  OS.gtk_text_view_set_tabs (handle, tabArray);
  OS.pango_tab_array_free (tabArray);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void setTabStops (int tabs) {
  if ((style & SWT.SINGLE) != 0) return;
  int tabWidth = getTabWidth (tabs);
  long /*int*/ tabArray = OS.pango_tab_array_new (1, false);
  OS.pango_tab_array_set_tab (tabArray, 0, OS.PANGO_TAB_LEFT, tabWidth);
  OS.gtk_text_view_set_tabs (handle, tabArray);
  OS.pango_tab_array_free (tabArray);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void setTabStops (int tabs) {
  if ((style & SWT.SINGLE) != 0) return;
  int tabWidth = getTabWidth (tabs);
  int /*long*/ tabArray = OS.pango_tab_array_new (1, false);
  OS.pango_tab_array_set_tab (tabArray, 0, OS.PANGO_TAB_LEFT, tabWidth);
  OS.gtk_text_view_set_tabs (handle, tabArray);
  OS.pango_tab_array_free (tabArray);
}

相关文章

微信公众号

最新文章

更多

Text类方法