Methods Summary |
---|
void | createNativeResource(int ownerId)Create native resource for current DateField .
Override function in ItemLFImpl .
nativeId = createNativeResource0(ownerId,
df.label,
df.layout,
(df.getDate() != null ?
df.currentDate.getTime().getTime():
0),
df.mode,
df.currentDate.getTimeZone().getID());
if (Logging.REPORT_LEVEL <= Logging.INFORMATION) {
Logging.report(Logging.INFORMATION, LogChannels.LC_HIGHUI,
"(createNativeResource: id="+nativeId+")");
}
|
private native int | createNativeResource0(int ownerId, java.lang.String label, int layout, long datetime, int displayMode, java.lang.String timeZone)KNI function that create native resource for current
DateField .
|
boolean | equateNLA()Determine if this Item should have a newline after it.
if (super.equateNLA()) {
return true;
}
return ((df.layout & Item.LAYOUT_2) != Item.LAYOUT_2);
|
boolean | equateNLB()Determine if this Item should have a newline before it.
if (super.equateNLB()) {
return true;
}
return ((df.layout & Item.LAYOUT_2) != Item.LAYOUT_2);
|
private native long | getDate0(int nativeId)Gets the current value set on the native datefield.
|
public java.util.Date | lGetDate()Gets the date currently set on the date field widget.
This method is called by Date only if Date
is initialized.
if (Logging.REPORT_LEVEL <= Logging.INFORMATION) {
Logging.report(Logging.INFORMATION, LogChannels.LC_HIGHUI,
"(mdGetDate: id="+nativeId+")");
}
if (nativeId != DisplayableLFImpl.INVALID_NATIVE_ID) {
long ld = getDate0(nativeId);
if (Logging.REPORT_LEVEL <= Logging.INFORMATION) {
Logging.report(Logging.INFORMATION, LogChannels.LC_HIGHUI,
"(mdGetDate: returned long=="+ld+")");
}
if (ld > 0) {
Date nd = new Date(ld);
df.setDateImpl(nd);
dateSynced = true;
return nd;
}
} else if (dateSynced && df.currentDate != null) {
return df.currentDate.getTime();
}
return null;
|
void | lHideNativeResource()Overrides ItemLFImpl to sync with
native resource before hiding it
Called by the system to hide this Item 's
native resource
if (!dateSynced) {
// sync java peer with native data before hiding
df.setDateImpl(lGetDate());
dateSynced = true;
}
super.lHideNativeResource();
|
public void | lSetDate(java.util.Date date)Notifies L&F of a date change in the corresponding
DateField .
if (Logging.REPORT_LEVEL <= Logging.INFORMATION) {
Logging.report(Logging.INFORMATION, LogChannels.LC_HIGHUI,
"(mdSetDate: id="+nativeId+")");
}
if (nativeId != DisplayableLFImpl.INVALID_NATIVE_ID) {
if (date != null) {
setDate0(nativeId, date.getTime());
} else {
setDate0(nativeId, 0l);
}
}
|
public void | lSetInputMode(int mode)Notifies L&F of a new input mode set in the corresponding
DateField .
if (Logging.REPORT_LEVEL <= Logging.INFORMATION) {
Logging.report(Logging.INFORMATION, LogChannels.LC_HIGHUI,
"(mdSetInputMode: id="+nativeId+")");
}
if (nativeId != DisplayableLFImpl.INVALID_NATIVE_ID) {
setInputMode0(nativeId, mode);
lRequestInvalidate(true, true);
}
|
private native void | setDate0(int nativeId, long date)Setting date/time of this widget.
|
private native void | setInputMode0(int nativeId, int mode)Set mode - time and or date.
|
boolean | uCallPeerStateChanged(int hint)Called by event delivery to notify an ItemLF in current
FormLF of a change in its peer state.
// Any hint means user has changed some aspect of the date in native
// since native peer changed, java peer is no longer up to date.
dateSynced = false;
// if the datefield is not initialized yet, initialize now.
if (!df.initialized) {
synchronized (Display.LCDUILock) {
lGetDate();
}
}
// Set flag so native resource will be queried for latest value
// Tell Form that ItemStateListener should be notified
return true;
|