本文整理了Java中org.eclipse.swt.widgets.TableColumn.setWidth()
方法的一些代码示例,展示了TableColumn.setWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableColumn.setWidth()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.TableColumn
类名称:TableColumn
方法名:setWidth
[英]Sets the width of the receiver.
[中]设置接收器的宽度。
代码示例来源:origin: pentaho/pentaho-kettle
protected void applyWeigths( Table table ) {
if ( resizing ) {
return;
}
float width = getTableWidth( table );
TableColumn[] columns = table.getColumns();
int f = 0;
for ( int w : weights ) {
f += w;
}
int len = Math.min( weights.length, columns.length );
resizing = true;
for ( int i = 0; i < len; i++ ) {
int cw = weights[ i ] == 0 ? 0 : Math.round( width / f * weights[ i ] );
width -= cw + 1;
columns[ i ].setWidth( cw );
f -= weights[ i ];
}
resizing = false;
}
代码示例来源:origin: pentaho/pentaho-kettle
fieldsTable.getTable().addListener( SWT.Resize, event -> {
Table table = (Table) event.widget;
table.getColumn( 1 ).setWidth( 147 );
table.getColumn( 2 ).setWidth( 147 );
table.getColumn( 3 ).setWidth( 147 );
} );
if ( column.getWidth() > 0 ) {
column.setWidth( 120 );
代码示例来源:origin: pentaho/pentaho-kettle
fieldsTable.getTable().addListener( SWT.Resize, event -> {
Table table = (Table) event.widget;
table.getColumn( 1 ).setWidth( 147 );
table.getColumn( 2 ).setWidth( 147 );
table.getColumn( 3 ).setWidth( 147 );
} );
if ( column.getWidth() > 0 ) {
column.setWidth( 120 );
代码示例来源:origin: caoxinyu/RedisClient
tblclmnNewColumn.setWidth(200);
代码示例来源:origin: pentaho/pentaho-kettle
sslTable.getTable().addListener( SWT.Resize, event -> {
Table table = (Table) event.widget;
table.getColumn( 1 ).setWidth( 200 );
table.getColumn( 2 ).setWidth( 200 );
} );
if ( column.getWidth() > 0 ) {
column.setWidth( 200 );
代码示例来源:origin: pentaho/pentaho-kettle
propertiesTable.getTable().addListener( SWT.Resize, event -> {
Table table = (Table) event.widget;
table.getColumn( 1 ).setWidth( 200 );
table.getColumn( 2 ).setWidth( 200 );
} );
if ( column.getWidth() > 0 ) {
column.setWidth( 200 );
代码示例来源:origin: pentaho/pentaho-kettle
propertiesTable.getTable().addListener( SWT.Resize, event -> {
Table table = (Table) event.widget;
table.getColumn( 1 ).setWidth( 215 );
table.getColumn( 2 ).setWidth( 215 );
} );
if ( column.getWidth() > 0 ) {
column.setWidth( 120 );
代码示例来源:origin: caoxinyu/RedisClient
tblclmnNewColumn.setWidth(88);
tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.SCORE));
tblclmnMember.setWidth(164);
tblclmnMember.setText(RedisClient.i18nFile.getText(I18nFile.MEMBER));
代码示例来源:origin: caoxinyu/RedisClient
protected void initData(Composite composite) {
Table table = new Table(composite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);
table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 5));
table.setHeaderVisible(true);
table.setLinesVisible(true);
EditListener listener = new EditListener(table, false);
table.addListener(SWT.MouseDown, listener);
tblclmnNewColumn = new TableColumn(table, SWT.NONE);
tblclmnNewColumn.setWidth(132);
tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.FIELD));
tblclmnMember = new TableColumn(table, SWT.NONE);
tblclmnMember.setWidth(236);
tblclmnMember.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
String[] data = result.getResult().split("\n");
for(int i = 0 ; i < data.length/2; i ++){
TableItem item = new TableItem(table, SWT.NONE);
String[] values = new String[]{data[i*2], data[i*2+1]};
item.setText(values);
}
}
代码示例来源:origin: caoxinyu/RedisClient
clmnKey.setWidth(250);
clmnValue.setWidth(442);
clmnValue.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
代码示例来源:origin: caoxinyu/RedisClient
@Override
protected void initData(Composite composite) {
Table table = new Table(composite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI | SWT.VIRTUAL);
table.setHeaderVisible(true);
table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 5));
table.setLinesVisible(true);
EditListener listener = new EditListener(table, false);
table.addListener(SWT.MouseDown, listener);
tblclmnNewColumn = new TableColumn(table, SWT.NONE);
tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
tblclmnNewColumn.setWidth(200);
String[] data = result.getResult().split("\n");
for(int i = 0 ; i < data.length; i ++){
TableItem item = new TableItem(table, SWT.NONE);
item.setText(data[i]);
}
}
代码示例来源:origin: pentaho/pentaho-kettle
topicsTable.getTable().addListener( SWT.Resize, event -> {
Table table = (Table) event.widget;
table.getColumn( 1 ).setWidth( 330 );
} );
if ( column.getWidth() > 0 ) {
column.setWidth( 120 );
代码示例来源:origin: pentaho/pentaho-kettle
optionsTable.getTable().addListener( SWT.Resize, event -> {
Table table = (Table) event.widget;
table.getColumn( 1 ).setWidth( 215 );
table.getColumn( 2 ).setWidth( 215 );
} );
if ( column.getWidth() > 0 ) {
column.setWidth( 120 );
代码示例来源:origin: pentaho/pentaho-kettle
wPackages.setRowNums();
wPackages.optWidth( true );
wPackages.getTable().getColumn( 1 ).setWidth( 100 );
代码示例来源:origin: pentaho/pentaho-kettle
optionsTable.getTable().addListener( SWT.Resize, event -> {
Table table = (Table) event.widget;
table.getColumn( 1 ).setWidth( 215 );
table.getColumn( 2 ).setWidth( 215 );
} );
if ( column.getWidth() > 0 ) {
column.setWidth( 120 );
代码示例来源:origin: pentaho/pentaho-kettle
wSteps.table.getColumn( 0 ).setWidth( maxIconSize + 10 );
wSteps.table.getColumn( 0 ).setAlignment( SWT.CENTER );
代码示例来源:origin: pentaho/pentaho-kettle
myTb.optWidth( true );
if ( flag ) {
myTb.table.getColumn( 3 ).setWidth( 0 );
System.out.println( myTb.table.getColumn( 3 ).getWidth() );
代码示例来源:origin: pentaho/pentaho-kettle
wFieldsTab.getControl().setEnabled( true );
wCustomTab.getControl().setEnabled( false );
wFieldsTb.table.getColumn( 3 ).setWidth( 80 );
wFieldsTab.getControl().setEnabled( true );
wCustomTab.getControl().setEnabled( false );
wFieldsTb.table.getColumn( 3 ).setWidth( 0 );
wCustomTab.getControl().setEnabled( false );
wFieldsTb.table.getColumn( 3 ).setWidth( 80 );
wFieldsTab.getControl().setEnabled( true );
wCustomTab.getControl().setEnabled( true );
wFieldsTb.table.getColumn( 3 ).setWidth( 80 );
代码示例来源:origin: pentaho/pentaho-kettle
strmax *= 1.4;
tablecolumn[colnr].setWidth( strmax + 30 );
代码示例来源:origin: pentaho/pentaho-kettle
if ( input.getOperation() != null
&& "INSERT".equalsIgnoreCase( wOperation.getItem( wOperation.getSelectionIndex() ) ) ) {
wFieldsTb.table.getColumn( 3 ).setWidth( 0 );
} else {
wFieldsTb.table.getColumn( 3 ).setWidth( fieldWidth );
内容来源于网络,如有侵权,请联系作者删除!