本文整理了Java中org.eclipse.swt.widgets.TableColumn.setData()
方法的一些代码示例,展示了TableColumn.setData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableColumn.setData()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.TableColumn
类名称:TableColumn
方法名:setData
暂无
代码示例来源:origin: stackoverflow.com
int index = 0;
TableColumn column1 = new TableColumn(table, SWT.NONE);
column1.setText("Column 1 header");
column1.setData(index);
index++;
TableColumn column2 = new TableColumn(table, SWT.NONE);
column2.setText("Column 2 header");
column2.setData(index);
index++;
代码示例来源:origin: org.codehaus.openxma/xmartclient
/**
* Attaches the given UIDelegate to the given Control.
* Used for integration of dynamically created widget models.
* @since 2.1.0
*/
private void attach(UIDelegateClient delegate,Control control,Label label) {
control.setData(delegate);
delegate.attachUI(control,label);
if(control instanceof Table) {
TableColumn[] cols = ((Table)control).getColumns();
for(int i=0;i<cols.length;i++) {
cols[i].setData(delegate);
}
}
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-tokenization-ui
tblclmnEditor.setData("name", "tblclmnEditor");
tblclmnEditor.setWidth(100);
tblclmnEditor.setText("Editor class");
tblclmnParameters.setData("name", "tblclmnParameters");
tblclmnParameters.setWidth(100);
tblclmnParameters.setText("Parameters class");
代码示例来源:origin: net.sf.okapi.steps/okapi-step-tokenization-ui
colName.setData("name", "colName");
colName.setWidth(150);
colName.setText("Name");
colDescr.setData("name", "colDescr");
colDescr.setWidth(100);
colDescr.setText("Description");
代码示例来源:origin: tvrenamer/tvrenamer
tcol.setData(col);
tcol.setText(label);
tcol.setWidth(width);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* @since 3.5
*/
@Override
protected void updateColumnData(Widget column) {
TableColumn tColumn = (TableColumn) column;
Table t = tColumn.getParent();
if (!IS_GTK || t.getColumn(t.getColumnCount() - 1) != tColumn) {
tColumn.setData(LAYOUT_DATA,
new ColumnPixelData(tColumn.getWidth()));
layout(t.getParent(), true);
}
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* @since 1.3
*/
protected void updateColumnData(Widget column) {
TableColumn tColumn = (TableColumn) column;
Table t = tColumn.getParent();
if( ! IS_GTK || t.getColumn(t.getColumnCount()-1) != tColumn ){
tColumn.setData(LAYOUT_DATA,
new ColumnPixelData(tColumn.getWidth()));
layout(t.getParent(), true);
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* @since 3.5
*/
@Override
protected void updateColumnData(Widget column) {
TableColumn tColumn = (TableColumn) column;
Table t = tColumn.getParent();
if (!IS_GTK || t.getColumn(t.getColumnCount() - 1) != tColumn) {
tColumn.setData(LAYOUT_DATA,
new ColumnPixelData(tColumn.getWidth()));
layout(t.getParent(), true);
}
}
}
代码示例来源:origin: org.xworker/xworker_swt
c.setText(column.getMetadata().getLabel());
c.setData(Ognl.parseExpression(column.getString("path")));
c.setData("pattern", new DecimalFormat(numberPattern));
c.setData("pattern", new SimpleDateFormat(datePattern));
代码示例来源:origin: net.sf.okapi.steps/okapi-step-tokenization-ui
col1.setData("name", "col1");
col1.setWidth(348);
col1.setText("Language");
col2.setData("name", "col2");
col2.setWidth(150);
col2.setText("Code Okapi");
col3.setData("name", "col3");
col3.setWidth(150);
col3.setText("Code CLDR");
代码示例来源:origin: org.eclipse.scout.sdk.s2e/org.eclipse.scout.sdk.s2e.nls
public void createTableColumnInternal(Language language) {
TableColumn c = new TableColumn(m_table, SWT.LEAD);
c.setData(LANGUAGE_COLUMN_ID, language);
if (!language.isLocal()) {
c.setToolTipText("this language is only in the parent defined!\nCreate a new language for " + language.getLocale().toString() + " to make it locally available.");
c.setImage(NlsCore.getImage(INlsIcons.WARNING));
}
c.setText(language.getDispalyName());
c.setMoveable(true);
c.addSelectionListener(new P_SortSelectionAdapter(m_table.indexOf(c)));
c.setWidth(200);
}
代码示例来源:origin: BiglySoftware/BiglyBT
columns[0].setData(new Integer(FilterComparator.FIELD_NAME));
columns[1].setData(new Integer(FilterComparator.FIELD_ONLINE));
columns[2].setData(new Integer(FilterComparator.FIELD_LAST_SEEN));
columns[3].setData(new Integer(FilterComparator.FIELD_YGM));
columns[4].setData(new Integer(FilterComparator.FIELD_LAST_MSG));
columns[5].setData(new Integer(FilterComparator.FIELD_LOC_CAT));
columns[6].setData(new Integer(FilterComparator.FIELD_REM_CAT));
columns[7].setData(new Integer(FilterComparator.FIELD_READ_CAT));
columns[8].setData(new Integer(FilterComparator.FIELD_CON));
columns[9].setData(new Integer(FilterComparator.FIELD_TRACK));
columns[10].setData(new Integer(FilterComparator.FIELD_MSG_IN));
columns[11].setData(new Integer(FilterComparator.FIELD_MSG_OUT));
columns[12].setData(new Integer(FilterComparator.FIELD_QUEUED));
columns[13].setData(new Integer(FilterComparator.FIELD_BYTES_IN));
columns[14].setData(new Integer(FilterComparator.FIELD_BYTES_OUT));
columns[15].setData(new Integer(FilterComparator.FIELD_SS));
代码示例来源:origin: BiglySoftware/BiglyBT
columns[0].setData(new Integer(FilterComparator.FIELD_NAME));
columns[1].setData(new Integer(FilterComparator.FIELD_START_IP));
columns[2].setData(new Integer(FilterComparator.FIELD_END_IP));
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
});
column.addSelectionListener(listener);
column.setData("SortListener", listener); //$NON-NLS-1$
代码示例来源:origin: BiglySoftware/BiglyBT
columns[0].setData(new Integer(PBFilterComparator.FIELD_PEER));
columns[1].setData(new Integer(PBFilterComparator.FIELD_DOWNLOADS));
代码示例来源:origin: openaudible/openaudible
column.setText(n);
column.setWidth(getColumnWidth(o));
column.setData(o);
代码示例来源:origin: org.xworker/xworker_swt
column.setData("name", attr.getString("name"));
column.setData("store", store);
int width = attr.getInt("gridWidth");
if(width <= 0){
代码示例来源:origin: org.eclipse.scout.sdk.s2e/org.eclipse.scout.sdk.s2e.nls
@SuppressWarnings("squid:S881")
private void createColumns(Table table) {
// cleare old columns
TableColumn[] cols = m_table.getColumns();
for (TableColumn col : cols) {
col.dispose();
}
// utility columns
TableColumn colRefs = new TableColumn(table, SWT.LEAD);
colRefs.setResizable(false);
colRefs.setMoveable(false);
colRefs.setWidth(45);
colRefs.setText("*");
colRefs.setToolTipText("* if the references are not sync!");
colRefs.addSelectionListener(new P_SortSelectionAdapter(0));
int i = NlsTable.INDEX_COLUMN_KEYS;
// nls java column
TableColumn jColumn = new TableColumn(table, SWT.LEAD);
jColumn.setText(Language.LANGUAGE_KEY.getDispalyName());
jColumn.setData(LANGUAGE_COLUMN_ID, Language.LANGUAGE_KEY);
jColumn.setMoveable(false);
jColumn.setWidth(200);
jColumn.addSelectionListener(new P_SortSelectionAdapter(i++));
if (m_tableModel.getProjects() != null) {
for (Language language : m_tableModel.getProjects().getAllLanguages()) {
createTableColumnInternal(language);
}
m_filterComp.columnsChanged();
}
}
内容来源于网络,如有侵权,请联系作者删除!