1 11 package org.eclipse.ui.internal.forms.widgets; 12 13 import org.eclipse.swt.SWT; 14 import org.eclipse.swt.graphics.Cursor; 15 import org.eclipse.swt.widgets.Display; 16 17 26 public class FormsResources { 27 private static Cursor busyCursor; 28 private static Cursor handCursor; 29 private static Cursor textCursor; 30 31 public static Cursor getBusyCursor() { 32 if (busyCursor==null) 33 busyCursor = new Cursor(Display.getCurrent(), SWT.CURSOR_WAIT); 34 return busyCursor; 35 } 36 public static Cursor getHandCursor() { 37 if (handCursor==null) 38 handCursor = new Cursor(Display.getCurrent(), SWT.CURSOR_HAND); 39 return handCursor; 40 } 41 public static Cursor getTextCursor() { 42 if (textCursor==null) 43 textCursor = new Cursor(Display.getCurrent(), SWT.CURSOR_IBEAM); 44 return textCursor; 45 } 46 47 public static int getProgressDelay(int index) { 48 53 return 100; 54 } 55 56 public static void shutdown() { 57 if (busyCursor!=null) 58 busyCursor.dispose(); 59 if (handCursor!=null) 60 handCursor.dispose(); 61 if (textCursor!=null) 62 textCursor.dispose(); 63 busyCursor=null; 64 handCursor=null; 65 textCursor=null; 66 } 67 } 68 | Popular Tags |