Package org.eclipse.jface.layout

Examples of org.eclipse.jface.layout.TreeColumnLayout


  protected boolean showPath = true;

  public void configure(ViewerConfiguration configuration) {
    // owner.setRedraw(false);
    layout = new TreeColumnLayout();
    owner.setLayout(layout);
    showPath = getPreferenceStore().getBoolean(
        IPreferenceConstants.SHOW_PATH);
    try {
      if (viewer != null) {
View Full Code Here


  private void createInfoViewer(Composite container) {

    infoViewerComposite = new Composite(container, SWT.NONE);
    infoViewerComposite.setLayoutData(createFillGridData());

    TreeColumnLayout layout = new TreeColumnLayout();
    infoViewerComposite.setLayout(layout);

    infoViewer = new TreeViewer(infoViewerComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION);
    infoViewer.setUseHashlookup(true);
    infoViewer.getTree().setHeaderVisible(true);

    TreeViewerColumn treeViewerColumn = new TreeViewerColumn(infoViewer, SWT.NONE);
        TreeColumn treeColumn = treeViewerColumn.getColumn();
        layout.setColumnData(treeColumn, new ColumnWeightData(450, 180, true));
        treeColumn.setText(Messages.bundleAndPackageName);
        treeViewerColumn.setLabelProvider(new InfoLabelProvider());

        treeViewerColumn = new TreeViewerColumn(infoViewer, SWT.NONE);
        treeColumn = treeViewerColumn.getColumn();
        layout.setColumnData(treeColumn, new ColumnWeightData(80, 80, true));
        treeColumn.setText(Messages.version2);
        treeViewerColumn.setLabelProvider(new ColumnLabelProvider() {
            @Override
            public String getText(Object element) {
                if (element instanceof Baseline) {
                    return ((Baseline) element).getOlderVersion().getWithoutQualifier().toString();
                }
                if (element instanceof Info) {
                    return ((Info) element).olderVersion.toString();
                }
                return ""; //$NON-NLS-1$
            }
        });

        treeViewerColumn = new TreeViewerColumn(infoViewer, SWT.NONE);
        treeColumn = treeViewerColumn.getColumn();
        layout.setColumnData(treeColumn, new ColumnWeightData(80, 80, true));
        treeColumn.setText(Messages.newVersion);
        treeViewerColumn.setLabelProvider(new ColumnLabelProvider() {
            @Override
            public String getText(Object element) {
                if (element instanceof Baseline) {
View Full Code Here

  private void createBundleTreeViewer(Composite container) {

    bundleTreeViewerComposite = new Composite(container, SWT.NONE);
    bundleTreeViewerComposite.setLayoutData(createFillGridData());

    TreeColumnLayout layout = new TreeColumnLayout();
    bundleTreeViewerComposite.setLayout(layout);

    bundleTreeViewer = new TreeViewer(bundleTreeViewerComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION);
    bundleTreeViewer.setUseHashlookup(true);
    bundleTreeViewer.getTree().setHeaderVisible(true);

    TreeViewerColumn treeViewerColumn = new TreeViewerColumn(bundleTreeViewer, SWT.NONE);
    TreeColumn treeColumn = treeViewerColumn.getColumn();
    layout.setColumnData(treeColumn, new ColumnWeightData(100, 340, true));
    treeColumn.setText(Messages.symbNameResources);
    treeViewerColumn.setLabelProvider(new TreeLabelProvider());

    bundleTreeViewer.setContentProvider(bundleTreeViewerProvider);
    bundleTreeViewer.setAutoExpandLevel(3);
View Full Code Here

  private void createInfoViewer(Composite container) {

    infoViewerComposite = new Composite(container, SWT.NONE);
    infoViewerComposite.setLayoutData(createFillGridData());

    TreeColumnLayout layout = new TreeColumnLayout();
    infoViewerComposite.setLayout(layout);

    infoViewer = new TreeViewer(infoViewerComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION);
    infoViewer.setUseHashlookup(true);
    infoViewer.getTree().setHeaderVisible(true);

    TreeViewerColumn treeViewerColumn = new TreeViewerColumn(infoViewer, SWT.NONE);
        TreeColumn treeColumn = treeViewerColumn.getColumn();
        layout.setColumnData(treeColumn, new ColumnWeightData(450, 180, true));
        treeColumn.setText(Messages.bundleAndPackageName);
        treeViewerColumn.setLabelProvider(new InfoLabelProvider());

        treeViewerColumn = new TreeViewerColumn(infoViewer, SWT.NONE);
        treeColumn = treeViewerColumn.getColumn();
        layout.setColumnData(treeColumn, new ColumnWeightData(80, 80, true));
        treeColumn.setText(Messages.version2);
        treeViewerColumn.setLabelProvider(new ColumnLabelProvider() {
            @Override
            public String getText(Object element) {
                if (element instanceof Baseline) {
                    return ((Baseline) element).getOlderVersion().getWithoutQualifier().toString();
                }
                if (element instanceof Info) {
                    return ((Info) element).olderVersion.toString();
                }
                return ""; //$NON-NLS-1$
            }
        });

        treeViewerColumn = new TreeViewerColumn(infoViewer, SWT.NONE);
        treeColumn = treeViewerColumn.getColumn();
        layout.setColumnData(treeColumn, new ColumnWeightData(80, 80, true));
        treeColumn.setText(Messages.newVersion);
        treeViewerColumn.setLabelProvider(new ColumnLabelProvider() {
            @Override
            public String getText(Object element) {
                if (element instanceof Baseline) {
View Full Code Here

  private void createBundleTreeViewer(Composite container) {

    bundleTreeViewerComposite = new Composite(container, SWT.NONE);
    bundleTreeViewerComposite.setLayoutData(createFillGridData());

    TreeColumnLayout layout = new TreeColumnLayout();
    bundleTreeViewerComposite.setLayout(layout);

    bundleTreeViewer = new TreeViewer(bundleTreeViewerComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION);
    bundleTreeViewer.setUseHashlookup(true);
    bundleTreeViewer.getTree().setHeaderVisible(true);

    TreeViewerColumn treeViewerColumn = new TreeViewerColumn(bundleTreeViewer, SWT.NONE);
    TreeColumn treeColumn = treeViewerColumn.getColumn();
    layout.setColumnData(treeColumn, new ColumnWeightData(100, 340, true));
    treeColumn.setText(Messages.symbNameResources);
    treeViewerColumn.setLabelProvider(new TreeLabelProvider());

    bundleTreeViewer.setContentProvider(bundleTreeViewerProvider);
    bundleTreeViewer.setAutoExpandLevel(3);
View Full Code Here

        viewer = new TreeViewer(parent, SWT.MULTI | SWT.FULL_SELECTION);
        getSite().setSelectionProvider(viewer);

        Tree tree = viewer.getTree();
        TreeColumnLayout colLayout = new TreeColumnLayout();

        col = new TreeColumn(tree, SWT.LEFT);
        col.setText(Messages.getString("campaign.view.tree.column.name.label"));
        col.setToolTipText(Messages.getString("campaign.view.tree.column.name.tooltip"));
        col.setResizable(true);
        col.setMoveable(false);
//        col.setWidth(200);
        colLayout.setColumnData(col, new ColumnWeightData(50, 200, true));

        col = new TreeColumn(tree, SWT.LEFT);
        col.setText(Messages.getString("campaign.view.tree.column.info.label"));
        col.setToolTipText(Messages.getString("campaign.view.tree.column.info.tooltip"));
        col.setResizable(true);
        col.setMoveable(false);
//        col.setWidth(35);
        colLayout.setColumnData(col, new ColumnWeightData(50, 200, true));

        tree.setHeaderVisible(true);
//        tree.setLinesVisible(true);
//
        campaignViewAdapterFactory = new CampaignViewAdapterFactory();
View Full Code Here

    TreeColumn trclmnValue = treeViewerColumnValue.getColumn();
    trclmnValue.setWidth(100);
    trclmnValue.setText("Value");
    treeViewer.setContentProvider(new ParameterTree.ContentProvider());

    TreeColumnLayout layout = new TreeColumnLayout();
    layout.setColumnData(trclmnName, new ColumnWeightData(33));
    layout.setColumnData(trclmnValue, new ColumnWeightData(67));
    body.setLayout(layout);
   
    treeViewer.setInput(paramsTree);
  }
View Full Code Here

  private void createTemplateTree(Composite parent) {
    Composite treeComposite= new Composite(parent, SWT.NONE);
    GridData data= new GridData(GridData.FILL_BOTH);
    treeComposite.setLayoutData(data);

    TreeColumnLayout columnLayout= new TreeColumnLayout();
    treeComposite.setLayout(columnLayout);
    fTemplatesTree= new Tree(treeComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI
        | SWT.FULL_SELECTION);
    fTemplatesTree.setHeaderVisible(true);
    fTemplatesTree.setLinesVisible(true);

    PixelConverter pixelConverter= new PixelConverter(fTemplatesTree);

    TreeColumn columnName= new TreeColumn(fTemplatesTree, SWT.NONE);
    columnName.setText(TemplatesMessages.TemplatesPage_column_name);
    int minWidth= fPreferenceStore.getInt(COLUMN_NAME_WIDTH_PREF_ID);
    if (minWidth == 0) {
      minWidth= pixelConverter.convertWidthInCharsToPixels(30);
    }
    columnLayout.setColumnData(columnName, new ColumnPixelData(minWidth, true));
    columnName.addControlListener(new ControlListener() {
      public void controlMoved(ControlEvent e) {
      }

      public void controlResized(ControlEvent e) {
        int nameWidth= ((TreeColumn) e.getSource()).getWidth();
        fPreferenceStore.setValue(COLUMN_NAME_WIDTH_PREF_ID, nameWidth);
      }
    });

    TreeColumn columnDescription= new TreeColumn(fTemplatesTree, SWT.NONE);
    columnDescription.setText(TemplatesMessages.TemplatesPage_column_description);
    minWidth= fPreferenceStore.getInt(COLUMN_DESCRIPTION_WIDTH_PREF_ID);
    if (minWidth == 0) {
      minWidth= pixelConverter.convertWidthInCharsToPixels(45);
    }
    columnLayout.setColumnData(columnDescription, new ColumnPixelData(minWidth, false));
    columnDescription.addControlListener(new ControlListener() {
      public void controlMoved(ControlEvent e) {
      }

      public void controlResized(ControlEvent e) {
View Full Code Here

    Composite tableComposite = toolkit.createComposite(form.getBody());
    tableComposite.setLayout(new GridLayout());

    GridDataFactory.fillDefaults().grab(true, true).applyTo(tableComposite);

    final TreeColumnLayout layout = new TreeColumnLayout();

    FilteredTree filteredTree = new FilteredTree(tableComposite, SWT.NONE
        | SWT.BORDER | SWT.FULL_SELECTION, new PatternFilter(), true) {
      @Override
      protected void createControl(Composite composite, int treeStyle) {
View Full Code Here

        setControl(container);

        container.setLayout(new FillLayout());

        Composite treeComposite = new Composite(container, SWT.NONE);
        TreeColumnLayout layout = new TreeColumnLayout();
        treeComposite.setLayout(layout);
        treeViewer = new TreeViewer(treeComposite, SWT.BORDER | SWT.SINGLE);
        Tree tree = treeViewer.getTree();
        tree.setHeaderVisible(false);
        tree.setLinesVisible(true);

        TreeColumn column = new TreeColumn(tree, SWT.None);
        column.setText(Messages.ColumnDate);
        layout.setColumnData(column, new ColumnWeightData(100));

        treeViewer.setContentProvider(new ExportItemsContentProvider());
        treeViewer.setLabelProvider(new ExportItemsLabelProvider());
        treeViewer.setInput(client);
        treeViewer.setExpandedElements(new Object[] { AccountTransaction.class, PortfolioTransaction.class,
View Full Code Here

TOP

Related Classes of org.eclipse.jface.layout.TreeColumnLayout

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.