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

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

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

Table.getGridLineWidth介绍

[英]Returns the width in pixels of a grid line.
[中]返回网格线的宽度(以像素为单位)。

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

  1. /**
  2. * Returns the number of items the table can fit in its current layout
  3. */
  4. private int computeNumberOfItems() {
  5. Rectangle rect = table.getClientArea ();
  6. int itemHeight = table.getItemHeight ();
  7. int headerHeight = table.getHeaderHeight ();
  8. return (rect.height - headerHeight + itemHeight - 1) / (itemHeight + table.getGridLineWidth());
  9. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

  1. @Override
  2. public int getVisibleItemCount() {
  3. Table table = viewer.getTable();
  4. Rectangle rect = table.getClientArea ();
  5. int itemHeight = table.getItemHeight ();
  6. int headerHeight = table.getHeaderHeight ();
  7. return (rect.height - headerHeight + itemHeight - 1) / (itemHeight + table.getGridLineWidth());
  8. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

  1. @Override
  2. public int getVisibleItemCount() {
  3. Table table = viewer.getTable();
  4. Rectangle rect = table.getClientArea ();
  5. int itemHeight = table.getItemHeight ();
  6. int headerHeight = table.getHeaderHeight ();
  7. return (rect.height - headerHeight + itemHeight - 1) / (itemHeight + table.getGridLineWidth());
  8. }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

  1. public int getVisibleItemCount() {
  2. Table table = viewer.getTable();
  3. Rectangle rect = table.getClientArea ();
  4. int itemHeight = table.getItemHeight ();
  5. int headerHeight = table.getHeaderHeight ();
  6. return (rect.height - headerHeight + itemHeight - 1) / (itemHeight + table.getGridLineWidth());
  7. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

  1. public static int getTableHeightHint(Table table, int rows) {
  2. if (table.getFont().equals(JFaceResources.getDefaultFont()))
  3. table.setFont(JFaceResources.getDialogFont());
  4. int result= table.getItemHeight() * rows + table.getHeaderHeight();
  5. if (table.getLinesVisible())
  6. result+= table.getGridLineWidth() * (rows - 1);
  7. return result;
  8. }

代码示例来源:origin: org.eclipse.xtext/ui

  1. public static int getTableHeightHint(Table table, int rows) {
  2. if (table.getFont().equals(JFaceResources.getDefaultFont()))
  3. table.setFont(JFaceResources.getDialogFont());
  4. int result = table.getItemHeight() * rows + table.getHeaderHeight();
  5. if (table.getLinesVisible())
  6. result += table.getGridLineWidth() * (rows - 1);
  7. return result;
  8. }

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

  1. public static int getTableHeightHint(Table table, int rows) {
  2. if (table.getFont().equals(JFaceResources.getDefaultFont()))
  3. table.setFont(JFaceResources.getDialogFont());
  4. int result= table.getItemHeight() * rows + table.getHeaderHeight();
  5. if (table.getLinesVisible())
  6. result+= table.getGridLineWidth() * (rows - 1);
  7. return result;
  8. }

代码示例来源:origin: org.eclipse/org.eclipse.search

  1. public static int getTableHeightHint(Table table, int rows) {
  2. if (table.getFont().equals(JFaceResources.getDefaultFont()))
  3. table.setFont(JFaceResources.getDialogFont());
  4. int result= table.getItemHeight() * rows + table.getHeaderHeight();
  5. if (table.getLinesVisible())
  6. result+= table.getGridLineWidth() * (rows - 1);
  7. return result;
  8. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.search

  1. public static int getTableHeightHint(Table table, int rows) {
  2. if (table.getFont().equals(JFaceResources.getDefaultFont()))
  3. table.setFont(JFaceResources.getDialogFont());
  4. int result= table.getItemHeight() * rows + table.getHeaderHeight();
  5. if (table.getLinesVisible())
  6. result+= table.getGridLineWidth() * (rows - 1);
  7. return result;
  8. }

代码示例来源:origin: oyse/yedit

  1. public static int getTableHeightHint(Table table, int rows) {
  2. if (table.getFont().equals(JFaceResources.getDefaultFont()))
  3. table.setFont(JFaceResources.getDialogFont());
  4. int result= table.getItemHeight() * rows + table.getHeaderHeight();
  5. if (table.getLinesVisible())
  6. result+= table.getGridLineWidth() * (rows - 1);
  7. return result;
  8. }

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

  1. public static int getTableHeightHint(Table table, int rows) {
  2. if (table.getFont().equals(JFaceResources.getDefaultFont()))
  3. table.setFont(JFaceResources.getDialogFont());
  4. int result= table.getItemHeight() * rows + table.getHeaderHeight();
  5. if (table.getLinesVisible())
  6. result+= table.getGridLineWidth() * (rows - 1);
  7. return result;
  8. }

代码示例来源:origin: org.eclipse/org.eclipse.datatools.sqltools.common.ui

  1. public static int getTableHeightHint(Table table, int rows)
  2. {
  3. if (table.getFont().equals(JFaceResources.getDefaultFont()))
  4. {
  5. table.setFont(JFaceResources.getDialogFont());
  6. }
  7. int result = table.getItemHeight() * rows + table.getHeaderHeight();
  8. if (table.getLinesVisible())
  9. {
  10. result += table.getGridLineWidth() * (rows - 1);
  11. }
  12. return result;
  13. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

  1. /**
  2. * Computes the table hight hint for <code>table</code>.
  3. *
  4. * @param table the table to compute the height for
  5. * @param rows the number of rows to compute the height for
  6. * @return the height hint for <code>table</code>
  7. */
  8. private int getTableHeightHint(Table table, int rows) {
  9. if (table.getFont().equals(JFaceResources.getDefaultFont()))
  10. table.setFont(JFaceResources.getDialogFont());
  11. int result= table.getItemHeight() * rows;
  12. if (table.getLinesVisible())
  13. result+= table.getGridLineWidth() * (rows - 1);
  14. // TODO adjust to correct size. +4 works on windows, but not others
  15. // return result + 4;
  16. return result;
  17. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

  1. /**
  2. * Computes the table hight hint for <code>table</code>.
  3. *
  4. * @param table the table to compute the height for
  5. * @param rows the number of rows to compute the height for
  6. * @return the height hint for <code>table</code>
  7. */
  8. private int getTableHeightHint(Table table, int rows) {
  9. if (table.getFont().equals(JFaceResources.getDefaultFont()))
  10. table.setFont(JFaceResources.getDialogFont());
  11. int result= table.getItemHeight() * rows;
  12. if (table.getLinesVisible())
  13. result+= table.getGridLineWidth() * (rows - 1);
  14. // TODO adjust to correct size. +4 works on windows, but not others
  15. // return result + 4;
  16. return result;
  17. }

代码示例来源:origin: stackoverflow.com

  1. Rectangle area = table.getClientArea();
  2. int totalAreaWdith = area.width;
  3. int lineWidth = table.getGridLineWidth();
  4. int totalGridLineWidth = (columnCount-1)*lineWidth;
  5. int totalColumnWidth = 0;

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. void tableMouseDown(Event event) {
  2. if (isDisposed() || !isVisible()) return;
  3. Point pt = new Point(event.x, event.y);
  4. int lineWidth = table.getLinesVisible() ? table.getGridLineWidth() : 0;
  5. TableItem item = table.getItem(pt);
  6. if ((table.getStyle() & SWT.FULL_SELECTION) != 0) {

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

  1. void tableMouseDown(Event event) {
  2. if (isDisposed() || !isVisible()) return;
  3. Point pt = new Point(event.x, event.y);
  4. int lineWidth = table.getLinesVisible() ? table.getGridLineWidth() : 0;
  5. TableItem item = table.getItem(pt);
  6. if ((table.getStyle() & SWT.FULL_SELECTION) != 0) {

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

  1. void tableMouseDown(Event event) {
  2. if (isDisposed() || !isVisible()) return;
  3. Point pt = new Point(event.x, event.y);
  4. int lineWidth = table.getLinesVisible() ? table.getGridLineWidth() : 0;
  5. TableItem item = table.getItem(pt);
  6. if ((table.getStyle() & SWT.FULL_SELECTION) != 0) {

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

  1. void tableMouseDown(Event event) {
  2. if (isDisposed() || !isVisible()) return;
  3. Point pt = new Point(event.x, event.y);
  4. int lineWidth = table.getLinesVisible() ? table.getGridLineWidth() : 0;
  5. TableItem item = table.getItem(pt);
  6. if ((table.getStyle() & SWT.FULL_SELECTION) != 0) {

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

  1. void tableMouseDown(Event event) {
  2. if (isDisposed() || !isVisible()) return;
  3. Point pt = new Point(event.x, event.y);
  4. int lineWidth = table.getLinesVisible() ? table.getGridLineWidth() : 0;
  5. TableItem item = table.getItem(pt);
  6. if ((table.getStyle() & SWT.FULL_SELECTION) != 0) {

相关文章

Table类方法