當前位置: 首頁>>代碼示例>>Java>>正文


Java TableColumn.setResizable方法代碼示例

本文整理匯總了Java中org.eclipse.swt.widgets.TableColumn.setResizable方法的典型用法代碼示例。如果您正苦於以下問題:Java TableColumn.setResizable方法的具體用法?Java TableColumn.setResizable怎麽用?Java TableColumn.setResizable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.widgets.TableColumn的用法示例。


在下文中一共展示了TableColumn.setResizable方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createColumns

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
protected void createColumns ( final Table table )
{
    final TableColumn typeFilterColumn = new TableColumn ( table, SWT.NONE );
    typeFilterColumn.setText ( getString ( "_UI_TypeFilterColumn_label" ) ); //$NON-NLS-1$
    typeFilterColumn.setResizable ( true );
    typeFilterColumn.setWidth ( 200 );

    final TableColumn idFilterColumn = new TableColumn ( table, SWT.NONE );
    idFilterColumn.setText ( getString ( "_UI_IdFilterColumn_label" ) ); //$NON-NLS-1$
    idFilterColumn.setResizable ( true );
    idFilterColumn.setWidth ( 200 );

    final TableColumn actionFilterColumn = new TableColumn ( table, SWT.NONE );
    actionFilterColumn.setText ( getString ( "_UI_ActionFilterColumn_label" ) ); //$NON-NLS-1$
    actionFilterColumn.setResizable ( true );
    actionFilterColumn.setWidth ( 200 );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:18,代碼來源:SecurityEditor.java

示例2: createColumns

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
private void createColumns(final Table table) {
    table.setLayout(new TableLayout());

    final ControlListener layoutWhenResizedListener = new ControlAdapter() {
        @Override
        public void controlResized(final ControlEvent e) {
            ((TableColumn) e.widget).getParent().layout();
        }
    };

    for (int i = 0; i < COLUMN_DATA.length; i++) {
        final ColumnData columnData = COLUMN_DATA[i];

        final TableColumn column = new TableColumn(table, columnData.style);
        column.setWidth(columnData.defaultWidth);
        column.setResizable(columnData.resizable);
        if (columnData.label != null) {
            column.setText(columnData.label);
        }
        column.addControlListener(layoutWhenResizedListener);
    }
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:23,代碼來源:QueryEditorControl.java

示例3: initTable

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
private void initTable(final Composite parent) {
    final GridData gridData = new GridData();
    gridData.horizontalSpan = 3;
    gridData.grabExcessHorizontalSpace = true;
    gridData.horizontalAlignment = GridData.FILL;
    gridData.heightHint = 200;

    indexTable = new Table(parent, SWT.BORDER | SWT.HIDE_SELECTION);

    indexTable.setHeaderVisible(true);
    indexTable.setLayoutData(gridData);
    indexTable.setLinesVisible(true);

    CompositeFactory.createTableColumn(indexTable, "label.column.name", -1);
    final TableColumn separatorColumn = CompositeFactory.createTableColumn(indexTable, "", 3);
    separatorColumn.setResizable(false);
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:18,代碼來源:IndexTabWrapper.java

示例4: createTableColumns

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
private void createTableColumns(final Table table) {
    final TableLayout tableLayout = new TableLayout();
    table.setLayout(tableLayout);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column1 = new TableColumn(table, SWT.NONE);
    column1.setText(Messages.getString("StatusPropertiesTab.ColumNameUser")); //$NON-NLS-1$
    column1.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column2 = new TableColumn(table, SWT.NONE);
    column2.setText(Messages.getString("StatusPropertiesTab.ChangeNameChangeType")); //$NON-NLS-1$
    column2.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column3 = new TableColumn(table, SWT.NONE);
    column3.setText(Messages.getString("StatusPropertiesTab.ColumnNameWorkspace")); //$NON-NLS-1$
    column3.setResizable(true);
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:20,代碼來源:StatusPropertiesTab.java

示例5: createTableColumns

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
private void createTableColumns(final Table table) {
    final TableLayout tableLayout = new TableLayout();
    table.setLayout(tableLayout);

    tableLayout.addColumnData(new ColumnWeightData(5, true));
    final TableColumn column1 = new TableColumn(table, SWT.NONE);
    column1.setText(Messages.getString("BranchHistoryTreeControl.ColumnHeaderFileName")); //$NON-NLS-1$
    column1.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column2 = new TableColumn(table, SWT.NONE);
    column2.setText(Messages.getString("BranchHistoryTreeControl.ColumnHeaderBranchedFromVersion")); //$NON-NLS-1$
    column2.setResizable(true);

    if (displayLatestVersion) {
        tableLayout.addColumnData(new ColumnWeightData(1, true));
        final TableColumn column3 = new TableColumn(table, SWT.NONE);
        column3.setText(Messages.getString("BranchHistoryTreeControl.ColumnHeaderLatestVersion")); //$NON-NLS-1$
        column3.setResizable(true);
    }
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:22,代碼來源:BranchHistoryTreeControl.java

示例6: createTableViewerColumn

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
private TableViewerColumn createTableViewerColumn(TableViewer viewer, String title, final int colNumber) {
    final TableViewerColumn viewerColumn = new TableViewerColumn(viewer,SWT.NONE);
    final TableColumn column = viewerColumn.getColumn();
    column.setText(title);
    column.setResizable(true);
    return viewerColumn;
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:8,代碼來源:ModelSearchPage.java

示例7: addColumnTo

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
public TableViewerColumn addColumnTo(TableViewer viewer) {
  TableViewerColumn tableViewerColumn = new TableViewerColumn(viewer, SWT.NONE);
  TableColumn column = tableViewerColumn.getColumn();
  column.setMoveable(true);
  column.setText(getTitle());
  column.setResizable(true);
  tableViewerColumn.setLabelProvider(this);
  return tableViewerColumn;
}
 
開發者ID:ModelWriter,項目名稱:Tarski,代碼行數:10,代碼來源:RefColumnLabelProvider.java

示例8: createTableViewerColumn

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
private TableViewerColumn createTableViewerColumn(String title, int bound, final int colNumber) {
	final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE);
	final TableColumn column = viewerColumn.getColumn();
	column.setText(title);
	column.setWidth(bound);
	column.setResizable(true);
	column.setMoveable(true);
	return viewerColumn;
}
 
開發者ID:VisuFlow,項目名稱:visuflow-plugin,代碼行數:10,代碼來源:ResultView.java

示例9: newTableColumn

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
private TableColumn newTableColumn(Table table, String name, int width) {
  TableColumn tc = new TableColumn(table, SWT.NONE, 0);
  tc.setResizable(true);
  tc.setText(name);
  tc.setWidth(width);
  return tc;
}
 
開發者ID:alfsch,項目名稱:workspacemechanic,代碼行數:8,代碼來源:TaskSelectionDialog.java

示例10: createRightComposite

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
private void createRightComposite(Composite parent) {
	Composite composite = new Composite(parent, SWT.BORDER);

	GridData gridData = new GridData();
	gridData.verticalAlignment = GridData.FILL;
	composite.setLayoutData(gridData);

	GridLayout gridLayout = new GridLayout();
	gridLayout.verticalSpacing = 8;
	composite.setLayout(gridLayout);

	GridData tableGridData = new GridData();
	tableGridData.heightHint = GROUP_LIST_HEIGHT;
	tableGridData.verticalIndent = 15;

	this.testDataTable = new Table(composite, SWT.BORDER
			| SWT.FULL_SELECTION);
	this.testDataTable.setHeaderVisible(true);
	this.testDataTable.setLayoutData(tableGridData);
	this.testDataTable.setLinesVisible(true);

	TableColumn nameColumn = new TableColumn(testDataTable, SWT.NONE);
	nameColumn.setWidth(300);
	nameColumn.setResizable(false);
	nameColumn.setText(ResourceString
			.getResourceString("label.testdata.table.name"));

	TableColumn dataNumColumn = new TableColumn(testDataTable, SWT.RIGHT);
	dataNumColumn.setResizable(false);
	dataNumColumn.setText(ResourceString
			.getResourceString("label.testdata.table.test.num"));
	dataNumColumn.pack();
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:34,代碼來源:TestDataManageDialog.java

示例11: AdvancedPropertiesControl

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
public AdvancedPropertiesControl(final Composite parent, final int style) {
    super(parent, style);

    final FillLayout layout = new FillLayout();
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    layout.spacing = getSpacing();
    setLayout(layout);

    table = new Table(this, SWT.BORDER | SWT.FULL_SELECTION);
    table.setLinesVisible(true);
    table.setHeaderVisible(true);

    final TableLayout tableLayout = new TableLayout();
    table.setLayout(tableLayout);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column1 = new TableColumn(table, SWT.NONE);
    column1.setText(Messages.getString("AdvancedPropertiesTab.ColumnNameProperty")); //$NON-NLS-1$
    column1.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column2 = new TableColumn(table, SWT.NONE);
    column2.setText(Messages.getString("AdvancedPropertiesTab.ColumnNameValue")); //$NON-NLS-1$
    column2.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column3 = new TableColumn(table, SWT.NONE);
    column3.setText(Messages.getString("AdvancedPropertiesTab.ColumnNameSource")); //$NON-NLS-1$
    column3.setResizable(true);
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:32,代碼來源:AdvancedPropertiesTab.java

示例12: addTableColumns

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
private void addTableColumns(final Table table) {
    final TableLayout tableLayout = new TableLayout();
    table.setLayout(tableLayout);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column1 = new TableColumn(table, SWT.NONE);
    column1.setText(Messages.getString("FileControl.ColumNameName")); //$NON-NLS-1$
    column1.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column2 = new TableColumn(table, SWT.NONE);
    column2.setText(Messages.getString("FileControl.ColumnNamePendingChange")); //$NON-NLS-1$
    column2.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column3 = new TableColumn(table, SWT.NONE);
    column3.setText(Messages.getString("FileControl.ColumnNameUser")); //$NON-NLS-1$
    column3.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column4 = new TableColumn(table, SWT.NONE);
    column4.setText(Messages.getString("FileControl.ColumnNameLatest")); //$NON-NLS-1$
    column4.setResizable(true);

    tableLayout.addColumnData(new ColumnWeightData(1, true));
    final TableColumn column5 = new TableColumn(table, SWT.NONE);
    column5.setText(Messages.getString("FileControl.ColumnNameLastCheckin")); //$NON-NLS-1$
    column5.setResizable(true);
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:30,代碼來源:FileControl.java

示例13: createContents

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
/**
 * Create contents of the window.
 */
protected void createContents() {
	shlContacts = new Shell();
	shlContacts.setSize(200, 400);
	shlContacts.setText("Contacts");
	
	Menu menu = new Menu(shlContacts, SWT.BAR);
	shlContacts.setMenuBar(menu);
	
	MenuItem mntmControl = new MenuItem(menu, SWT.CASCADE);
	mntmControl.setText("dev_options");
	
	Menu menu_1 = new Menu(mntmControl);
	mntmControl.setMenu(menu_1);
	
	MenuItem mntmdevrescan = new MenuItem(menu_1, SWT.NONE);
	mntmdevrescan.setText("(dev)_rescan");
	
	table = new Table(shlContacts, SWT.BORDER | SWT.FULL_SELECTION);
	table.setBounds(0, 0, 194, 298);
	table.setHeaderVisible(true);
	table.setLinesVisible(true);
	
	TableColumn tblclmnAvailableContacts = new TableColumn(table, SWT.NONE);
	tblclmnAvailableContacts.setResizable(false);
	tblclmnAvailableContacts.setWidth(100);
	tblclmnAvailableContacts.setText("Available Contacts:");
	
	Button btnConnect = new Button(shlContacts, SWT.NONE);
	btnConnect.setBounds(10, 309, 174, 27);
	btnConnect.setText("CONNECT");

}
 
開發者ID:sam4ritan,項目名稱:kingfisher,代碼行數:36,代碼來源:Contacts.java

示例14: createTableViewerColumn

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
/**
 * Helper method to create table columns
 * 
 * @param tblVwrSetup
 * @param title
 * @param bound
 * @return
 */
private TableViewerColumn createTableViewerColumn(final TableViewer tblVwrSetup, String title, int bound) {
	final TableViewerColumn viewerColumn = new TableViewerColumn(tblVwrSetup, SWT.NONE);
	final TableColumn column = viewerColumn.getColumn();
	column.setText(title);
	column.setWidth(bound);
	column.setResizable(true);
	column.setMoveable(false);
	column.setAlignment(SWT.LEFT);
	return viewerColumn;
}
 
開發者ID:Pardus-LiderAhenk,項目名稱:lider-ahenk-installer,代碼行數:19,代碼來源:AhenkNetworkScanPage.java

示例15: createTableViewerColumn

import org.eclipse.swt.widgets.TableColumn; //導入方法依賴的package包/類
public static TableViewerColumn createTableViewerColumn(TableViewer viewer, int style, String text, int width) {
		TableViewerColumn tvc = new TableViewerColumn(viewer, style);
//		TableColumn col = new TableColumn(viewer.getTable(), style);
		TableColumn col = tvc.getColumn();
		col.setText(text);
		col.setWidth(width);
		col.setResizable(true);
		col.setMoveable(true);
		
		return tvc;
	}
 
開發者ID:Transkribus,項目名稱:TranskribusSwtGui,代碼行數:12,代碼來源:TableViewerUtils.java


注:本文中的org.eclipse.swt.widgets.TableColumn.setResizable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。