Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 278438
Collapse All | Expand All

(-)src/org/eclipse/rwt/graphics/Graphics.java (+2 lines)
Lines 154-159 Link Here
154
   * @see SWT#CURSOR_HAND
154
   * @see SWT#CURSOR_HAND
155
   * 
155
   * 
156
   * @since 1.2
156
   * @since 1.2
157
   * @deprecated use {@link org.eclipse.swt.widgets.Display#getSystemCursor(int) 
158
   * Display#getSystemCursor(int)}
157
   */
159
   */
158
  public static Cursor getCursor( final int style ) {
160
  public static Cursor getCursor( final int style ) {
159
    return ResourceFactory.getCursor( style );
161
    return ResourceFactory.getCursor( style );
(-)src/org/eclipse/swt/internal/graphics/ResourceFactory.java (-2 / +2 lines)
Lines 215-221 Link Here
215
    return result;
215
    return result;
216
  }
216
  }
217
217
218
  ////////
218
  ///////////
219
  // Cursors
219
  // Cursors
220
220
221
  public static Cursor getCursor( final int style ) {
221
  public static Cursor getCursor( final int style ) {
Lines 301-307 Link Here
301
    //                It would be nice to find a solution without reading the
301
    //                It would be nice to find a solution without reading the
302
    //                stream twice.
302
    //                stream twice.
303
303
304
    IResourceManager manager = ResourceManager.getInstance();
305
    BufferedInputStream bis = new BufferedInputStream( inputStream );
304
    BufferedInputStream bis = new BufferedInputStream( inputStream );
306
    bis.mark( Integer.MAX_VALUE );
305
    bis.mark( Integer.MAX_VALUE );
307
    Point size = readImageSize( bis );
306
    Point size = readImageSize( bis );
Lines 317-322 Link Here
317
      String msg = MessageFormat.format( txt, new Object[] { path } );
316
      String msg = MessageFormat.format( txt, new Object[] { path } );
318
      throw new RuntimeException( msg, shouldNotHappen );
317
      throw new RuntimeException( msg, shouldNotHappen );
319
    }
318
    }
319
    IResourceManager manager = ResourceManager.getInstance();
320
    manager.register( path, bis );
320
    manager.register( path, bis );
321
321
322
    ////////////////////////////////////////////////////////////////////////////
322
    ////////////////////////////////////////////////////////////////////////////
(-)src/org/eclipse/swt/widgets/Display.java (+43 lines)
Lines 34-39 Link Here
34
import org.eclipse.swt.events.FocusEvent;
34
import org.eclipse.swt.events.FocusEvent;
35
import org.eclipse.swt.events.ShellEvent;
35
import org.eclipse.swt.events.ShellEvent;
36
import org.eclipse.swt.graphics.*;
36
import org.eclipse.swt.graphics.*;
37
import org.eclipse.swt.internal.graphics.ResourceFactory;
37
import org.eclipse.swt.internal.widgets.IDisplayAdapter;
38
import org.eclipse.swt.internal.widgets.IDisplayAdapter;
38
import org.eclipse.swt.internal.widgets.WidgetAdapter;
39
import org.eclipse.swt.internal.widgets.WidgetAdapter;
39
import org.eclipse.swt.internal.widgets.IDisplayAdapter.IFilterEntry;
40
import org.eclipse.swt.internal.widgets.IDisplayAdapter.IFilterEntry;
Lines 1017-1022 Link Here
1017
  }
1018
  }
1018
1019
1019
  /**
1020
  /**
1021
   * Returns the matching standard platform cursor for the given
1022
   * constant, which should be one of the cursor constants
1023
   * specified in class <code>SWT</code>. This cursor should
1024
   * not be free'd because it was allocated by the system,
1025
   * not the application.  A value of <code>null</code> will
1026
   * be returned if the supplied constant is not an SWT cursor
1027
   * constant. 
1028
   *
1029
   * @param id the SWT cursor constant
1030
   * @return the corresponding cursor or <code>null</code>
1031
   *
1032
   * @exception SWTException <ul>
1033
   *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
1034
   *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
1035
   * </ul>
1036
   *
1037
   * @see SWT#CURSOR_ARROW
1038
   * @see SWT#CURSOR_WAIT
1039
   * @see SWT#CURSOR_CROSS
1040
   * @see SWT#CURSOR_HELP
1041
   * @see SWT#CURSOR_SIZEALL
1042
   * @see SWT#CURSOR_SIZENS
1043
   * @see SWT#CURSOR_SIZEWE
1044
   * @see SWT#CURSOR_SIZEN
1045
   * @see SWT#CURSOR_SIZES
1046
   * @see SWT#CURSOR_SIZEE
1047
   * @see SWT#CURSOR_SIZEW
1048
   * @see SWT#CURSOR_SIZENE
1049
   * @see SWT#CURSOR_SIZESE
1050
   * @see SWT#CURSOR_SIZESW
1051
   * @see SWT#CURSOR_SIZENW
1052
   * @see SWT#CURSOR_IBEAM
1053
   * @see SWT#CURSOR_HAND
1054
   * 
1055
   * @since 1.3
1056
   */
1057
  public Cursor getSystemCursor( final int id ) {
1058
    checkDevice();
1059
    return ResourceFactory.getCursor( id );
1060
  }
1061
1062
  /**
1020
   * Returns the longest duration, in milliseconds, between
1063
   * Returns the longest duration, in milliseconds, between
1021
   * two mouse button clicks that will be considered a
1064
   * two mouse button clicks that will be considered a
1022
   * <em>double click</em> <!-- by the underlying operating system -->.
1065
   * <em>double click</em> <!-- by the underlying operating system -->.

Return to bug 278438