本文整理了Java中org.eclipse.swt.widgets.DateTime.setBackground()
方法的一些代码示例,展示了DateTime.setBackground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DateTime.setBackground()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.DateTime
类名称:DateTime
方法名:setBackground
暂无
代码示例来源: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.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
void createPopupShell (int year, int month, int day) {
popupShell = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
popupCalendar = new DateTime (popupShell, SWT.CALENDAR);
if (font != null) popupCalendar.setFont (font);
if (fg != null) popupCalendar.setForeground (fg);
if (bg != null) popupCalendar.setBackground (bg);
mouseEventListener = new Listener () {
@Override
public void handleEvent (Event event) {
if (event.widget instanceof Control) {
Control c = (Control)event.widget;
if (c != down && c.getShell () != popupShell)
dropDownCalendar (false);
}
}
};
int [] listeners = {SWT.Close, SWT.MouseUp, SWT.Paint};
for (int i=0; i < listeners.length; i++) {
popupShell.addListener (listeners [i], popupListener);
}
listeners = new int [] {SWT.MouseDown, SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
for (int i=0; i < listeners.length; i++) {
popupCalendar.addListener (listeners [i], popupListener);
}
addListener (SWT.Dispose, popupListener);
if (year != -1) popupCalendar.setDate (year, month, day);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void createPopupShell (int year, int month, int day) {
popupShell = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
popupCalendar = new DateTime (popupShell, SWT.CALENDAR);
if (font != null) popupCalendar.setFont (font);
if (fg != null) popupCalendar.setForeground (fg);
if (bg != null) popupCalendar.setBackground (bg);
mouseEventListener = new Listener () {
@Override
public void handleEvent (Event event) {
if (event.widget instanceof Control) {
Control c = (Control)event.widget;
if (c != down && c.getShell () != popupShell)
dropDownCalendar (false);
}
}
};
int [] listeners = {SWT.Close, SWT.MouseUp, SWT.Paint};
for (int i=0; i < listeners.length; i++) {
popupShell.addListener (listeners [i], popupListener);
}
listeners = new int [] {SWT.MouseDown, SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
for (int i=0; i < listeners.length; i++) {
popupCalendar.addListener (listeners [i], popupListener);
}
addListener (SWT.Dispose, popupListener);
if (year != -1) popupCalendar.setDate (year, month, day);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void createPopupShell (int year, int month, int day) {
popupShell = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
popupCalendar = new DateTime (popupShell, SWT.CALENDAR);
if (font != null) popupCalendar.setFont (font);
if (fg != null) popupCalendar.setForeground (fg);
if (bg != null) popupCalendar.setBackground (bg);
mouseEventListener = new Listener () {
@Override
public void handleEvent (Event event) {
if (event.widget instanceof Control) {
Control c = (Control)event.widget;
if (c != down && c.getShell () != popupShell)
dropDownCalendar (false);
}
}
};
int [] listeners = {SWT.Close, SWT.MouseUp, SWT.Paint};
for (int i=0; i < listeners.length; i++) {
popupShell.addListener (listeners [i], popupListener);
}
listeners = new int [] {SWT.MouseDown, SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
for (int i=0; i < listeners.length; i++) {
popupCalendar.addListener (listeners [i], popupListener);
}
addListener (SWT.Dispose, popupListener);
if (year != -1) popupCalendar.setDate (year, month, day);
}
内容来源于网络,如有侵权,请联系作者删除!