热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

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

本文整理了Java中org.eclipse.swt.widgets.Table.getGridLineWidth()方法的一些代码示例,展示了Table.getGridLineWidth()的具体用法

本文整理了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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
* Computes the table hight hint for table.
*
* @param table the table to compute the height for
* @param rows the number of rows to compute the height for
* @return the height hint for table
*/
private int getTableHeightHint(Table table, int rows) {
if (table.getFont().equals(JFaceResources.getDefaultFont()))
table.setFont(JFaceResources.getDialogFont());
int result= table.getItemHeight() * rows;
if (table.getLinesVisible())
result+= table.getGridLineWidth() * (rows - 1);
// TODO adjust to correct size. +4 works on windows, but not others
// return result + 4;
return result;
}

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

/**
* Computes the table hight hint for table.
*
* @param table the table to compute the height for
* @param rows the number of rows to compute the height for
* @return the height hint for table
*/
private int getTableHeightHint(Table table, int rows) {
if (table.getFont().equals(JFaceResources.getDefaultFont()))
table.setFont(JFaceResources.getDialogFont());
int result= table.getItemHeight() * rows;
if (table.getLinesVisible())
result+= table.getGridLineWidth() * (rows - 1);
// TODO adjust to correct size. +4 works on windows, but not others
// return result + 4;
return result;
}

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

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

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

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

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

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

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

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

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

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

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

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

推荐阅读
author-avatar
茶香未散尽_385_312
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有