1: 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.Shell; 4: ... 5: 6: private Control targetControl; 7: 8: ... 9: public SameShellProvider(Control targetControl) { 10: this.targetControl = targetControl; 11: ... 12: 13: return targetControl == null? null :targetControl.getShell();
1: import org.eclipse.swt.widgets.Composite; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.FileDialog; 4: ... 5: } 6: protected Object openDialogBox(Control cellEditorWindow) { 7: FileDialog dialog = 8: ... 9: new FileDialog(cellEditorWindow.getShell(), SWT.OPEN); 10: dialog.setFileName((String) getValue());
1: import org.eclipse.swt.widgets.Composite; 2: import org.eclipse.swt.widgets.Control; 3: 4: ... 5: 6: protected Object openDialogBox(Control cellEditorWindow) { 7: DescriptionEditorDialog dialog = new DescriptionEditorDialog( 8: ... 9: cellEditorWindow.getShell(), playlistModel); 10: dialog.create();
1: import org.eclipse.swt.graphics.Rectangle; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.Display; 4: ... 5: } 6: Control focus = display.getFocusControl(); 7: if (focus == null || focus.isDisposed()) { 8: ... 9: } 10: quickMenu = menu.createContextMenu(focus.getShell()); 11: Point location = computeMenuLocation(focus); 12: ... 13: 14: private Point computeMenuLocation(Control focus) {
1: 2: public void assignLayoutData(Control control, Properties attributes, Map<String, Control> siblings, Control[] siblingsList, int siblingsIndex) throws NAFException 3: { 4: ... 5: { 6: control.getShell().pack(); 7: } 8: { 9: switch(adjustWindowSize)
1: import org.eclipse.swt.graphics.Rectangle; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.Display; 4: ... 5: return; 6: Control focus= display.getFocusControl(); 7: if (focus == null || focus.isDisposed()) 8: ... 9: fillMenu(menu); 10: final Menu widget= menu.createContextMenu(focus.getShell()); 11: Point location= computeMenuLocation(focus, widget); 12: ... 13: 14: private Point computeMenuLocation(Control focus, Menu menu) {
1: import org.eclipse.swt.graphics.Rectangle; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.Display; 4: ... 5: } 6: Control focus = display.getFocusControl(); 7: if (focus == null || focus.isDisposed()) { 8: ... 9: fillMenu(menu); 10: final Menu widget = menu.createContextMenu(focus.getShell()); 11: Point location = computeMenuLocation(focus, widget); 12: ... 13: 14: private Point computeMenuLocation(Control focus, Menu menu) {
1: import org.eclipse.swt.widgets.Composite; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.Shell; 4: ... 5: private ListDialogField fVariablesList; 6: private Control fControl; 7: private CLabel fWarning; 8: ... 9: 10: public Control createContents(Composite parent) { 11: Composite composite= new Composite(parent, SWT.NONE); 12: ... 13: if (fControl != null) { 14: return fControl.getShell();
1: import org.eclipse.swt.widgets.Composite; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.Shell; 4: ... 5: 6: abstract public Control getControl(); 7: 8: ... 9: public Shell getShell() { 10: Control ctrl = getControl(); 11: if (!SwtUtil.isDisposed(ctrl)) { 12: ... 13: return ctrl.getShell();
1: import org.eclipse.swt.widgets.Composite; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.Display; 4: ... 5: 6: private Control fSWTControl; 7: 8: ... 9: 10: public Control getControl(Composite parent) { 11: PixelConverter converter= new PixelConverter(parent); 12: ... 13: if (fSWTControl != null) { 14: return fSWTControl.getShell();
1: import org.eclipse.swt.layout.GridLayout; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.Display; 4: ... 5: public void showContextInformation(final IContextInformation info, final int position) { 6: Control control= fViewer.getTextWidget(); 7: BusyIndicator.showWhile(control.getDisplay(), new Runnable() { 8: ... 9: 10: fContextInfoPopup= new Shell(control.getShell(), SWT.NO_TRIM | SWT.ON_TOP); 11: fContextInfoPopup.setBackground(display.getSystemColor(SWT.COLOR_BLACK)); 12: ... 13: Control control= fViewer.getTextWidget(); 14: fContextSelectorShell= new Shell(control.getShell(), SWT.NO_TRIM | SWT.ON_TOP);
1: import org.eclipse.swt.widgets.Composite; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.DirectoryDialog; 4: ... 5: 6: private Control fSWTWidget; 7: private Label fFullPathResolvedLabel; 8: ... 9: 10: public Control createControl(Composite parent) { 11: PixelConverter converter= new PixelConverter(parent); 12: ... 13: if (fSWTWidget != null) { 14: return fSWTWidget.getShell();
1: import org.eclipse.swt.widgets.Composite; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.Label; 4: ... 5: try { 6: Control c = fTab.getControl(); 7: if (!c.isDisposed()) 8: ... 9: return c.getShell(); 10: } catch (SWTException e) {
1: import org.eclipse.swt.layout.GridLayout; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.Display; 4: ... 5: public String showContextProposals(final boolean autoActivated) { 6: final Control control= fContentAssistSubjectControlAdapter.getControl(); 7: BusyIndicator.showWhile(control.getDisplay(), new Runnable() { 8: ... 9: 10: fContextInfoPopup= new Shell(control.getShell(), SWT.NO_TRIM | SWT.ON_TOP); 11: fContextInfoPopup.setBackground(display.getSystemColor(SWT.COLOR_BLACK)); 12: ... 13: Control control= fContentAssistSubjectControlAdapter.getControl(); 14: fContextSelectorShell= new Shell(control.getShell(), SWT.ON_TOP | SWT.RESIZE);
1: import org.eclipse.swt.layout.GridLayout; 2: import org.eclipse.swt.widgets.Control; 3: import org.eclipse.swt.widgets.Shell; 4: ... 5: 6: Control control= fViewer.getTextWidget(); 7: ... 8: fProposalShell= new Shell(control.getShell(), SWT.ON_TOP); 9: fProposalTable= new Table(fProposalShell, SWT.H_SCROLL | SWT.V_SCROLL);