本文整理汇总了Java中com.google.gwt.core.client.JsDate.getTime方法的典型用法代码示例。如果您正苦于以下问题:Java JsDate.getTime方法的具体用法?Java JsDate.getTime怎么用?Java JsDate.getTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.core.client.JsDate
的用法示例。
在下文中一共展示了JsDate.getTime方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toModelValue
import com.google.gwt.core.client.JsDate; //导入方法依赖的package包/类
@Override
public Date toModelValue(final String widgetValue) {
if (widgetValue == null || widgetValue.equals("")) {
return null;
}
final JsDate jsDate = JsDate.create(widgetValue);
return new Date((long) jsDate.getTime());
}
示例2: getPickerDate
import com.google.gwt.core.client.JsDate; //导入方法依赖的package包/类
/**
* Get the pickers date.
*/
protected Date getPickerDate() {
try {
JsDate pickerDate = getPicker().get("select").obj;
return new Date((long) pickerDate.getTime());
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
示例3: toDate
import com.google.gwt.core.client.JsDate; //导入方法依赖的package包/类
/**
* Convert the given javascript date to a java one.
*
* @param date
* Date to convert (can be <code>null</code>).
* @return A corresponding java date object.
*/
public static Date toDate(final JsDate date) {
if (date != null) {
return new Date((long) date.getTime());
} else {
return null;
}
}
示例4: getValueDate
import com.google.gwt.core.client.JsDate; //导入方法依赖的package包/类
protected Date getValueDate(JavaScriptObject jsDataTable, int columnIndex, int rowIndex) {
JsDate jsDate = getValueDateNative(jsDataTable, columnIndex, rowIndex);
if (jsDate != null) {
return new Date((long) jsDate.getTime());
}
else {
return null;
}
}
示例5: getDateCreatedDTO
import com.google.gwt.core.client.JsDate; //导入方法依赖的package包/类
public Date getDateCreatedDTO() {
JsDate dateCreated = getDateCreated();
if(dateCreated != null)
return new Date((long) dateCreated.getTime());
return null;
}
示例6: getDate
import com.google.gwt.core.client.JsDate; //导入方法依赖的package包/类
public Date getDate(JavaScriptObject array, int i) {
JsDate jsDate = getJsDate(array, i);
return new Date((long) jsDate.getTime());
}
示例7: getDate
import com.google.gwt.core.client.JsDate; //导入方法依赖的package包/类
public Date getDate() {
final JsDate jsDate = getDate(getElement().getId());
final long time = (long) jsDate.getTime();
return new Date(time);
}
示例8: getDate
import com.google.gwt.core.client.JsDate; //导入方法依赖的package包/类
public final Date getDate() {
JsDate result = date();
return result != null ? new Date((long) result.getTime()) : null;
}
示例9: getPropertyDate
import com.google.gwt.core.client.JsDate; //导入方法依赖的package包/类
/**
* Returns arbitrary property from given JSO by specified name as {@link Date} value.
*
* @param jso
* JSO where from property should be given
* @param name
* Addressed property name
* @return {@link JavaScriptObject} value of specified property or null if specified property name is undefined.
*/
public static Date getPropertyDate(JavaScriptObject jso, String name) {
JsDate d = getPropertyJsDate(jso, name);
return d != null ? new Date((long) d.getTime()) : null;
}