Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.TableViewer


        GridData gd_tblRequired = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1);
        gd_tblRequired.minimumHeight = 50;
        gd_tblRequired.heightHint = 100;
        tblRequired.setLayoutData(gd_tblRequired);

        requiredViewer = new TableViewer(tblRequired);
        requiredViewer.setContentProvider(ArrayContentProvider.getInstance());
        requiredViewer.setLabelProvider(new ResourceLabelProvider());
        requiredViewer.setSorter(new BundleSorter());

        requiredViewer.addSelectionChangedListener(new ISelectionChangedListener() {
View Full Code Here


        Label lblDirect = new Label(container, SWT.NONE);
        lblDirect.setFont(JFaceResources.getBannerFont());
        lblDirect.setText("Direct Dependencies:");

        Table tblDirect = new Table(container, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER | SWT.V_SCROLL);
        viewerDirect = new TableViewer(tblDirect);
        viewerDirect.setContentProvider(ArrayContentProvider.getInstance());
        viewerDirect.setLabelProvider(new ResourceDescriptorLabelProvider());

        createHelpLabel(container, "The above dependencies will be added to the project and, if necessary, to the JPM4J local index.");
View Full Code Here

        removeItem.setDisabledImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE_DISABLED));
        removeItem.setToolTipText("Remove");
        removeItem.setEnabled(false);

        Table table = toolkit.createTable(composite, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);
        viewer = new TableViewer(table);
        viewer.setUseHashlookup(false);
        viewer.setContentProvider(new ArrayContentProvider());
        viewer.setLabelProvider(labelProvider);

        toolbar = new ToolBar(composite, SWT.FLAT | SWT.HORIZONTAL | SWT.RIGHT);
View Full Code Here

        fd_wCreate.bottom = new FormAttachment(100, -5);
        fd_wCreate.right = new FormAttachment(100, -4);
        wCreate.setLayoutData(fd_wCreate);
        wCreate.setText("Create bnd.bnd");

        final TableViewer tableViewer = new TableViewer(composite, SWT.BORDER);
        table = tableViewer.getTable();
        final FormData fd_table = new FormData();
        fd_table.top = new FormAttachment(0, 3);
        fd_table.left = new FormAttachment(0, 3);
        fd_table.right = new FormAttachment(100, -4);
        fd_table.bottom = new FormAttachment(100, -37);
        table.setLayoutData(fd_table);
        table.setLinesVisible(true);
        table.setHeaderVisible(true);

        final TableColumn wBsn = new TableColumn(table, SWT.NONE);
        wBsn.setWidth(200);
        wBsn.setText("Bundle Symbolic Name");

        final TableColumn wVersion = new TableColumn(table, SWT.NONE);
        wVersion.setWidth(100);
        wVersion.setText("Version");

        final TableColumn wOptions = new TableColumn(table, SWT.NONE);
        wOptions.setWidth(200);
        wOptions.setText("Options");

        final TableColumn wFile = new TableColumn(table, SWT.NONE);
        wFile.setWidth(100);
        wFile.setText("File");

        tableViewer.setContentProvider(new IStructuredContentProvider() {

            public Object[] getElements(Object inputElement) {
                if (model != null)
                    try {

                        return model.getBuildpath().toArray();
                    } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                return new Object[0];

            }

            public void dispose() {
                // TODO Auto-generated method stub

            }

            public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

            }

        });
        tableViewer.setLabelProvider(new ITableLabelProvider() {

            public Image getColumnImage(Object element, int columnIndex) {
                // TODO Auto-generated method stub
                return null;
            }

            public String getColumnText(Object element, int columnIndex) {
                Container c = (Container) element;
                switch (columnIndex) {
                case 0 :
                    return c.getBundleSymbolicName();
                case 1 :
                    return c.getVersion();
                case 2 :
                    return c.getError();
                case 3 :
                    return c.getFile() + " (" + (c.getFile() != null && c.getFile().exists() ? "exists" : "?") + ")";
                default :
                    break;
                }
                return null;
            }

            public void addListener(ILabelProviderListener listener) {
                // TODO Auto-generated method stub

            }

            public void dispose() {
                // TODO Auto-generated method stub

            }

            public boolean isLabelProperty(Object element, String property) {
                // TODO Auto-generated method stub
                return false;
            }

            public void removeListener(ILabelProviderListener listener) {
                // TODO Auto-generated method stub

            }

        });
        tableViewer.setInput(model);
        wCreate.addSelectionListener(new SelectionListener() {

            public void widgetDefaultSelected(SelectionEvent e) {
                System.out.println("defw selected");
            }

            public void widgetSelected(SelectionEvent e) {
                wCreate.setEnabled(!createBnd());
                tableViewer.setInput(model);
            }

        });
    }
View Full Code Here

    gd = new GridData(SWT.LEFT, SWT.TOP, false, false);
    label.setLayoutData(gd);
    label.setText("&Parameters:");


      propertiesViewer = new TableViewer(container, SWT.BORDER | SWT.FULL_SELECTION);
      propertiesTable = propertiesViewer.getTable();
      propertiesTable.setLinesVisible(true);
      propertiesTable.setHeaderVisible(true);
      propertiesTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 2));
     
View Full Code Here

        final GridData layoutData = new GridData(GridData.FILL_BOTH);
        layoutData.heightHint = 150;
        tableParent.setLayoutData(layoutData);
        TableColumnLayout tableLayout = new TableColumnLayout();
        tableParent.setLayout(tableLayout);
        viewer = new TableViewer(tableParent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER );
        viewer.getTable().setLinesVisible(true);
        viewer.getTable().setHeaderVisible(true);
       
        // accessing property here directly, instead of going via (JcrProperty)inputElement;
        String[] rawLines = property.getValuesAsString();
View Full Code Here

        gd.widthHint = 100;
        t.setLayoutData( gd );
        toolkit.paintBordersFor( client );

        // setup viewer
        viewer = new TableViewer( t );
        viewer.setContentProvider( getContentProvider() );
        viewer.setLabelProvider( getLabelProvider() );
        viewer.setSorter( getSorter() );
        viewer.addFilter( getFilter() );
    }
View Full Code Here

        gl.marginHeight = gl.marginWidth = 0;
        entryEditorsComposite.setLayout( gl );
        entryEditorsComposite.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );

        // SchemaConnectors TableViewer
        entryEditorsTableViewer = new TableViewer( entryEditorsComposite, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION );
        GridData gridData = new GridData( SWT.FILL, SWT.NONE, true, false, 1, 3 );
        gridData.heightHint = 125;
        entryEditorsTableViewer.getTable().setLayoutData( gridData );
        entryEditorsTableViewer.setContentProvider( new ArrayContentProvider() );
        entryEditorsTableViewer.setLabelProvider( new LabelProvider()
View Full Code Here

    public SearchResultEditorActionGroup( SearchResultEditor searchResultEditor )
    {
        this.searchResultEditor = searchResultEditor;
        searchResultEditorActionMap = new HashMap<String, SearchResultEditorActionProxy>();

        TableViewer viewer = searchResultEditor.getMainWidget().getViewer();
        SearchResultEditorCursor cursor = searchResultEditor.getConfiguration().getCursor( viewer );
        ValueEditorManager valueEditorManager = searchResultEditor.getConfiguration().getValueEditorManager( viewer );

        showDNAction = new ShowDNAction();
        showLinksAction = new ShowLinksAction();
View Full Code Here

        col.setWidth(300);
        col = new TableColumn(table, SWT.NONE);
        col.setText("Bundle Name/Version");
        col.setWidth(300);

        viewer = new TableViewer(table);
        viewer.setContentProvider(new ArrayContentProvider());
        viewer.setLabelProvider(new StyledCellLabelProvider() {
            @Override
            public void update(ViewerCell cell) {
                File file = (File) cell.getElement();
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.TableViewer

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.