本文整理了Java中org.eclipse.swt.widgets.TableColumn.setAlignment()
方法的一些代码示例,展示了TableColumn.setAlignment()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableColumn.setAlignment()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.TableColumn
类名称:TableColumn
方法名:setAlignment
[英]Controls how text and images will be displayed in the receiver. The argument should be one of LEFT
, RIGHT
or CENTER
.
Note that due to a restriction on some platforms, the first column is always left aligned.
[中]控制文本和图像在接收器中的显示方式。参数应该是LEFT
、RIGHT
或CENTER
中的一个。
请注意,由于某些平台的限制,第一列始终左对齐。
代码示例来源:origin: pentaho/pentaho-kettle
wSteps.optWidth( false );
wSteps.table.getColumn( 0 ).setWidth( maxIconSize + 10 );
wSteps.table.getColumn( 0 ).setAlignment( SWT.CENTER );
代码示例来源:origin: pentaho/pentaho-kettle
tablecolumn[0].setText( "#" );
tablecolumn[0].setWidth( addIndexColumn ? 25 : 0 );
tablecolumn[0].setAlignment( SWT.RIGHT );
tablecolumn[i + 1].setAlignment( SWT.RIGHT );
代码示例来源:origin: org.eclipse/org.eclipse.jst.ws.consumption.ui
TableColumn tableColumn = new TableColumn(handlersTable_, SWT.LEFT);
tableColumn.setText(columns_[i]);
tableColumn.setAlignment(SWT.LEFT);
tableColumn.setWidth(DEFAULT_COLUMN_WIDTH);
tableColumn.setResizable(true);
代码示例来源:origin: org.eclipse/org.eclipse.jst.ws.consumption.ui
TableColumn tableColumn = new TableColumn(handlersTable_, i);
tableColumn.setText(columns_[i]);
tableColumn.setAlignment(SWT.LEFT);
tableColumn.setWidth(DEFAULT_COLUMN_WIDTH);
tableColumn.setResizable(true);
代码示例来源:origin: alblue/com.packtpub.e4
public TableViewerColumn addColumnTo(TableViewer viewer) {
TableViewerColumn tableViewerColumn = new TableViewerColumn(viewer, SWT.NONE);
TableColumn column = tableViewerColumn.getColumn();
column.setMoveable(true);
column.setResizable(true);
column.setText(getTitle());
column.setWidth(getWidth());
column.setAlignment(getAlignment());
tableViewerColumn.setLabelProvider(this);
return tableViewerColumn;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor
column4.setAlignment(SWT.CENTER);
column4.setText(TemplatesMessages.TemplatePreferencePage_column_autoinsert);
minWidth= computeMinimumColumnWidth(gc, TemplatesMessages.TemplatePreferencePage_column_autoinsert);
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor
column4.setAlignment(SWT.CENTER);
column4.setText(TemplatesMessages.TemplatePreferencePage_column_autoinsert);
minWidth= computeMinimumColumnWidth(gc, TemplatesMessages.TemplatePreferencePage_column_autoinsert);
代码示例来源:origin: org.eclipse/org.eclipse.ui.workbench.texteditor
column4.setAlignment(SWT.CENTER);
column4.setText(TextEditorTemplateMessages.TemplatePreferencePage_column_autoinsert);
minWidth= computeMinimumColumnWidth(gc, TextEditorTemplateMessages.TemplatePreferencePage_column_autoinsert);
代码示例来源:origin: org.eclipse/org.eclipse.wst.xml.ui
public TaskListTableViewer(Composite parent, int style, int visibleRows) {
super(new Table(parent, style));
getTable().setLinesVisible(true);
Provider provider = new Provider();
setContentProvider(provider);
setLabelProvider(provider);
String[] columnPropertiesArray = {LABEL_ICON, LABEL_DESCRIPTION, LABEL_LOCATION};
setColumnProperties(columnPropertiesArray);
Table table = getTable();
table.setHeaderVisible(true);
table.setLayoutData(new GridData(GridData.FILL_BOTH));
TableLayout layout = new TableLayout();
for (int i = 0; i < columnPropertiesArray.length; i++) {
TableColumn column = new TableColumn(table, i);
column.setText(columnPropertiesArray[i]);
column.setAlignment(SWT.LEFT);
layout.addColumnData(new ColumnWeightData(getColumnWidth(i), true));
}
table.setLayout(layout);
this.visibleRows = visibleRows;
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xml.ui
column.setText(columnPropertiesArray[i]);
column.setAlignment(SWT.LEFT);
layout.addColumnData(new ColumnWeightData(getColumnWidth(i), true));
代码示例来源:origin: org.eclipse/org.eclipse.wst.xml.ui
TableColumn column = new TableColumn(table, i);
column.setText(titleArray[i]);
column.setAlignment(SWT.LEFT);
layout.addColumnData(new ColumnWeightData(widthArray[i], true));
代码示例来源:origin: org.eclipse/org.eclipse.wst.xml.ui
public XMLCatalogTableViewer(Composite parent, String[] columnProperties) {
super(parent, SWT.FULL_SELECTION);
Table table = getTable();
table.setLinesVisible(true);
table.setHeaderVisible(true);
table.setLinesVisible(true);
TableLayout layout = new TableLayout();
for (int i = 0; i < columnProperties.length; i++) {
TableColumn column = new TableColumn(table, i);
column.setText(columnProperties[i]);
column.setAlignment(SWT.LEFT);
layout.addColumnData(new ColumnWeightData(50, true));
}
table.setLayout(layout);
table.setLinesVisible(false);
setColumnProperties(columnProperties);
setContentProvider(new CatalogEntryContentProvider());
setLabelProvider(new CatalogEntryLabelProvider());
}
代码示例来源:origin: org.eclipse.equinox.p2/ui
if (i == RepositoryDetailsLabelProvider.COL_ENABLEMENT) {
tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_SMALL_COLUMN_WIDTH));
tc.setAlignment(SWT.CENTER);
} else if (i == RepositoryDetailsLabelProvider.COL_NAME) {
tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH));
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public ConstraintsTableViewer(Table table)
{
super(table);
table = getTable();
table.setLinesVisible(true);
setContentProvider(new ConstraintsContentProvider());
setLabelProvider(new ConstraintsTableLabelProvider());
setColumnProperties(columnProperties);
setCellModifier(this);
TableColumn column = new TableColumn(table, SWT.NONE, 0);
column.setText(columnProperties[0]);
column.setAlignment(SWT.LEFT);
column.setResizable(true);
cellEditors = new CellEditor[1];
TableLayout layout = new TableLayout();
ColumnWeightData data = new ColumnWeightData(100);
layout.addColumnData(data);
cellEditors[0] = new TextCellEditor(table);
getTable().setLayout(layout);
setCellEditors(cellEditors);
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public EnumerationsTableViewer(Table table)
{
super(table);
table = getTable();
table.setLinesVisible(true);
setContentProvider(new EnumerationsTableContentProvider());
setLabelProvider(new EnumerationsTableLabelProvider());
setColumnProperties(columnProperties);
setCellModifier(this);
TableColumn column = new TableColumn(table, SWT.NONE, 0);
column.setText(columnProperties[0]);
column.setAlignment(SWT.LEFT);
column.setResizable(true);
cellEditors = new CellEditor[1];
TableLayout layout = new TableLayout();
ColumnWeightData data = new ColumnWeightData(100);
layout.addColumnData(data);
cellEditors[0] = new TextCellEditor(table);
getTable().setLayout(layout);
setCellEditors(cellEditors);
}
代码示例来源:origin: org.apache.uima/uimaj-ep-cas-editor
typeColumn.setAlignment(SWT.LEFT);
typeColumn.setText("Type");
typeColumn.setWidth(120);
stlyeColumn.setAlignment(SWT.LEFT);
stlyeColumn.setText("Style");
stlyeColumn.setWidth(100);
内容来源于网络,如有侵权,请联系作者删除!