本文整理了Java中org.eclipse.swt.widgets.Table.setData()
方法的一些代码示例,展示了Table.setData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setData()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:setData
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
/**
* Updates the table's contents
*/
private void workerExecute() {
File[] dirList;
// Clear existing information
display.syncExec(() -> {
tableContentsOfLabel.setText(FileViewer.getResourceString("details.ContentsOf.text",
new Object[] { workerStateDir.getPath() }));
table.removeAll();
table.setData(TABLEDATA_DIR, workerStateDir);
});
dirList = getDirectoryList(workerStateDir);
for (int i = 0; (! workerCancelled) && (i < dirList.length); i++) {
workerAddFileDetails(dirList[i]);
}
}
代码示例来源:origin: org.xworker/xworker_swt
public static void attachToTable(ActionContext actionContext){
Thing self = (Thing) actionContext.get("self");
Object object = actionContext.get("object");
//添加一个表格数据仓库监听
Table table = (Table) object;
Thing listener = new Thing("xworker.app.view.swt.data.events.TableDataStoreListener");
listener.put("table", object);
//先调用监听初始化
listener.doAction("onReconfig", actionContext, UtilMap.toMap("store", self));
//加入到监听器中
self.doAction("addListenerToFirst", actionContext, UtilMap.toMap("listener", listener));
//把监听和自身添加到table中以备后用
table.setData("storeListener", listener);
table.setData("store", self);
DataStoreDisposeListener.attach(table);
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-tokenization-ui
gridData.widthHint = 600;
table.setLayoutData(gridData);
table.setData("name", "table");
table.setHeaderVisible(true);
table.setLinesVisible(true);
代码示例来源:origin: net.sf.okapi.steps/okapi-step-tokenization-ui
gridData.heightHint = 400;
table.setLayoutData(gridData);
table.setData("name", "table");
table.setHeaderVisible(true);
table.setLinesVisible(true);
代码示例来源:origin: openaudible/openaudible
table.setData(this);
table.setFont(FontShop.instance.tableFont());
代码示例来源:origin: org.xworker/xworker_swt
dateTable.setData(date);
dateTable.setData("itemMonths", itemMonths);
代码示例来源:origin: org.xworker/xworker_swt
public static Object create(ActionContext actionContext){
Thing self = (Thing) actionContext.get("self");
//创建editor
Table parent = (Table) actionContext.get("table");
TableEditor tableEditor = new TableEditor(parent);
self.doAction("init", actionContext, UtilMap.toParams(new Object[]{"editor", tableEditor}));
parent.setData("_tableEditor", tableEditor);
actionContext.getScope(0).put(self.getString("name"), tableEditor);
return tableEditor;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.m2e.core.ui
table.setData("name", "archetypesTable"); //$NON-NLS-1$ //$NON-NLS-2$
table.setHeaderVisible(true);
代码示例来源:origin: openaudible/openaudible
public void init(int attributes) {
if (table != null)
throw new InvalidParameterException("init already called on table!");
attributes |= SWT.VIRTUAL;
isVirtual = (attributes & SWT.VIRTUAL) != 0;
table = new Table(parent, attributes);
table.setHeaderVisible(true);
if (oddEvenColors)
enableBasicOddEvenColors();
changeTableLayout(numColumns);
table.setData(this);
if (sortMenu != null)
table.setMenu(sortMenu);
table.setFont(FontShop.instance.tableFont());
initCallbacks();
addKeyBoardListener();
addSelectionListener(this);
}
代码示例来源:origin: org.xworker/xworker_swt
.getThing("xworker.swt.xworker.attributeEditor.DataTableEditor/@actions1");
ActionContainer actionContainer = actionThing.doAction("create", context);
table.setData(AttributeEditor.ACTIONCONTAINER, actionContainer);
return table;
代码示例来源:origin: inspectIT/inspectIT
tableViewer.getTable().setData(sensorClass);
tableViewers.add(tableViewer);
代码示例来源:origin: net.sf.okapi.steps/okapi-step-tokenization-ui
gridData.heightHint = 400;
table.setLayoutData(gridData);
table.setData("name", "table");
table.setHeaderVisible(true);
table.setLinesVisible(true);
代码示例来源:origin: org.codehaus.openxma/xmartclient
certificateTableW.setData("WIDGET_ID", "certificateTableW");
TableColumn certificateTable_txtkey = new TableColumn(certificateTableW, SWT.LEFT);
certificateTable_txtkey.setText(getGenPageMessages().getString(
代码示例来源:origin: org.codehaus.openxma/xmartserver
certificateTableW.setData("WIDGET_ID", "certificateTableW");
TableColumn certificateTable_txtkey = new TableColumn(certificateTableW, SWT.LEFT);
certificateTable_txtkey.setText(getGenPageMessages().getString(
代码示例来源:origin: org.eclipse.egit/ui
private void createFilesArea(Composite parent, FormToolkit toolkit, int span) {
diffSection = createSection(parent, toolkit, span);
diffSection.setText(UIText.CommitEditorPage_SectionFilesEmpty);
Composite filesArea = createSectionClient(diffSection, toolkit);
diffViewer = new CommitFileDiffViewer(filesArea, getSite(), SWT.MULTI
| SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION
| toolkit.getBorderStyle());
diffViewer.getTable().setData(FormToolkit.KEY_DRAW_BORDER,
FormToolkit.TREE_BORDER);
GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 80)
.applyTo(diffViewer.getControl());
diffViewer.setContentProvider(ArrayContentProvider.getInstance());
diffViewer.setTreeWalk(getCommit().getRepository(), null);
updateSectionClient(diffSection, filesArea, toolkit);
}
代码示例来源:origin: org.xworker/xworker_swt
@SuppressWarnings("unchecked")
public void run(){
try{
table.setData("_store", store);
table.setData("_columns", columns);
代码示例来源:origin: org.eclipse.egit/ui
private void createBranchesArea(Composite parent, FormToolkit toolkit,
int span) {
branchSection = createSection(parent, toolkit, span);
branchSection.setText(UIText.CommitEditorPage_SectionBranchesEmpty);
Composite branchesArea = createSectionClient(branchSection, toolkit);
branchViewer = new TableViewer(toolkit.createTable(branchesArea,
SWT.V_SCROLL | SWT.H_SCROLL));
GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 50)
.applyTo(branchViewer.getControl());
branchViewer.setSorter(new ViewerSorter());
branchViewer.setLabelProvider(new GitLabelProvider() {
public String getText(Object element) {
return Repository.shortenRefName(super.getText(element));
}
});
branchViewer.setContentProvider(ArrayContentProvider.getInstance());
branchViewer.getTable().setData(FormToolkit.KEY_DRAW_BORDER,
FormToolkit.TREE_BORDER);
updateSectionClient(branchSection, branchesArea, toolkit);
}
代码示例来源:origin: org.eclipse.egit/ui
refsViewer = new TableViewer(refsTable);
refsViewer.setSorter(new ViewerSorter());
refsTable.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TREE_BORDER);
GridDataFactory.fillDefaults().grab(true, true).applyTo(refsTable);
refsViewer.setContentProvider(ArrayContentProvider.getInstance());
代码示例来源:origin: org.xworker/xworker_swt
parent.setData("tableCursor", cursor);
parent.setData("tableCursorListener", tableListener);
代码示例来源:origin: org.eclipse.egit/ui
GridDataFactory.fillDefaults().grab(true, true)
.applyTo(unstagedTableViewer.getControl());
unstagedTableViewer.getTable().setData(FormToolkit.KEY_DRAW_BORDER,
FormToolkit.TREE_BORDER);
unstagedTableViewer.getTable().setLinesVisible(true);
GridDataFactory.fillDefaults().grab(true, true)
.applyTo(stagedTableViewer.getControl());
stagedTableViewer.getTable().setData(FormToolkit.KEY_DRAW_BORDER,
FormToolkit.TREE_BORDER);
stagedTableViewer.getTable().setLinesVisible(true);
内容来源于网络,如有侵权,请联系作者删除!