public Control [] getChildren () { checkWidget(); return new Control [0]; }
/** * Returns the minimum value which the receiver will allow or null if no minimum limit is applied. * * @return the minimum value * @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> * @since 3.2 */ public Date getMinimum() { checkWidget(); return minimum == null ? null : ( Date )minimum.clone(); }
void selectAll () { checkWidget (); if (textEntryHandle != 0) OS.gtk_editable_select_region (textEntryHandle, 0, -1); }
void selectAll () { checkWidget (); if (textEntryHandle != 0) OS.gtk_editable_select_region (textEntryHandle, 0, -1); }
void selectAll () { checkWidget (); if (textEntryHandle != 0) OS.gtk_editable_select_region (textEntryHandle, 0, -1); }
String getText (int start, int end) { checkWidget (); if (!(start <= end && 0 <= end)) return ""; String str = getText (); int length = str.length (); end = Math.min (end, length - 1); if (start > end) return ""; start = Math.max (0, start); /* * NOTE: The current implementation uses substring () * which can reference a potentially large character * array. */ return str.substring (start, end + 1); }
String getText (int start, int end) { checkWidget (); if (!(start <= end && 0 <= end)) return ""; String str = getText (); int length = str.length (); end = Math.min (end, length - 1); if (start > end) return ""; start = Math.max (0, start); /* * NOTE: The current implementation uses substring () * which can reference a potentially large character * array. */ return str.substring (start, end + 1); }
/** * Returns the receiver's seconds. * <p> * Seconds is an integer between 0 and 59. * </p> * * @return an integer between 0 and 59 * * @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 getSeconds () { checkWidget (); return (int)/*64*/getCalendarDate().secondOfMinute(); }
/** * Returns the receiver's date, or day of the month. * <p> * The first day of the month is 1, and the last day depends on the month and year. * </p> * * @return a positive integer beginning with 1 * * @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 getDay () { checkWidget (); return (int)/*64*/getCalendarDate().dayOfMonth(); }
/** * Returns the receiver's hours. * <p> * Hours is an integer between 0 and 23. * </p> * * @return an integer between 0 and 23 * * @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 getHours () { checkWidget (); return (int)/*64*/getCalendarDate().hourOfDay(); }
/** * Returns the receiver's year. * <p> * The first year is 1752 and the last year is 9999. * </p> * * @return an integer between 1752 and 9999 * * @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 getYear () { checkWidget (); return (int)/*64*/getCalendarDate().yearOfCommonEra(); }
/** returns selected text **/ Point getSelection () { checkWidget (); Point selection; int [] start = new int [1]; int [] end = new int [1]; OS.gtk_editable_get_selection_bounds (textEntryHandle, start, end); int /*long*/ ptr = OS.gtk_entry_get_text (textEntryHandle); start[0] = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start[0]); end[0] = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end[0]); selection = new Point (start [0], end [0]); return selection; }
/** returns selected text **/ Point getSelection () { checkWidget (); Point selection; int [] start = new int [1]; int [] end = new int [1]; OS.gtk_editable_get_selection_bounds (textEntryHandle, start, end); long /*int*/ ptr = OS.gtk_entry_get_text (textEntryHandle); start[0] = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start[0]); end[0] = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end[0]); selection = new Point (start [0], end [0]); return selection; }
/** returns selected text **/ Point getSelection () { checkWidget (); Point selection; int [] start = new int [1]; int [] end = new int [1]; OS.gtk_editable_get_selection_bounds (textEntryHandle, start, end); int /*long*/ ptr = OS.gtk_entry_get_text (textEntryHandle); start[0] = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, start[0]); end[0] = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, end[0]); selection = new Point (start [0], end [0]); return selection; }
void setSelection (int start, int end) { checkWidget (); long /*int*/ ptr = OS.gtk_entry_get_text (textEntryHandle); start = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, start); end = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, end); OS.gtk_editable_set_position (textEntryHandle, start); OS.gtk_editable_select_region (textEntryHandle, start, end); }
void setSelection (int start, int end) { checkWidget (); int /*long*/ ptr = OS.gtk_entry_get_text (textEntryHandle); start = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, start); end = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, end); OS.gtk_editable_set_position (textEntryHandle, start); OS.gtk_editable_select_region (textEntryHandle, start, end); }
void setSelection (int start, int end) { checkWidget (); int /*long*/ ptr = OS.gtk_entry_get_text (textEntryHandle); start = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, start); end = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, end); OS.gtk_editable_set_position (textEntryHandle, start); OS.gtk_editable_select_region (textEntryHandle, start, end); }
void replaceCurrentlySelectedTextRegion (String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); byte [] buffer = Converter.wcsToMbcs (null, string, false); int [] start = new int [1], end = new int [1]; OS.gtk_editable_get_selection_bounds (textEntryHandle, start, end); OS.gtk_editable_delete_selection (textEntryHandle); OS.gtk_editable_insert_text (textEntryHandle, buffer, buffer.length, start); OS.gtk_editable_set_position (textEntryHandle, start [0]); }
void replaceCurrentlySelectedTextRegion (String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); byte [] buffer = Converter.wcsToMbcs (null, string, false); int [] start = new int [1], end = new int [1]; OS.gtk_editable_get_selection_bounds (textEntryHandle, start, end); OS.gtk_editable_delete_selection (textEntryHandle); OS.gtk_editable_insert_text (textEntryHandle, buffer, buffer.length, start); OS.gtk_editable_set_position (textEntryHandle, start [0]); }
void replaceCurrentlySelectedTextRegion (String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); byte [] buffer = Converter.wcsToMbcs (null, string, false); int [] start = new int [1], end = new int [1]; OS.gtk_editable_get_selection_bounds (textEntryHandle, start, end); OS.gtk_editable_delete_selection (textEntryHandle); OS.gtk_editable_insert_text (textEntryHandle, buffer, buffer.length, start); OS.gtk_editable_set_position (textEntryHandle, start [0]); }