当前位置: 首页>>代码示例>>Java>>正文


Java ColumnLayoutData类代码示例

本文整理汇总了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);
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:22,代码来源:BundledResourcesSelectionBlock.java

示例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);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:ColumnViewerBuilder.java

示例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);
}
 
开发者ID:termsuite,项目名称:termsuite-ui,代码行数:13,代码来源:TerminologyPart.java

示例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;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:8,代码来源:ListDialogField.java

示例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);
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:32,代码来源:WebappProjectPropertyPage.java

示例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;
}
 
开发者ID:iloveeclipse,项目名称:filesync4eclipse,代码行数:8,代码来源:ListDialogField.java

示例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;
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:10,代码来源:ColumnDefinition.java

示例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;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:39,代码来源:ExternalizeWizardPage.java

示例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;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:8,代码来源:ListDialogField.java

示例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;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:9,代码来源:LayoutTable.java

示例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;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:10,代码来源:LayoutTable.java

示例12: addColumnData

import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
@Override
public void addColumnData(ColumnLayoutData data) {
	columns.add(data);
	super.addColumnData(data);
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:6,代码来源:AutoResizeTableLayout.java

示例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;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:7,代码来源:ListDialogField.java

示例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;
}
 
开发者ID:iloveeclipse,项目名称:filesync4eclipse,代码行数:6,代码来源:ListDialogField.java

示例15: getColumnLayoutData

import org.eclipse.jface.viewers.ColumnLayoutData; //导入依赖的package包/类
public ColumnLayoutData getColumnLayoutData() {
	return dataBuilder.data;
}
 
开发者ID:diffplug,项目名称:durian-swt,代码行数:4,代码来源:ColumnFormat.java


注:本文中的org.eclipse.jface.viewers.ColumnLayoutData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。