Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.TreeColumn


    gridData.grabExcessHorizontalSpace = true;
    gridData.verticalAlignment = SWT.FILL;
    gridData.grabExcessVerticalSpace = true;
    foundModelElementsTree.setLayoutData(gridData);

    TreeColumn column1 = new TreeColumn(foundModelElementsTree, SWT.LEFT);
    column1.setText("results");
    column1.setWidth(250);
    TreeColumn column2 = new TreeColumn(foundModelElementsTree, SWT.LEFT);
    column2.setText("found in");
    column2.setWidth(200);

    resultItemViewText = new ResultItemViewText(filteredLinksComposite,
        SWT.BORDER | SWT.V_SCROLL);
    gridData = new GridData();
    gridData.horizontalSpan = 3;
View Full Code Here


    gridData.grabExcessHorizontalSpace = true;
    gridData.grabExcessVerticalSpace = true;
    gridData.horizontalAlignment = SWT.FILL;
    gridData.verticalAlignment = SWT.FILL;
    propertyTree.setLayoutData(gridData);
    final TreeColumn propertyColumn = new TreeColumn(propertyTree, SWT.NONE);
    propertyColumn.setText("property");
    propertyColumn.setWidth(300);
    final TreeColumn aliasColumn = new TreeColumn(propertyTree, SWT.NONE);
    aliasColumn.setText("alias");
    aliasColumn.setWidth(200);
    propertyTree.setHeaderVisible(true);
   
    propertyTree.setToolTipText("possible technical properties for the constraint");

    descriptionText = new ResultItemViewText(composite, SWT.BORDER | SWT.MULTI);
View Full Code Here

    public void createPartControl(Composite parent) {
        tree = new Tree(parent, SWT.FULL_SELECTION | SWT.SINGLE | SWT.HIDE_SELECTION);
        tree.setLinesVisible(true);
        tree.setHeaderVisible(true);
        for (int i = 0; i < columnLabels.length; i++) {
            TreeColumn column = new TreeColumn(tree, 0, i);
            column.setText(columnLabels[i]);
        }

        tree.addControlListener(new ControlAdapter() {
            @Override
            public void controlResized(ControlEvent e) {
View Full Code Here

    GameServerBrowserSorter sorter = new GameServerBrowserSorter();
    viewer.setSorter(sorter);

    viewer.getTree().setHeaderVisible(true);

    TreeColumn name = new TreeColumn(viewer.getTree(), SWT.NULL);
    name.setText("Server Name");
    name.setWidth(200);

    TreeColumn map = new TreeColumn(viewer.getTree(), SWT.NULL);
    map.setText("Map");
    map.setWidth(50);

    TreeColumn ping = new TreeColumn(viewer.getTree(), SWT.NULL);
    ping.setText("Ping");
    ping.setWidth(70);
   
    TreeColumn players = new TreeColumn(viewer.getTree(), SWT.NULL);
    players.setText("Players");
    players.setWidth(50);

    viewer.getTree().setSortColumn(ping);
    viewer.getTree().setSortDirection(SWT.UP);

    createServerContextMenu();
View Full Code Here

    gridData2.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
    gridData2.grabExcessVerticalSpace = true;
    discovered = new Tree(sShell, SWT.FULL_SELECTION);
    discovered.setLayoutData(gridData2);
    discovered.setHeaderVisible(true);
    TreeColumn name = new TreeColumn(discovered, SWT.LEFT);
    name.setText("Name");
    TreeColumn jid = new TreeColumn(discovered, SWT.LEFT);
    jid.setText("JID");
    TreeColumn category = new TreeColumn(discovered, SWT.LEFT);
    category.setText("Category");
    TreeColumn type = new TreeColumn(discovered, SWT.LEFT);
    type.setText("Type");
    name.pack();
    jid.pack();
    category.pack();
    type.pack();
    name.setWidth(160);
    jid.setWidth(160);
    discovered.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseDoubleClick(MouseEvent e) {
View Full Code Here

   
    contactListGroup.setBackground(contactList.getBackground());
   
    entryMenu = new EntryMenu(contactList);
   
    final TreeColumn jid = new TreeColumn(contactList,SWT.LEFT);
    jid.setText("JID");
    contactList.addListener(SWT.Resize,new Listener() {

      public void handleEvent(Event event) {
        jid.setWidth(contactList.getClientArea().width-10);
      } });
    contactList.addListener(SWT.KeyDown,new Listener() {
      public void handleEvent(Event event) {
        switch(event.keyCode) {
        case SWT.DEL:
View Full Code Here

    mTableViewer.getTree().setLayoutData(gridData);

    mTableViewer.getTree().setLinesVisible(true);
    mTableViewer.getTree().setHeaderVisible(true);

    TreeColumn textColumn = new TreeColumn(mTableViewer.getTree(), SWT.LEFT);
    textColumn.setText("Text");
    textColumn.setWidth(130);

    // performance optimization, the table can contain many items
    mTableViewer.setUseHashlookup(false);

    // Note: The type style is considered as the default
View Full Code Here

    Tree main = new Tree(parent, SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
    main.setHeaderVisible(true);
    main.setLinesVisible(false);
    main.setLayoutData(new GridData(GridData.FILL_BOTH));

    TreeColumn serverCol = new TreeColumn(main, SWT.SINGLE);
    serverCol.setText("Location");
    serverCol.setWidth(300);
    serverCol.setResizable(true);

    TreeColumn locationCol = new TreeColumn(main, SWT.SINGLE);
    locationCol.setText("Master node");
    locationCol.setWidth(185);
    locationCol.setResizable(true);

    TreeColumn stateCol = new TreeColumn(main, SWT.SINGLE);
    stateCol.setText("State");
    stateCol.setWidth(95);
    stateCol.setResizable(true);

    TreeColumn statusCol = new TreeColumn(main, SWT.SINGLE);
    statusCol.setText("Status");
    statusCol.setWidth(300);
    statusCol.setResizable(true);

    viewer = new TreeViewer(main);
    viewer.setContentProvider(this);
    viewer.setLabelProvider(this);
    viewer.setInput(CONTENT_ROOT); // don't care
View Full Code Here

        Tree tree = treeViewerWithColumns.getTree();
        tree.setLayoutData(new FillLayout());
        tree.setHeaderVisible(true);
        tree.setLinesVisible(true);

        TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);
        objectColumn.setText(getString("_UI_ObjectColumn_label"));
        objectColumn.setResizable(true);
        objectColumn.setWidth(250);

        TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);
        selfColumn.setText(getString("_UI_SelfColumn_label"));
        selfColumn.setResizable(true);
        selfColumn.setWidth(200);

        treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"});
        treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
View Full Code Here

    {
    TreeViewer treeViewer=new TreeViewer(parent, SWT.BORDER | SWT.FULL_SELECTION);
    treeViewer.getTree().setHeaderVisible(true);
    treeViewer.getTree().setLinesVisible(true);
   
    TreeColumn tc = new TreeColumn(treeViewer.getTree(), SWT.BORDER | SWT.FULL_SELECTION);
    tc.setText("Element");
    tc.setWidth(100);
   
    tc = new TreeColumn(treeViewer.getTree(), SWT.BORDER | SWT.FULL_SELECTION);
    tc.setText("Value");
    tc.setWidth(100);
       
    treeViewer.setContentProvider(new TreeNodeContentProvider());
    treeViewer.setLabelProvider(new ESummaryLabelProvider());
   
    treeViewer.expandAll();
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.TreeColumn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.