本文整理汇总了Java中org.eclipse.jface.viewers.ColumnLayoutData类的典型用法代码示例。如果您正苦于以下问题:Java ColumnLayoutData类的具体用法?Java ColumnLayoutData怎么用?Java ColumnLayoutData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ColumnLayoutData类属于org.eclipse.jface.viewers包,在下文中一共展示了ColumnLayoutData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createListField
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
private void createListField() {
String[] buttons = new String[] {
"Add...", "Add Multiple...", "Edit", null, "Remove", null};
resourcesField =
new ListDialogField<ClientBundleResource>(new SelectionAdapter(), buttons,
new ColumnLabelProvider());
resourcesField.setLabelText(labelText);
String[] columnNames = {"File", "Type", "Method name"};
ColumnLayoutData[] columnLayouts = {
new ColumnPixelData(100), new ColumnPixelData(100),
new ColumnPixelData(100)};
resourcesField.setTableColumns(new ListDialogField.ColumnsDescription(
columnLayouts, columnNames, false));
// Edit and Remove buttons disabled by default
resourcesField.enableButton(IDX_EDIT, false);
resourcesField.enableButton(IDX_REMOVE, false);
}
示例2: createColumnLayoutData
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
/***/
protected ColumnLayoutData createColumnLayoutData(final int columnIndex) {
if (null == columnWeights) {
return new ColumnPixelData(getColumnWidthInPixel(columnIndex), resizable);
}
return new ColumnWeightData(columnWeights.get(columnIndex), MINIMUM_WIDTH, resizable);
}
示例3: getRecommendedSize
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
private ColumnLayoutData getRecommendedSize(Property<?> property) {
if(property == TermProperty.PILOT || property == TermProperty.GROUPING_KEY )
return new ColumnWeightData(100, 100, true);
else if(property == RelationProperty.VARIATION_RULES)
return new ColumnPixelData(100, true, true);
else if(property.getRange().equals(Boolean.class))
return new ColumnPixelData(40, true, true);
else if(property.getRange().equals(String.class))
return new ColumnPixelData(70, true, true);
else
return new ColumnPixelData(50,true, true);
}
示例4: createColumnWeightData
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
private static ColumnLayoutData[] createColumnWeightData(int nColumns) {
ColumnLayoutData[] data = new ColumnLayoutData[nColumns];
for (int i = 0; i < nColumns; i++) {
data[i] = new ColumnWeightData(1);
}
return data;
}
示例5: createExcludedJarsComponent
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
private void createExcludedJarsComponent(Composite parent) {
excludedJarsComponent = new Composite(parent, SWT.NONE);
GridData excludedJarsComponentGridData = new GridData(GridData.FILL_BOTH);
excludedJarsComponentGridData.horizontalSpan = ((GridLayout) parent.getLayout()).numColumns;
excludedJarsComponentGridData.grabExcessVerticalSpace = true;
excludedJarsComponent.setLayoutData(excludedJarsComponentGridData);
GridLayout containerGridLayout = new GridLayout(3, false);
containerGridLayout.marginTop = 16;
excludedJarsComponent.setLayout(containerGridLayout);
Label label = new Label(excludedJarsComponent, SWT.NONE);
GridData labelGridData = new GridData(GridData.FILL_HORIZONTAL);
labelGridData.horizontalSpan = 3;
label.setLayoutData(labelGridData);
label.setText("Suppress warnings about these build path entries being outside of WEB-INF/lib:");
String[] buttons = new String[] { "Add...", null, "Remove" };
excludedJarsField = new ListDialogField(new ExcludedJarSelectionAdapter(), buttons, new ExcludedJarLabelProvider());
ColumnLayoutData[] columns = new ColumnLayoutData[] { new ColumnWeightData(1, 100, true),
new ColumnWeightData(2, 100, true) };
String[] columnHeaderNames = { "JAR file", "Location" };
excludedJarsField.setTableColumns(new ListDialogField.ColumnsDescription(columns, columnHeaderNames, false));
excludedJarsField.setRemoveButtonIndex(IDX_REMOVE);
excludedJarsField.doFillIntoGrid(excludedJarsComponent, 3);
GridData layoutData = (GridData) excludedJarsField.getListControl(excludedJarsComponent).getLayoutData();
layoutData.grabExcessHorizontalSpace = true;
layoutData.grabExcessVerticalSpace = true;
excludedJarsField.getListControl(excludedJarsComponent).setLayoutData(layoutData);
}
示例6: createColumnWeightData
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
private static ColumnLayoutData[] createColumnWeightData(int nColumns) {
ColumnLayoutData[] data= new ColumnLayoutData[nColumns];
for (int i= 0; i < nColumns; i++) {
data[i]= new ColumnWeightData(1);
}
return data;
}
示例7: setColumnWeightData
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
public void setColumnWeightData(final ColumnLayoutData layoutData) {
_columnLayoutData = layoutData;
if (layoutData instanceof ColumnPixelData) {
// keep the default width
_defaultColumnWidth = ((ColumnPixelData) layoutData).width;
}
}
示例8: createTable
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
private Control createTable(Composite parent) {
Composite c= new Composite(parent, SWT.NONE);
GridLayout gl= new GridLayout();
gl.numColumns= 2;
gl.marginWidth= 0;
gl.marginHeight= 0;
c.setLayout(gl);
fTable= new Table(c, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION | SWT.HIDE_SELECTION | SWT.BORDER);
fTable.setFont(parent.getFont());
GridData tableGD= new GridData(GridData.FILL_BOTH);
tableGD.heightHint= SWTUtil.getTableHeightHint(fTable, ROW_COUNT);
//tableGD.widthHint= 40;
fTable.setLayoutData(tableGD);
fTable.setLinesVisible(true);
TableLayout layout= new TableLayout();
fTable.setLayout(layout);
fTable.setHeaderVisible(true);
ColumnLayoutData[] columnLayoutData= new ColumnLayoutData[SIZE];
columnLayoutData[STATE_PROP]= new ColumnPixelData(18, false, true);
columnLayoutData[KEY_PROP]= new ColumnWeightData(40, true);
columnLayoutData[VAL_PROP]= new ColumnWeightData(40, true);
for (int i= 0; i < fgTitles.length; i++) {
TableColumn tc= new TableColumn(fTable, SWT.NONE, i);
tc.setText(fgTitles[i]);
layout.addColumnData(columnLayoutData[i]);
tc.setResizable(columnLayoutData[i].resizable);
}
createButtonComposite(c);
return c;
}
示例9: createColumnWeightData
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
private static ColumnLayoutData[] createColumnWeightData(int nColumns) {
ColumnLayoutData[] data= new ColumnLayoutData[nColumns];
for (int i= 0; i < nColumns; i++) {
data[i]= new ColumnWeightData(1);
}
return data;
}
示例10: ColumnsDescription
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
public ColumnsDescription( ColumnLayoutData[] columns,
String[] headers, boolean drawLines )
{
Assert.isNotNull( columns );
this.columns = columns;
this.headers = headers;
this.drawLines = drawLines;
}
示例11: createColumnWeightData
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
private static ColumnLayoutData[] createColumnWeightData( int nColumns )
{
ColumnLayoutData[] data = new ColumnLayoutData[nColumns];
for ( int i = 0; i < nColumns; i++ )
{
data[i] = new ColumnWeightData( 1 );
}
return data;
}
示例12: addColumnData
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
@Override
public void addColumnData(ColumnLayoutData data) {
columns.add(data);
super.addColumnData(data);
}
示例13: ColumnsDescription
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
public ColumnsDescription(ColumnLayoutData[] columns, String[] headers,
boolean drawLines) {
this.columns = columns;
this.headers = headers;
this.drawLines = drawLines;
}
示例14: ColumnsDescription
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
public ColumnsDescription(ColumnLayoutData[] columns, String[] headers, boolean drawLines) {
this.columns= columns;
this.headers= headers;
this.drawLines= drawLines;
}
示例15: getColumnLayoutData
import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
public ColumnLayoutData getColumnLayoutData() {
return dataBuilder.data;
}