if ( ( (Cursor) object ).isDisposed() ) { return;
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString () { if (isDisposed()) return "Cursor {*DISPOSED*}"; return "Cursor {" + handle + "}"; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ public String toString () { if (isDisposed()) return "Cursor {*DISPOSED*}"; return "Cursor {" + handle + "}"; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString () { if (isDisposed()) return "Cursor {*DISPOSED*}"; return "Cursor {" + handle + "}"; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString () { if (isDisposed()) return "Cursor {*DISPOSED*}"; return "Cursor {" + handle + "}"; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString () { if (isDisposed()) return "Cursor {*DISPOSED*}"; return "Cursor {" + handle + "}"; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString () { String result; if (isDisposed()) { result = "Cursor {*DISPOSED*}"; } else { result = "Cursor {" + value + "}"; } return result; }
public void setCursor(Cursor cursor) { if (isDisposed() || cursor == null || cursor.isDisposed()) { return; } label.setCursor(cursor); }
protected boolean isDisposed(Object resource) { if (resource instanceof Color) { return ((Color) resource).isDisposed(); } else if (resource instanceof Font) { return ((Font) resource).isDisposed(); } else if (resource instanceof Image) { return ((Image) resource).isDisposed(); } else if (resource instanceof Cursor) { return ((Cursor) resource).isDisposed(); } return false; }
protected boolean isDisposed(Object resource) { if (resource instanceof Color) { return ((Color) resource).isDisposed(); } else if (resource instanceof Font) { return ((Font) resource).isDisposed(); } else if (resource instanceof Image) { return ((Image) resource).isDisposed(); } else if (resource instanceof Cursor) { return ((Cursor) resource).isDisposed(); } return false; } }
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); } } }
/** * Sets the receiver's cursor to the cursor specified by the * argument, or to the default cursor for that kind of control * if the argument is null. * <p> * When the mouse pointer passes over a control its appearance * is changed to match the control's cursor. * </p> * * @param cursor the new cursor (or null) * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setCursor (Cursor cursor) { checkWidget(); if (cursor != null && cursor.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; setCursor (cursor != null ? cursor.handle : 0); }
/** * Sets the receiver's cursor to the cursor specified by the * argument, or to the default cursor for that kind of control * if the argument is null. * <p> * When the mouse pointer passes over a control its appearance * is changed to match the control's cursor. * </p> * * @param cursor the new cursor (or null) * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setCursor (Cursor cursor) { checkWidget(); if (cursor != null && cursor.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; setCursor (cursor != null ? cursor.handle : 0); }
/** * Sets the receiver's cursor to the cursor specified by the * argument, or to the default cursor for that kind of control * if the argument is null. * <p> * When the mouse pointer passes over a control its appearance * is changed to match the control's cursor. * </p> * * @param cursor the new cursor (or null) * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setCursor (Cursor cursor) { checkWidget(); if (cursor != null && cursor.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; setCursor (cursor != null ? cursor.handle : 0); }
/** * Sets the receiver's cursor to the cursor specified by the * argument. Overridden to handle the null case since the * StyledText widget uses an ibeam as its default cursor. * * @see Control#setCursor(Cursor) */ public void setCursor (Cursor cursor) { checkWidget(); if (cursor != null && cursor.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; if (cursor == null) { Display display = getDisplay(); int type = blockSelection ? SWT.CURSOR_CROSS : SWT.CURSOR_IBEAM; super.setCursor(display.getSystemCursor(type)); } else { super.setCursor(cursor); } } /**
/** * Sets the receiver's cursor to the cursor specified by the * argument. Overridden to handle the null case since the * StyledText widget uses an ibeam as its default cursor. * * @see Control#setCursor(Cursor) */ @Override public void setCursor (Cursor cursor) { checkWidget(); if (cursor != null && cursor.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; if (cursor == null) { Display display = getDisplay(); int type = blockSelection ? SWT.CURSOR_CROSS : SWT.CURSOR_IBEAM; super.setCursor(display.getSystemCursor(type)); } else { super.setCursor(cursor); } } /**
/** * Sets the receiver's cursor to the cursor specified by the * argument. Overridden to handle the null case since the * StyledText widget uses an ibeam as its default cursor. * * @see Control#setCursor(Cursor) */ @Override public void setCursor (Cursor cursor) { checkWidget(); if (cursor != null && cursor.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; if (cursor == null) { Display display = getDisplay(); int type = blockSelection ? SWT.CURSOR_CROSS : SWT.CURSOR_IBEAM; super.setCursor(display.getSystemCursor(type)); } else { super.setCursor(cursor); } } /**
/** * Sets the receiver's cursor to the cursor specified by the * argument. Overridden to handle the null case since the * StyledText widget uses an ibeam as its default cursor. * * @see Control#setCursor(Cursor) */ @Override public void setCursor (Cursor cursor) { checkWidget(); if (cursor != null && cursor.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; if (cursor == null) { Display display = getDisplay(); int type = blockSelection ? SWT.CURSOR_CROSS : SWT.CURSOR_IBEAM; super.setCursor(display.getSystemCursor(type)); } else { super.setCursor(cursor); } } /**
/** * Sets the receiver's cursor to the cursor specified by the * argument. Overridden to handle the null case since the * StyledText widget uses an ibeam as its default cursor. * * @see Control#setCursor(Cursor) */ @Override public void setCursor (Cursor cursor) { checkWidget(); if (cursor != null && cursor.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; if (cursor == null) { Display display = getDisplay(); int type = blockSelection ? SWT.CURSOR_CROSS : SWT.CURSOR_IBEAM; super.setCursor(display.getSystemCursor(type)); } else { super.setCursor(cursor); } } /**
/** * Sets the receiver's cursor to the cursor specified by the * argument, or to the default cursor for that kind of control * if the argument is null. * <p> * When the mouse pointer passes over a control its appearance * is changed to match the control's cursor. * </p> * * @param cursor the new cursor (or null) * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setCursor (Cursor cursor) { checkWidget(); if (cursor != null && cursor.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; if (!isEnabled()) return; if (!view.window().areCursorRectsEnabled()) return; display.setCursor (display.currentControl); }