public class Convert extends Object
// Create a date picker. DatePicker datePicker = new DatePicker(); // Set the date picker date, from a java.util.Date instance, using the default time zone. java.util.Date date = new java.util.Date(); datePicker.convert().setDateWithDefaultZone(date); // Get the date picker date, as a java.util.Date instance, using the default time zone. date = datePicker.convert().getDateWithDefaultZone();Implementation note: For code clarity, only the java.time packages should use import statements in this class. All other date related data types should be fully qualified in this class.
Constructor and Description |
---|
Convert(DatePicker parentDatePicker)
Default Constructor, Supply the date picker that should be associated with this converter.
|
Modifier and Type | Method and Description |
---|---|
Date |
getDateWithDefaultZone()
getDateWithDefaultZone, Returns the date picker value as a java.util.Date that was created
using the system default time zone, or returns null.
|
Date |
getDateWithZone(ZoneId timezone)
getDateWithZone, Returns the date picker value as a java.util.Date that was created using the
specified time zone, or returns null.
|
void |
setDateWithDefaultZone(Date javaUtilDate)
setDateWithDefaultZone, Sets the date picker value from a java.util.Date using the system
default time zone.
|
void |
setDateWithZone(Date javaUtilDate,
ZoneId timezone)
setDateWithZone, Sets the date picker value from a java.util.Date using the specified time
zone.
|
public Convert(DatePicker parentDatePicker)
public Date getDateWithDefaultZone()
public Date getDateWithZone(ZoneId timezone)
public void setDateWithDefaultZone(Date javaUtilDate)
Copyright © 2018. All rights reserved.