public void reload() { try { // Clear the hashtables... clear(); shell.setCursor( display.getSystemCursor( SWT.CURSOR_WAIT ) ); readFiles( ROOT ); shell.setCursor( null ); javaFiles = new Hashtable<String, String>( 500 ); refresh(); } catch ( Exception e ) { new ErrorDialog( shell, "Error loading data", "There was an unexpected error re-loading the data", e ); } }
public void reload() { try { shell.setCursor( display.getSystemCursor( SWT.CURSOR_WAIT ) ); readFiles(); shell.setCursor( null ); refresh(); } catch ( Exception e ) { new ErrorDialog( shell, "Error loading data", "There was an unexpected error re-loading the data", e ); } }
System.out.println( "Selected languages: " + languages.length ); shell.setCursor( display.getSystemCursor( SWT.CURSOR_WAIT ) );
Cursor findCursor () { Cursor cursor = super.findCursor (); if (cursor == null) { int cursorType = (style & SWT.HORIZONTAL) != 0 ? SWT.CURSOR_SIZENS : SWT.CURSOR_SIZEWE; cursor = display.getSystemCursor (cursorType); } return cursor; }
@Override protected void configureShell(Shell shell) { super.configureShell(shell); shell.setText(ProgressMessages.BlockedJobsDialog_BlockedTitle); shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT)); }
@Override protected void configureShell(final Shell shell) { super.configureShell(shell); shell.setText(JFaceResources.getString("ProgressMonitorDialog.title")); //$NON-NLS-1$ shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT)); // Add a listener to set the message properly when the dialog becomes // visible shell.addListener(SWT.Show, event -> shell.getDisplay().asyncExec(() -> setMessage(message, true))); }
private void setArrowCursor() { if (fOldCursor == null) { Display display = Display.getCurrent(); fOldCursor = fScrollable.getCursor(); Cursor arrowCursor = display.getSystemCursor(SWT.CURSOR_ARROW); fScrollable.setCursor(arrowCursor); } }
@Override public void dragEnter(MUIElement dragElement, DnDInfo info) { super.dragEnter(dragElement, info); dndManager.setCursor(Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND)); }
@Override public void dragLeave(MUIElement dragElement, DnDInfo info) { trimBar = null; side = null; dndManager.setCursor(Display.getCurrent().getSystemCursor(SWT.CURSOR_NO)); super.dragLeave(dragElement, info); }
@Override public void dragEnter(MUIElement dragElement, DnDInfo info) { super.dragEnter(dragElement, info); dndManager.setCursor(Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND)); }
@Override public void widgetDisposed(DisposeEvent e) { if (parentShell != null) { parentShell.setCursor(e.display.getSystemCursor(SWT.CURSOR_ARROW)); } if (browserFunction != null && !browserFunction.isDisposed()) { browserFunction.dispose(); } shell = null; } });
public static void restoreDefaultCursor(Control control) { Cursor defaultCursor = (Cursor) control.getData(DEFAULT_CURSOR); if (defaultCursor != null) { control.setCursor(defaultCursor.isDisposed() ? control.getDisplay() .getSystemCursor(SWT.ARROW) : defaultCursor); } } }
private Control createControl(Composite parent) { fStyledText= new StyledText(parent, SWT.FLAT | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); fStyledText.setEditable(false); Cursor arrowCursor= fStyledText.getDisplay().getSystemCursor(SWT.CURSOR_ARROW); fStyledText.setCursor(arrowCursor); // Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263 // fStyledText.setCaret(null); final GridData data= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); fStyledText.setLayoutData(data); configureStyledText(fText, fEnabled); return fStyledText; }
private Control createControl(Composite parent) { fStyledText= new StyledText(parent, SWT.FLAT | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); fStyledText.setEditable(false); Cursor arrowCursor= fStyledText.getDisplay().getSystemCursor(SWT.CURSOR_ARROW); fStyledText.setCursor(arrowCursor); // Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263 // fStyledText.setCaret(null); final GridData data= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); fStyledText.setLayoutData(data); configureStyledText(fText, fEnabled); return fStyledText; }
@Override public void runSupport() { Composite shell = skin.getShell(); Cursor cursor = shell.getCursor(); try { shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT)); swtSetActiveTab(newTab, evenIfSame); } finally { shell.setCursor(cursor); } } });
public MinimapWidget(Composite parent, ITextViewer viewer) { fEditorViewer = viewer; // Create minimap styled text fMinimapTextWidget = new StyledText(parent, SWT.MULTI | SWT.READ_ONLY); fMinimapTextWidget.setEditable(false); fMinimapTextWidget.setCursor(fMinimapTextWidget.getDisplay().getSystemCursor(SWT.CURSOR_ARROW)); // Initialize trackers fEditorTracker = new EditorTracker(); fMinimapTracker = new MinimapTracker(); }
private void createSectionToolbar(Section section, FormToolkit toolkit) { ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(section); final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND); toolbar.setCursor(handCursor); // Add sort action to the tool bar fSortAction = new SortAction(fImportViewer, PDEUIMessages.RequiresSection_sortAlpha, null, null, this); toolBarManager.add(fSortAction); toolBarManager.update(true); section.setTextClient(toolbar); }
@Override public void dragEnter(MUIElement dragElement, DnDInfo info) { super.dragEnter(dragElement, info); MTrimmedWindow window = (MTrimmedWindow) dndManager.getDragWindow(); trimBar = dndManager.getModelService().getTrim(window, side); trimBar.setToBeRendered(true); dragElement.setVisible(true); track(dragElement, info); dndManager.setCursor(Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND)); }
@Override public void dragEnter(MUIElement dragElement, DnDInfo info) { super.dragEnter(dragElement, info); MTrimmedWindow window = (MTrimmedWindow) dndManager.getDragWindow(); trimBar = dndManager.getModelService().getTrim(window, side); trimBar.setToBeRendered(true); dragElement.setVisible(true); track(dragElement, info); dndManager.setCursor(Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND)); }
private void createSectionToolbar(Section section, FormToolkit toolkit) { ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(section); final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND); toolbar.setCursor(handCursor); fNewPluginAction = new NewPluginAction(); fNewFragmentAction = new NewFragmentAction(); toolBarManager.add(fNewPluginAction); toolBarManager.add(fNewFragmentAction); toolBarManager.update(true); section.setTextClient(toolbar); }