List of usage examples for org.eclipse.jface.viewers ComboViewer getCombo
public Combo getCombo()
From source file:xml.project.app.ProjectAccessDialog.java
License:Open Source License
/** * Create contents of the dialog.// w w w. ja v a 2s. c o m * * @param parent */ @Override protected Control createDialogArea(Composite parent) { if (actionName.equals(ActionType.OPEN_FILE)) { area = (Composite) super.createDialogArea(parent); container = new Composite(area, SWT.NONE); container.setLayout(new GridLayout(2, false)); container.setLayoutData(new GridData(GridData.FILL_BOTH)); this.setTitle("XML-Editor"); this.setMessage("Load XML File"); { final Label lblProject = new Label(container, SWT.NONE); lblProject.setText("File Name"); ComboViewer comboViewer = new ComboViewer(container, SWT.READ_ONLY); combo = comboViewer.getCombo(); combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); loadFilesList(combo); } { final Label lblWorkspace = new Label(container, SWT.NONE); lblWorkspace.setText("Workspace"); txtWorkspacename = new Text(container, SWT.BORDER); txtWorkspacename.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW)); txtWorkspacename.setEditable(false); txtWorkspacename.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); txtWorkspacename.setText(pronetWorkspace.projectWorkspace().toString()); } } return area; }