Examples of ComboViewer


Examples of org.eclipse.jface.viewers.ComboViewer

    main.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    main.setLayout(new GridLayout(3, false));

    Label lbl = new Label(main, SWT.NONE);
    lbl.setText(Messages.SingleBandEditorPage_ThemingStyleLabel);
    cmbThemingStyle = new ComboViewer(main, SWT.DROP_DOWN | SWT.READ_ONLY);
    cmbThemingStyle.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, false,
        false, 2, 1));
    ((GridData)cmbThemingStyle.getControl().getLayoutData()).widthHint = 150;
    cmbThemingStyle.setContentProvider(ArrayContentProvider.getInstance());
    cmbThemingStyle.setInput(stylePanels);
View Full Code Here

Examples of org.eclipse.jface.viewers.ComboViewer

 
  }
 
 
  private ComboViewer createPaletteViewer(Composite parent) {
    ComboViewer thiscv = new ComboViewer(parent, SWT.DROP_DOWN
        | SWT.READ_ONLY);
    thiscv.getControl().setLayoutData(
        new GridData(SWT.FILL, SWT.FILL, false, false, 2, 1));
    ((GridData)thiscv.getControl().getLayoutData()).widthHint = 150;
    // list of matching palettes
    
   
    thiscv.setLabelProvider(new LabelProvider(){
     
      public String getText(Object element){
        if (element instanceof BrewerPalette){
          return brewerLblProvider.getText(element);
        }else if (element instanceof String){
          return (String)element;
        }else if (element instanceof PredefinedColorRule){
          return ((PredefinedColorRule) element).getName();
        }
        return super.getText(element);
      }
    });
    thiscv.setContentProvider(ArrayContentProvider.getInstance());
   
   
    return thiscv;

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.