jface table column tiptext
程序员文章站
2022-06-01 22:13:17
...
TableViewer v = new TableViewer(shell, SWT.FULL_SELECTION);
v.getTable().setLinesVisible(true);
v.getTable().setHeaderVisible(true);
v.setContentProvider(new MyContentProvider());
ColumnViewerToolTipSupport.enableFor(v,ToolTip.NO_RECREATE);
CellLabelProvider labelProvider = new CellLabelProvider() {
public String getToolTipText(Object element) {
return "Tooltip (" + element + ")";
}
public Point getToolTipShift(Object object) {
return new Point(5, 5);
}
public int getToolTipDisplayDelayTime(Object object) {
return 200;
}
public int getToolTipTimeDisplayed(Object object) {
return 5000;
}
public void update(ViewerCell cell) {
cell.setText(cell.getElement().toString());
}
};
TableViewerColumn column = new TableViewerColumn(v, SWT.NONE);
column.setLabelProvider(labelProvider);
column.getColumn().setText("Column 1");
column.getColumn().setWidth(100);
上一篇: php的json_encode疑问
下一篇: 翻译PHP设计模式介绍完毕(电子版发布)
推荐阅读
-
mysql切换数据库提示警告:Reading table information for completion of table and column names
-
Mysql中use表警告:Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
-
Flutter学习笔记(23)--多个子元素的布局Widget(Rwo、Column、Stack、IndexedStack、Table、Wrap)
-
layui-table-column-select(layui数据表格可搜索下拉框select)
-
Element el-table-column组件列宽度设置百分比无效
-
A table must have at least 1 column
-
当你用element-ui遇到需要在el-table-column上v-for时,这篇文章你能用的上,也就是你需要二级循环
-
mybatis自动生成@Table、@Column、@Id注解的方法
-
关于->"DataTables warning: table id=vmtable - Requested unknown parameter 'iP' for row 2, column 2"错误解
-
mysql切换数据库提示警告:Reading table information for completion of table and column names