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


Java TreeColumn.setText方法代碼示例

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


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

示例1: createViewer

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
@Override
protected TreeViewer createViewer(final Composite parent, final AbstractColumnLayout columnLayout,
		final int style) {
	final TreeViewer viewer = new TreeViewer(parent, virual ? (style | VIRTUAL) : style);
	final Tree tree = viewer.getTree();
	tree.setLinesVisible(linesVisible);
	tree.setHeaderVisible(headerVisible);

	int columnIndex = 0;
	for (final String columnLabel : columnLabels) {

		final TreeViewerColumn viewerColumn = new TreeViewerColumn(viewer, NONE);
		final TreeColumn column = viewerColumn.getColumn();
		columnLayout.setColumnData(column, createColumnLayoutData(columnIndex));
		column.setText(columnLabel);
		column.setMoveable(moveable);

		columnIndex++;
	}

	return viewer;
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:23,代碼來源:TreeViewerBuilder.java

示例2: createColumns

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

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

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

示例3: SystemTree

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
/**
 * Create a new tree listing Solr system information.
 * 
 * @param composite
 *            Parent composite.
 */
public SystemTree(Composite composite) throws SophieException {
	// Instantiate Tree.
	tree = new Tree(composite, SWT.BORDER);
	tree.setHeaderVisible(true);
	tree.setLayoutData(new GridData(GridData.FILL_BOTH));

	// Create name/value columns.
	columnName = new TreeColumn(tree, SWT.LEFT);
	columnName.setText("Name");
	columnValue = new TreeColumn(tree, SWT.LEFT);
	columnValue.setText("Value");

	// Populate tree with data from Solr.
	populate();

	// Pack columns.
	columnName.pack();
	columnValue.pack();
}
 
開發者ID:fengtan,項目名稱:sophie,代碼行數:26,代碼來源:SystemTree.java

示例4: defineColumn_Date

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
private void defineColumn_Date(final TreeColumnLayout treeLayout) {

		final TreeViewerColumn tvc = new TreeViewerColumn(_tourViewer, SWT.LEAD);
		tvc.setLabelProvider(new CellLabelProvider() {
			@Override
			public void update(final ViewerCell cell) {

				final Object element = cell.getElement();

				if (element instanceof TVIWizardCompareYear) {
					cell.setText(((TVIWizardCompareYear) element).treeColumn);
				} else if (element instanceof TVIWizardCompareMonth) {
					cell.setText(((TVIWizardCompareMonth) element).treeColumn);
				} else if (element instanceof TVIWizardCompareTour) {
					cell.setText(((TVIWizardCompareTour) element).treeColumn);
				} else {
					cell.setText(UI.EMPTY_STRING);
				}
			}
		});

		final TreeColumn tc = tvc.getColumn();
		tc.setText(Messages.tourCatalog_wizard_Column_tour);
		treeLayout.setColumnData(tc, new ColumnPixelData(convertWidthInCharsToPixels(20)));
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:26,代碼來源:WizardPage_10_CompareTour.java

示例5: createPluginColumns

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
private void createPluginColumns(IPluginModelBase pm)
{
	// Add columns in the tree one column per selected plugin.
	// Create the first column for the key
	TreeViewerColumn col = new TreeViewerColumn(tv, SWT.NONE);
	TreeColumn swtCol = col.getColumn();
	swtCol.setText(getColumnName(pm));
	swtCol.setAlignment(SWT.CENTER);
	PluginDataProvider labelProvider = new PluginDataProvider();

	labelProvider.setPlugin(pm);
	col.setLabelProvider(labelProvider);
	swtCol.setToolTipText(pm.getBundleDescription().getName());
	swtCol.pack();

	columnsCache.put(pm, col);
}
 
開發者ID:opcoach,項目名稱:E34MigrationTooling,代碼行數:18,代碼來源:MigrationStatsE4View.java

示例6: update

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
/**
 * Prepare view depending on the current config setting E.g. displaying
 * and hiding columns, Setting column labels etc.
 */
public void update(){
	if(viewer != null){
		// Set the model to display
		viewer.setInput(getModel());
		viewer.refresh(true);
		if(expandCItem != null){
			// sync set the viewmode button
			expandCItem.enable(viewMode == ViewMode.Group);
		}
		TreeColumn col = colFactory.getColumn(ColumnDesc.GroupRepository);
		if(col == null){
			return;
		}
		if(viewMode == ViewMode.Repository){
			// Showing repositories only (no groups)
			col.setText("Repository");
			col.setToolTipText("Name of the repository");
		}
		else{
			// Showing groups
			col.setText("Group / Repository");
			col.setToolTipText("Name of the group and its repositories");
		}
	}
}
 
開發者ID:baloise,項目名稱:egitblit,代碼行數:30,代碼來源:RepoExplorerView.java

示例7: getListControl

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
/**
 * Returns this field editor's list control.
 * 
 * @param parent the parent control
 * @return the list control
 */
public Tree getListControl(Composite parent) {
    if (treeWithInterpreters == null) {
        treeWithInterpreters = new Tree(parent, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL);

        treeWithInterpreters.setHeaderVisible(true);
        TreeColumn column1 = new TreeColumn(treeWithInterpreters, SWT.LEFT);
        column1.setText("Name");
        column1.setWidth(200);
        TreeColumn column2 = new TreeColumn(treeWithInterpreters, SWT.LEFT);
        column2.setText("Location");
        column2.setWidth(200);

        treeWithInterpreters.setFont(parent.getFont());
        treeWithInterpreters.addSelectionListener(getSelectionListener());
        treeWithInterpreters.addDisposeListener(new DisposeListener() {
            @Override
            public void widgetDisposed(DisposeEvent event) {
                treeWithInterpreters = null;
            }
        });
    } else {
        checkParent(treeWithInterpreters, parent);
    }
    return treeWithInterpreters;
}
 
開發者ID:fabioz,項目名稱:Pydev,代碼行數:32,代碼來源:PythonListEditor.java

示例8: createGroupAvailableIndicatorGroupss

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
/**
 * This method initializes groupCurrentLink
 * 
 */
private void createGroupAvailableIndicatorGroupss() {
    groupAvailableIndicatorGroups = new Group(shell, SWT.NONE);
    groupAvailableIndicatorGroups.setText(Messages.getString("IndicatorGroupDialog.groupAvailableIndicatorGroups")); //$NON-NLS-1$
    groupAvailableIndicatorGroups.setBounds(new Rectangle(5, 86, 267, 271));
    treeAvailableIndicatorGroups = new Tree(groupAvailableIndicatorGroups, SWT.BORDER | SWT.CHECK);
    treeAvailableIndicatorGroups.setToolTipText(Messages.getString("IndicatorGroupDialog.groupAvailableIndicatorGroups.tiptext")); //$NON-NLS-1$
    treeAvailableIndicatorGroups.setBounds(new Rectangle(6, 51, 253, 212));

    TreeColumn nameCol = new TreeColumn(treeAvailableIndicatorGroups, SWT.LEFT);
    nameCol.setText(Messages.getString("IndicatorGroupDialog.Name")); //$NON-NLS-1$
    nameCol.pack();

    TreeColumn idCol = new TreeColumn(treeAvailableIndicatorGroups, SWT.LEFT);
    idCol.setText("ID"); //$NON-NLS-1$
    idCol.pack();
}
 
開發者ID:McGill-DP-Group,項目名稱:seg.jUCMNav,代碼行數:21,代碼來源:IndicatorGroupDialog.java

示例9: createGroupAssignedIndicatorGroups

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
/**
 * This method initializes groupAddLink
 * 
 */
private void createGroupAssignedIndicatorGroups() {
    groupAssignedIndicatorGroups = new Group(shell, SWT.NONE);
    groupAssignedIndicatorGroups.setText(Messages.getString("IndicatorGroupDialog.groupAssignedIndicatorGroups")); //$NON-NLS-1$
    groupAssignedIndicatorGroups.setBounds(new Rectangle(324, 86, 267, 271));
    treeAssignedIndicatorGroups = new Tree(groupAssignedIndicatorGroups, SWT.BORDER | SWT.CHECK);
    treeAssignedIndicatorGroups.setToolTipText(Messages.getString("IndicatorGroupDialog.groupAssignedIndicatorGroups.tiptext")); //$NON-NLS-1$
    treeAssignedIndicatorGroups.setBounds(new Rectangle(6, 22, 253, 241));

    TreeColumn nameCol = new TreeColumn(treeAssignedIndicatorGroups, SWT.LEFT);
    nameCol.setText(Messages.getString("IndicatorGroupDialog.Name")); //$NON-NLS-1$
    nameCol.pack();

    TreeColumn idCol = new TreeColumn(treeAssignedIndicatorGroups, SWT.LEFT);
    idCol.setText("ID"); //$NON-NLS-1$
    idCol.pack();
}
 
開發者ID:McGill-DP-Group,項目名稱:seg.jUCMNav,代碼行數:21,代碼來源:IndicatorGroupDialog.java

示例10: createComponents

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
public void createComponents(Composite parent)
{
	this.viewer = new TreeViewer(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
	viewer.getTree().setHeaderVisible(true);
	
	TreeColumn nameColumn = new TreeColumn(viewer.getTree(), SWT.LEFT);
	nameColumn.setAlignment(SWT.LEFT);
	nameColumn.setText("Name");
	nameColumn.setWidth(160);
	TreeColumn argsColumn = new TreeColumn(viewer.getTree(), SWT.RIGHT);
	argsColumn.setAlignment(SWT.LEFT);
	argsColumn.setText("Argumente");
	argsColumn.setWidth(100);
	
	viewer.setContentProvider(new FunctionContentProvider());
	viewer.setLabelProvider(new FunctionLabelProvider());
	viewer.setInput(library);
	
	EventHandler handler = new EventHandler();
	viewer.addDoubleClickListener(handler);
}
 
開發者ID:TheWhiteShadow3,項目名稱:cuina,代碼行數:22,代碼來源:FunctionListPanel.java

示例11: installDesigns

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
protected void installDesigns()
{
    TreeColumn designColumn = new TreeColumn(tree, SWT.LEFT);

    designColumn.setToolTipText(selectAllHelp);

    // TODO: Bonnie wants some indicator for which columns are designs
    // Such as changing "Tasks" here to "Tasks \\ Designs"
    designColumn.setText(L10N.get("PM.Tasks", "Tasks"));
    designColumn.setResizable(true);
    designColumn.setWidth(400);

    if (columnHook != null) {
        columnHook.onColumnCreation(designColumn);
    }

    Iterator<Design> designs = project.getDesigns().iterator();

    while (designs.hasNext()) {
        Design nextDesign = designs.next();

        addTreeColumn(nextDesign);
    }
}
 
開發者ID:cogtool,項目名稱:cogtool,代碼行數:25,代碼來源:ProjectUIModel.java

示例12: recolorTree

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
public void recolorTree(int designColumn,
                        TreeItem cellTask,
                        boolean nowSelected)
{
    // Set or remove selection marker in name
    TreeColumn col = tree.getColumn(designColumn);

    if (nowSelected && (cellTask == null)) {
        col.setText(L10N.get("PM.DesignMark", "\u2022 ") + col.getText());
    }
    else {
        col.setText(((Design) col.getData()).getName());
    }

    recolorItems(tree.getItems(),
                 designColumn,
                 nowSelected && (cellTask == null));

    if (cellTask != null) {
        cellTask.setBackground(designColumn, ProjectUIModel.SELECTED_CELL_COLOR);
    }
}
 
開發者ID:cogtool,項目名稱:cogtool,代碼行數:23,代碼來源:ProjectUIModel.java

示例13: addTreeColumn

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
private void addTreeColumn(final int column, final String headerText, final String preferenceKey) {
	final TreeColumn treeColumn = new TreeColumn(tree, SWT.LEFT);
	treeColumn.setText(Messages.getString(headerText));
	treeColumn.setWidth(100);
	WidgetPreferences.tuneTreeColumn(treeColumn, getClass(), preferenceKey);
	// treeColumn.addSelectionListener(new
	// TreeColumnSelectionAdaptor(treeViewer, column));
}
 
開發者ID:nresare,項目名稱:javapasswordsafe,代碼行數:9,代碼來源:PasswordSafeJFace.java

示例14: setTableHeader

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
/**
 * テーブルヘッダーをセットする
 */
private void setTableHeader() {
    for (int i = 0; i < this.header.length; i++) {
        TreeColumn col = new TreeColumn(this.tree, SWT.LEFT);
        col.setText(this.header[i]);
    }
    this.packTableHeader();
}
 
開發者ID:sanaehirotaka,項目名稱:logbook,代碼行數:11,代碼來源:BattleAggDialog.java

示例15: createComposite

import org.eclipse.swt.widgets.TreeColumn; //導入方法依賴的package包/類
/**
 * 뷰어가 담길 컴포지트 생성
 * 
 * @param parent
 * @return Composite
 */
public Composite createComposite(final Composite parent) {
    Tree tree = new Tree(parent, SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);

    tree.setLinesVisible(true);
    tree.setHeaderVisible(true);

    String[] strHeadings = { UMLMessage.LABEL_PROPERTY, UMLMessage.LABEL_VALUE };

    TreeColumn propertyTreeColumn = new TreeColumn(tree, SWT.NONE);
    propertyTreeColumn.setWidth(240);
    propertyTreeColumn.setText(strHeadings[0]);
    propertyTreeColumn.setAlignment(SWT.LEFT);
    propertyTreeColumn.setResizable(true);

    TreeColumn valueTreeColumn = new TreeColumn(tree, SWT.NONE);
    valueTreeColumn.setWidth(300);
    valueTreeColumn.setText(strHeadings[1]);
    valueTreeColumn.setAlignment(SWT.LEFT);
    valueTreeColumn.setResizable(true);

    GridData gridData = new GridData(GridData.FILL_BOTH);
    gridData.heightHint = 150;
    gridData.horizontalSpan = 2;
    tree.setLayoutData(gridData);

    viewer = new TreeViewer(tree);
    tree.setItemCount(20);

    viewer.setContentProvider(new StereotypePropertyTreeContentProvider());
    viewer.setLabelProvider(new StereotypePropertyTableColumnLabelProvider(this));

    // viewer.setInput(input);
    viewer.addSelectionChangedListener(new StereotypePropertySelectionChangedListener(parent, this));

    return parent;
}
 
開發者ID:SK-HOLDINGS-CC,項目名稱:NEXCORE-UML-Modeler,代碼行數:43,代碼來源:StereotypePropertyComposite.java


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