本文整理匯總了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);
}
}
}
}