Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2006-10-24 21:00:51 +0000
committerCarolyn MacLeod2006-10-24 21:00:51 +0000
commit2c1992927640c0e7eafb02d79febf9f526ddfbb2 (patch)
tree346592d15878be9f7a6ba3fcb23af7f2e1947382 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
parentd060ac10cdbd97d7f8e7bfd82ccc3cdea25689fe (diff)
downloadeclipse.platform.swt-2c1992927640c0e7eafb02d79febf9f526ddfbb2.tar.gz
eclipse.platform.swt-2c1992927640c0e7eafb02d79febf9f526ddfbb2.tar.xz
eclipse.platform.swt-2c1992927640c0e7eafb02d79febf9f526ddfbb2.zip
get from control
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
index d1877424d7..229827def0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
@@ -73,18 +73,23 @@ void createHandle (int index) {
void createWidget (int index) {
super.createWidget (index);
// if ((style & SWT.CALENDAR) != 0) {
- int [] y = new int [1];
- int [] m = new int [1];
- int [] d = new int [1];
- OS.gtk_calendar_get_date(handle, y, m, d);
- year = y[0];
- month = m[0];
- day = d[0];
+ getDate();
// }
}
+void getDate() {
+ int [] y = new int [1];
+ int [] m = new int [1];
+ int [] d = new int [1];
+ OS.gtk_calendar_get_date(handle, y, m, d);
+ year = y[0];
+ month = m[0];
+ day = d[0];
+}
+
public int getDay () {
checkWidget ();
+ getDate();
return day;
}
@@ -100,6 +105,7 @@ public int getMinute () {
public int getMonth () {
checkWidget ();
+ getDate();
return month;
}
@@ -110,6 +116,7 @@ public int getSecond () {
public int getYear () {
checkWidget ();
+ getDate();
return year;
}

Back to the top