@Override protected void checkSubclass () { if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS); }
@Override protected void checkSubclass () { if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS); }
protected void checkSubclass () { if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS); }
@Override protected void checkSubclass () { if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS); }
@Override protected void checkSubclass () { if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS); }
private void createHandleForFixed () { fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_widget_set_has_window (fixedHandle, true); }
private void createHandleForFixed () { fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_widget_set_has_window (fixedHandle, true); }
private void createHandleForFixed () { fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_widget_set_has_window (fixedHandle, true); }
private void createHandleForDateWithDropDown () { //Create box to put entry and button into box. containerHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0); if (containerHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, containerHandle); //Create entry textEntryHandle = OS.gtk_entry_new (); if (textEntryHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (containerHandle, textEntryHandle); OS.gtk_widget_show (containerHandle); OS.gtk_widget_show (textEntryHandle); handle = containerHandle; if (handle == 0) error (SWT.ERROR_NO_HANDLES); // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked, // reset to default font to get the usual behavior if (OS.GTK3) { setFontDescription (defaultFont ().handle); } }
private void createHandleForDateWithDropDown () { //Create box to put entry and button into box. containerHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0); if (containerHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, containerHandle); //Create entry textEntryHandle = OS.gtk_entry_new (); if (textEntryHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (containerHandle, textEntryHandle); OS.gtk_widget_show (containerHandle); OS.gtk_widget_show (textEntryHandle); handle = containerHandle; if (handle == 0) error (SWT.ERROR_NO_HANDLES); // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked, // reset to default font to get the usual behavior if (OS.GTK3) { setFontDescription (defaultFont ().handle); } }
private void createHandleForDateWithDropDown () { //Create box to put entry and button into box. containerHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0); if (containerHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, containerHandle); //Create entry textEntryHandle = OS.gtk_entry_new (); if (textEntryHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (containerHandle, textEntryHandle); OS.gtk_widget_show (containerHandle); OS.gtk_widget_show (textEntryHandle); handle = containerHandle; if (handle == 0) error (SWT.ERROR_NO_HANDLES); // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked, // reset to default font to get the usual behavior if (OS.GTK3) { setFontDescription (defaultFont ().handle); } }
private void createHandleForCalendar () { calendarHandle = OS.gtk_calendar_new (); if (calendarHandle == 0) error (SWT.ERROR_NO_HANDLES); //Calenadar becomes container in this case. handle = calendarHandle; containerHandle = calendarHandle; OS.gtk_container_add (fixedHandle, calendarHandle); OS.gtk_calendar_set_display_options (calendarHandle, OS.GTK_CALENDAR_SHOW_HEADING | OS.GTK_CALENDAR_SHOW_DAY_NAMES); OS.gtk_widget_show (calendarHandle); }
private void createHandleForCalendar () { calendarHandle = OS.gtk_calendar_new (); if (calendarHandle == 0) error (SWT.ERROR_NO_HANDLES); //Calenadar becomes container in this case. handle = calendarHandle; containerHandle = calendarHandle; OS.gtk_container_add (fixedHandle, calendarHandle); OS.gtk_calendar_set_display_options (calendarHandle, OS.GTK_CALENDAR_SHOW_HEADING | OS.GTK_CALENDAR_SHOW_DAY_NAMES); OS.gtk_widget_show (calendarHandle); }
private void createHandleForCalendar () { calendarHandle = OS.gtk_calendar_new (); if (calendarHandle == 0) error (SWT.ERROR_NO_HANDLES); //Calenadar becomes container in this case. handle = calendarHandle; containerHandle = calendarHandle; OS.gtk_container_add (fixedHandle, calendarHandle); OS.gtk_calendar_set_display_options (calendarHandle, OS.GTK_CALENDAR_SHOW_HEADING | OS.GTK_CALENDAR_SHOW_DAY_NAMES); OS.gtk_widget_show (calendarHandle); }
private void createHandleForDateTime () { int /*long*/ adjusment = OS.gtk_adjustment_new (0, -9999, 9999, 1, 0, 0); textEntryHandle = OS.gtk_spin_button_new (adjusment, 1, 0); if (textEntryHandle == 0) error (SWT.ERROR_NO_HANDLES); //in this case,the Entry becomes the container. handle = textEntryHandle; containerHandle = textEntryHandle; OS.gtk_spin_button_set_numeric (textEntryHandle, false); OS.gtk_container_add (fixedHandle, textEntryHandle); OS.gtk_spin_button_set_wrap (textEntryHandle, (style & SWT.WRAP) != 0); }
private void createHandleForDateTime () { long /*int*/ adjusment = OS.gtk_adjustment_new (0, -9999, 9999, 1, 0, 0); textEntryHandle = OS.gtk_spin_button_new (adjusment, 1, 0); if (textEntryHandle == 0) error (SWT.ERROR_NO_HANDLES); //in this case,the Entry becomes the container. handle = textEntryHandle; containerHandle = textEntryHandle; OS.gtk_spin_button_set_numeric (textEntryHandle, false); OS.gtk_container_add (fixedHandle, textEntryHandle); OS.gtk_spin_button_set_wrap (textEntryHandle, (style & SWT.WRAP) != 0); }
private void createHandleForDateTime () { int /*long*/ adjusment = OS.gtk_adjustment_new (0, -9999, 9999, 1, 0, 0); textEntryHandle = OS.gtk_spin_button_new (adjusment, 1, 0); if (textEntryHandle == 0) error (SWT.ERROR_NO_HANDLES); //in this case,the Entry becomes the container. handle = textEntryHandle; containerHandle = textEntryHandle; OS.gtk_spin_button_set_numeric (textEntryHandle, false); OS.gtk_container_add (fixedHandle, textEntryHandle); OS.gtk_spin_button_set_wrap (textEntryHandle, (style & SWT.WRAP) != 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]); }
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]); }