本文整理了Java中org.eclipse.swt.widgets.DateTime.isCalendar()
方法的一些代码示例,展示了DateTime.isCalendar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DateTime.isCalendar()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.DateTime
类名称:DateTime
方法名:isCalendar
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
boolean isValidTime (int fieldName, int value) {
Calendar validCalendar;
if (isCalendar ()) {
validCalendar = Calendar.getInstance ();
} else {
validCalendar = calendar;
}
int min = validCalendar.getActualMinimum (fieldName);
int max = validCalendar.getActualMaximum (fieldName);
return value >= min && value <= max;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
boolean isValidTime (int fieldName, int value) {
Calendar validCalendar;
if (isCalendar ()) {
validCalendar = Calendar.getInstance ();
} else {
validCalendar = calendar;
}
int min = validCalendar.getActualMinimum (fieldName);
int max = validCalendar.getActualMaximum (fieldName);
return value >= min && value <= max;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
boolean isValidTime (int fieldName, int value) {
Calendar validCalendar;
if (isCalendar ()) {
validCalendar = Calendar.getInstance ();
} else {
validCalendar = calendar;
}
int min = validCalendar.getActualMinimum (fieldName);
int max = validCalendar.getActualMaximum (fieldName);
return value >= min && value <= max;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
GdkColor getBackgroundColor () {
if (isCalendar ()) {
return getBaseColor ();
} else {
return super.getBackgroundColor ();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void createWidget (int index) {
super.createWidget (index);
if (isCalendar ()) {
getDate ();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void setBackgroundColor (GdkColor color) {
if (isCalendar () && !OS.GTK3) {
OS.gtk_widget_modify_base (containerHandle, 0, color);
} else {
if (isCalendar() && (OS.GTK_VERSION >= OS.VERSION(3, 16, 0))) {
super.setBackgroundColor (calendarHandle, color);
} else {
super.setBackgroundColor (color);
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void createWidget (int index) {
super.createWidget (index);
if (isCalendar ()) {
getDate ();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
void createWidget (int index) {
super.createWidget (index);
if (isCalendar ()) {
getDate ();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
void setBackgroundColor (GdkColor color) {
if (isCalendar () && !OS.GTK3) {
OS.gtk_widget_modify_base (containerHandle, 0, color);
} else {
if (isCalendar() && (OS.GTK_VERSION >= OS.VERSION(3, 16, 0))) {
super.setBackgroundColor (calendarHandle, color);
} else {
super.setBackgroundColor (color);
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void setBackgroundColor (GdkColor color) {
if (isCalendar () && !OS.GTK3) {
OS.gtk_widget_modify_base (containerHandle, 0, color);
} else {
if (isCalendar() && (OS.GTK_VERSION >= OS.VERSION(3, 16, 0))) {
super.setBackgroundColor (calendarHandle, color);
} else {
super.setBackgroundColor (color);
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
GdkColor getBackgroundColor () {
if (isCalendar ()) {
return getBaseColor ();
} else {
return super.getBackgroundColor ();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
GdkColor getBackgroundColor () {
if (isCalendar ()) {
return getBaseColor ();
} else {
return super.getBackgroundColor ();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
public void setBackground (Color color) {
super.setBackground (color);
if (!OS.GTK3) {
if ((isCalendar ()) && color == null) {
OS.gtk_widget_modify_base (containerHandle, 0, null);
}
}
bg = color;
if (popupCalendar != null) popupCalendar.setBackground (color);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
public void setBackground (Color color) {
super.setBackground (color);
if (!OS.GTK3) {
if ((isCalendar ()) && color == null) {
OS.gtk_widget_modify_base (containerHandle, 0, null);
}
}
bg = color;
if (popupCalendar != null) popupCalendar.setBackground (color);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
private long /*int*/ dateTimeHandle () {
if (isCalendar () && calendarHandle != 0) {
return calendarHandle;
} else if ((isDate () || isTime ()) && textEntryHandle != 0) {
return textEntryHandle;
} else {
return super.focusHandle ();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
private int /*long*/ dateTimeHandle () {
if (isCalendar () && calendarHandle != 0) {
return calendarHandle;
} else if ((isDate () || isTime ()) && textEntryHandle != 0) {
return textEntryHandle;
} else {
return super.focusHandle ();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
private int /*long*/ dateTimeHandle () {
if (isCalendar () && calendarHandle != 0) {
return calendarHandle;
} else if ((isDate () || isTime ()) && textEntryHandle != 0) {
return textEntryHandle;
} else {
return super.focusHandle ();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
public void setBackground (Color color) {
super.setBackground (color);
if (!OS.GTK3) {
if ((isCalendar ()) && color == null) {
OS.gtk_widget_modify_base (containerHandle, 0, null);
}
}
bg = color;
if (popupCalendar != null) popupCalendar.setBackground (color);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void hookEvents () {
super.hookEvents ();
if (isCalendar ()) {
hookEventsForCalendar ();
} else {
int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK;
OS.gtk_widget_add_events (textEntryHandle, eventMask);
if ((style & SWT.DROP_DOWN) == 0 ) {
hookEventsForDateTimeSpinner ();
}
if (OS.G_OBJECT_TYPE (textEntryHandle) == OS.GTK_TYPE_MENU ()) {
hookEventsForMenu ();
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
void hookEvents () {
super.hookEvents ();
if (isCalendar ()) {
hookEventsForCalendar ();
} else {
int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK;
OS.gtk_widget_add_events (textEntryHandle, eventMask);
if ((style & SWT.DROP_DOWN) == 0 ) {
hookEventsForDateTimeSpinner ();
}
if (OS.G_OBJECT_TYPE (textEntryHandle) == OS.GTK_TYPE_MENU ()) {
hookEventsForMenu ();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!