本文整理了Java中org.eclipse.swt.widgets.DateTime.error()
方法的一些代码示例,展示了DateTime.error()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DateTime.error()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.DateTime
类名称:DateTime
方法名:error
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
@Override
protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
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);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
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);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
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);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
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);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
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);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
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);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
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);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
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);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
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);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
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);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
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);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
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);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
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]);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
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]);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
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]);
}
内容来源于网络,如有侵权,请联系作者删除!