Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.CellLabelProvider


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

    /* Label Provider */
    fViewer.setLabelProvider(new CellLabelProvider() {
      @Override
      public void update(ViewerCell cell) {
        ILabel label = (ILabel) cell.getElement();

        /* Text */
 
View Full Code Here


    });

    /* Label Provider */
    final RGB listBackground = fViewer.getControl().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB();
    final RGB listSelectionBackground = fViewer.getControl().getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION).getRGB();
    fViewer.setLabelProvider(new CellLabelProvider() {
      @Override
      public void update(ViewerCell cell) {
        ILabel label = (ILabel) cell.getElement();

        /* Text */
 
View Full Code Here

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

    /* Label Provider */
    fViewer.setLabelProvider(new CellLabelProvider() {
      @Override
      public void update(ViewerCell cell) {
        CredentialsModelData data = (CredentialsModelData) cell.getElement();

        switch (cell.getColumnIndex()) {
View Full Code Here

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

    /* Label Provider */
    fItemViewer.setLabelProvider(new CellLabelProvider() {
      @Override
      public void update(ViewerCell cell) {
        CoolBarItem item = ((ToolBarItem) cell.getElement()).item;
        cell.setText(item.getName());

View Full Code Here

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

    /* Label Provider */
    fViewer.setLabelProvider(new CellLabelProvider() {
      @Override
      public void update(ViewerCell cell) {
        ISearchFilter filter = (ISearchFilter) cell.getElement();
        Display display = fViewer.getControl().getDisplay();
        if (filter.isEnabled())
View Full Code Here

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

    /* Label Provider */
    fViewer.setLabelProvider(new CellLabelProvider() {
      @Override
      public void update(ViewerCell cell) {
        ShareProvider provider = (ShareProvider) cell.getElement();
        cell.setText(provider.getName());
        if (StringUtils.isSet(provider.getIconPath()))
View Full Code Here

        TableViewerColumn column0 = new TableViewerColumn(viewer, SWT.NONE);
        column0.getColumn().setText("Type");
        column0.getColumn().setResizable(true);
        column0.getColumn().setWidth(100);
        tableLayout.setColumnData(column0.getColumn(), new ColumnWeightData(20, 100));
        column0.setLabelProvider(new CellLabelProvider() {
           
            @Override
            public void update(ViewerCell cell) {
                try{
                    cell.setText(property.getTypeAsString());
                    cell.setForeground(greyColor);
                } catch(Exception e) {
                    cell.setText("n/a");
                    cell.setForeground(greyColor);
                }
            }
        });

        TableViewerColumn column1 = new TableViewerColumn(viewer, SWT.NONE);
        column1.getColumn().setText("Value");
        column1.getColumn().setResizable(true);
        column1.getColumn().setWidth(200);
        tableLayout.setColumnData(column1.getColumn(), new ColumnWeightData(80, 200));

        column1.setLabelProvider(new CellLabelProvider() {
           
            @Override
            public void update(ViewerCell cell) {
                Line line = (Line) cell.getElement();
                cell.setText(line.getValue());
View Full Code Here

                    deleteAction.setEnabled(false);
                }
            }
        });
   
    CellLabelProvider clp = new JcrCellLabelProvider(viewer);

    TableViewerColumn column0 = new TableViewerColumn(viewer, SWT.NONE);
    column0.getColumn().setText("Name");
    column0.getColumn().setResizable(true);
    column0.getColumn().setWidth(200);
View Full Code Here

   * Return the label provider for the status list.
   *
   * @return CellLabelProvider
   */
  private CellLabelProvider getStatusListLabelProvider() {
    return new CellLabelProvider() {
      /*
       * (non-Javadoc)
       *
       * @see org.eclipse.jface.viewers.CellLabelProvider#update(org.eclipse.jface.viewers.ViewerCell)
       */
 
View Full Code Here

    mTypeList.getTable().setHeaderVisible(true);

    TableViewerColumn typeColumn = new TableViewerColumn(mTypeList, SWT.LEFT);
    typeColumn.getColumn().setText("Type");
    typeColumn.getColumn().setWidth(250);
    typeColumn.setLabelProvider(new CellLabelProvider(){
      @Override
      public void update(ViewerCell cell) {

        Type type = (Type) cell.getElement();

        cell.setText(type.getName());
      }});

    TableViewerColumn layerColumn = new TableViewerColumn(mTypeList, SWT.LEFT);
    layerColumn.getColumn().setText("Layer");
    layerColumn.getColumn().setWidth(50);

    layerColumn.setLabelProvider(new CellLabelProvider() {

      @Override
      public void update(ViewerCell cell) {

        Type type = (Type) cell.getElement();
View Full Code Here

TOP

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

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.