本文整理了Java中org.eclipse.swt.widgets.Table.clear()
方法的一些代码示例,展示了Table.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.clear()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:clear
[英]Clears the item at the given zero-relative index in the receiver. The text, icon and other attributes of the item are set to the default value. If the table was created with the SWT.VIRTUAL
style, these attributes are requested again as needed.
[中]
代码示例来源:origin: caoxinyu/RedisClient
@Override
public void widgetSelected(SelectionEvent e) {
InputDialog dialog = new InputDialog(shell.getParent().getShell(), RedisClient.i18nFile.getText(I18nFile.APPENDTAIL), RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), "", null);
if(dialog.open() == InputDialog.OK){
String value = dialog.getValue();
service.addTail(id, db, key, value);
pageListener.setCount();
table.clear(table.getItemCount()-1);
table.setSelection(table.getItemCount()-1);
table.setSelection(-1);
currentData.setItem(null);
status = Status.Normal;
statusChanged();
}
}
});
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
} else {
for (int i=start; i<=end; i++) {
clear (i);
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
@Override
protected void clearChild(Widget parent, int childIndex) {
if (parent instanceof Table) {
fTable.clear(childIndex);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
@Override
protected void doClear(int index) {
table.clear(index);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
@Override
protected void doClear(int index) {
table.clear(index);
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
protected void doClear(int index) {
table.clear(index);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
@Override
protected void clear(Widget item) {
if (item instanceof TableItem) {
int i = fTable.indexOf((TableItem)item);
if (i >= 0) {
fTable.clear(i);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.ajdt.ui
public void run() {
fExpectedItemCount+= types.length;
fSearchMatches= types;
int length= fHistoryMatches.length + fSearchMatches.length;
int dash= (fHistoryMatches.length > 0 && fSearchMatches.length > 0) ? 1 : 0;
fTable.setItemCount(length + dash);
if (length == 0) {
// bug under windows.
fTable.redraw();
return;
}
if (fHistoryMatches.length == 0) {
fTable.clear(0, length + dash - 1);
} else {
fTable.clear(fHistoryMatches.length - 1, length + dash - 1);
}
}
});
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
public void run() {
fExpectedItemCount+= types.length;
fSearchMatches= types;
int length= fHistoryMatches.length + fSearchMatches.length;
int dash= (fHistoryMatches.length > 0 && fSearchMatches.length > 0) ? 1 : 0;
fTable.setItemCount(length + dash);
if (length == 0) {
// bug under windows.
fTable.redraw();
return;
}
if (fHistoryMatches.length == 0) {
fTable.clear(0, length + dash - 1);
} else {
fTable.clear(fHistoryMatches.length - 1, length + dash - 1);
}
}
});
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
public void run() {
fExpectedItemCount= types.length;
int lastHistoryLength= fHistoryMatches.length;
fHistoryMatches= types;
int length= fHistoryMatches.length + fSearchMatches.length;
int dash= (fHistoryMatches.length > 0 && fSearchMatches.length > 0) ? 1 : 0;
fTable.setItemCount(length + dash);
if (length == 0) {
// bug under windows.
fTable.redraw();
return;
}
int update= Math.max(lastHistoryLength, fHistoryMatches.length);
if (update > 0) {
fTable.clear(0, update + dash - 1);
}
}
});
代码示例来源:origin: org.eclipse/org.eclipse.ajdt.ui
public void run() {
fExpectedItemCount= types.length;
int lastHistoryLength= fHistoryMatches.length;
fHistoryMatches= types;
int length= fHistoryMatches.length + fSearchMatches.length;
int dash= (fHistoryMatches.length > 0 && fSearchMatches.length > 0) ? 1 : 0;
fTable.setItemCount(length + dash);
if (length == 0) {
// bug under windows.
fTable.redraw();
return;
}
int update= Math.max(lastHistoryLength, fHistoryMatches.length);
if (update > 0) {
fTable.clear(0, update + dash - 1);
}
}
});
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
clear (indices [i]);
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
if (index < items.length) {
item = items[index];
table.clear(index);
} else {
item = new TableItem(table, SWT.NONE);
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.databinding
@Override
public void run() {
if (table != null && !table.isDisposed() && item != null
&& !item.isDisposed()) {
if (table.isVisible()) {
int tableHeight = table.getClientArea().height;
int numVisibleItems = tableHeight / table.getItemHeight();
int indexOfItem = table.indexOf(item);
int topIndex = table.getTopIndex();
if (indexOfItem >= topIndex
&& indexOfItem <= topIndex + numVisibleItems) {
updateIfNecessary(indexOfItem);
return;
}
}
table.clear(table.indexOf(item));
}
}
内容来源于网络,如有侵权,请联系作者删除!