本文整理汇总了Java中org.eclipse.swt.widgets.Table.setRedraw方法的典型用法代码示例。如果您正苦于以下问题:Java Table.setRedraw方法的具体用法?Java Table.setRedraw怎么用?Java Table.setRedraw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.Table
的用法示例。
在下文中一共展示了Table.setRedraw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: redrawTables
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
private void redrawTables() {
Table sourceTable = sourceTableViewer.getTable();
sourceTable.setRedraw(false);
clean(sourceTable);
source.sort(Plugin::compareTo);
sourceTableViewer.setInput(source);
btnSelectAll.setEnabled(source.size() > 0);
sourceTable.setRedraw(true);
checkSelection(sourceTable);
Table targetTable = targetTableViewer.getTable();
targetTable.setRedraw(false);
clean(targetTable);
target.sort(Plugin::compareTo);
targetTableViewer.setInput(target);
btnDeselectAll.setEnabled(target.size() > 0);
targetTable.setRedraw(true);
checkSelection(targetTable);
if (getButton(IDialogConstants.OK_ID) != null) {
getButton(IDialogConstants.OK_ID).setEnabled(! targetOriginal.equals(target));
}
}
示例2: removeItems
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
private void removeItems(TableItem[] items) {
Table table = getTable();
table.setRedraw(false);
try {
for (TableItem item : items) {
Control schemeTableEditorControl = _SchemeTableEditor.getEditor();
if (schemeTableEditorControl != null) {
schemeTableEditorControl.dispose();
}
_SchemeTableEditor.setEditor(null, item, 0);
Control idTableEditorControl = _IdTableEditor.getEditor();
if (idTableEditorControl != null) {
idTableEditorControl.dispose();
}
_IdTableEditor.setEditor(null, item, 1);
for (int perm : PERMS) {
TableEditor tableEditor = getItemPermTableEditor(item, perm);
Button checkBox = (Button) tableEditor.getEditor();
tableEditor.dispose();
checkBox.dispose();
}
item.dispose();
}
}
finally {
table.setRedraw(true);
}
}
示例3: initFromModelInternal
import org.eclipse.swt.widgets.Table; //导入方法依赖的package包/类
protected final void initFromModelInternal() {
Table table = getTable();
if (table == null || getModel().isDestroyed()) {
return;
}
table.setRedraw(false);
try {
initTableItemsFromZnode();
setDirtyInternal(false);
}
finally {
table.setRedraw(true);
}
table.pack();
forceLayout();
TableColumn[] columns = getTable().getColumns();
int[] columnWidths = getTableColumnWidths();
for (int i = 0; i < columns.length; i++) {
if (columnWidths == null) {
columns[i].pack();
}
else {
int columnWidth = columnWidths[i];
if (columnWidth == SWT.DEFAULT) {
columns[i].pack();
}
else {
columns[i].setWidth(columnWidth);
}
}
}
}