/** * Returns the maximum value which the receiver will allow. * * @return the maximum * @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 int getMaximum() { checkWidget(); return maximum; }
/** * Returns the 'selection', which is the receiver's position. * * @return the selection * @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 int getSelection() { checkWidget(); return selection; }
/** * Returns the amount that the receiver's value will be modified by when the * up/down (or right/left) arrows are pressed. * * @return the increment * @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 int getIncrement() { checkWidget(); return increment; }
/** * Returns the minimum value which the receiver will allow. * * @return the minimum * @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 int getMinimum() { checkWidget(); return minimum; }
/** * Returns the amount that the receiver's value will be * modified by when the page increment/decrement areas * are selected. * * @return the page increment * * @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 int getPageIncrement () { checkWidget(); return pageIncrement; }
/** * Returns the amount that the receiver's value will be modified by when the * page increment/decrement areas are selected. * * @return the page increment * @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 int getPageIncrement() { checkWidget(); return pageIncrement; }
/** * Returns the minimum value which the receiver will allow. * * @return the minimum * * @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 int getMinimum () { checkWidget (); return (int)OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0); }
@Override Point computeSizeInPixels (int wHint, int hHint, boolean changed) { checkWidget(); if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; Point size = computeNativeSize(handle, wHint, hHint, changed); if ((style & SWT.HORIZONTAL) != 0) { if (wHint == SWT.DEFAULT) size.x = 2 * size.x; } else { if (hHint == SWT.DEFAULT) size.y = 2 * size.y; } return size; }
/** * Returns the maximum value which the receiver will allow. * * @return the maximum * * @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 int getMaximum () { checkWidget (); return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0); }
@Override Point computeSizeInPixels (int wHint, int hHint, boolean changed) { checkWidget(); if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; Point size = computeNativeSize(handle, wHint, hHint, changed); if ((style & SWT.HORIZONTAL) != 0) { if (wHint == SWT.DEFAULT) size.x = 2 * size.x; } else { if (hHint == SWT.DEFAULT) size.y = 2 * size.y; } return size; }
@Override Point computeSizeInPixels (int wHint, int hHint, boolean changed) { checkWidget(); if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; Point size = computeNativeSize(handle, wHint, hHint, changed); if ((style & SWT.HORIZONTAL) != 0) { if (wHint == SWT.DEFAULT) size.x = 2 * size.x; } else { if (hHint == SWT.DEFAULT) size.y = 2 * size.y; } return size; }
/** * Returns the 'selection', which is the receiver's position. * * @return the selection * * @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 int getSelection () { checkWidget (); return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0); }
/** * Returns the 'selection', which is the receiver's position. * * @return the selection * * @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 int getSelection () { checkWidget(); return (int)((NSSlider)view).doubleValue(); }
/** * Returns the minimum value which the receiver will allow. * * @return the minimum * * @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 int getMinimum () { checkWidget (); int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); return (int) OS.gtk_adjustment_get_lower (hAdjustment); }
/** * Returns the 'selection', which is the receiver's position. * * @return the selection * * @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 int getSelection () { checkWidget (); long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); return (int) OS.gtk_adjustment_get_value (hAdjustment); }
/** * Returns the minimum value which the receiver will allow. * * @return the minimum * * @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 int getMinimum () { checkWidget (); long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); return (int) OS.gtk_adjustment_get_lower (hAdjustment); }
/** * Returns the 'selection', which is the receiver's position. * * @return the selection * * @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 int getSelection () { checkWidget (); int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); return (int) OS.gtk_adjustment_get_value (hAdjustment); }
/** * Returns the maximum value which the receiver will allow. * * @return the maximum * * @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 int getMaximum () { checkWidget (); int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); return (int) OS.gtk_adjustment_get_upper (hAdjustment); }
/** * Returns the maximum value which the receiver will allow. * * @return the maximum * * @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 int getMaximum () { checkWidget (); long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); return (int) OS.gtk_adjustment_get_upper (hAdjustment); }
/** * Returns the amount that the receiver's value will be * modified by when the up/down (or right/left) arrows * are pressed. * * @return the increment * * @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 int getIncrement () { checkWidget (); long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle); return (int) OS.gtk_adjustment_get_step_increment (hAdjustment); }