< prev index next >
modules/javafx.controls/src/main/java/javafx/scene/control/DatePicker.java
Print this page
@@ -229,10 +229,11 @@
* provided explicitly in the {@link java.util.Locale} by use of a
* Locale calendar extension.
*
* Setting the value to <code>null</code> will restore the default
* chronology.
+ * @return the calendar system
*/
public final ObjectProperty<Chronology> chronologyProperty() {
return chronology;
}
private ObjectProperty<Chronology> chronology =
@@ -261,10 +262,12 @@
* Whether the DatePicker popup should display a column showing
* week numbers.
*
* <p>The default value is specified in a resource bundle, and
* depends on the country of the current locale.
+ * @return true if popup should display a column showing
+ * week numbers
*/
public final BooleanProperty showWeekNumbersProperty() {
if (showWeekNumbers == null) {
String country = Locale.getDefault(Locale.Category.FORMAT).getCountry();
boolean localizedDefault =
@@ -317,25 +320,25 @@
*
* {
* datePicker.setPromptText(pattern.toLowerCase());
* }
*
- * @Override public String toString(LocalDate date) {
+ * {@literal @Override public String toString(LocalDate date) {
* if (date != null) {
* return dateFormatter.format(date);
* } else {
* return "";
* }
- * }
+ * }}
*
- * @Override public LocalDate fromString(String string) {
+ * {@literal @Override public LocalDate fromString(String string) {
* if (string != null && !string.isEmpty()) {
* return LocalDate.parse(string, dateFormatter);
* } else {
* return null;
* }
- * }
+ * }}
* });
* </code></pre>
* <p>Example that wraps the default formatter and catches parse exceptions:
* <pre><code>
* final StringConverter<LocalDate> defaultConverter = datePicker.getConverter();
@@ -359,11 +362,11 @@
* the year is 2000 (see {@link java.time.format.DateTimeFormatter}). This
* default is not useful for allowing a person's date of birth to be typed.
* The following example modifies the converter's fromString() method to
* allow a two digit year for birth dates up to 99 years in the past.
* <pre><code>
- * @Override public LocalDate fromString(String text) {
+ * {@literal @Override public LocalDate fromString(String text) {
* if (text != null && !text.isEmpty()) {
* Locale locale = Locale.getDefault(Locale.Category.FORMAT);
* Chronology chrono = datePicker.getChronology();
* String pattern =
* DateTimeFormatterBuilder.getLocalizedDateTimePattern(FormatStyle.SHORT,
@@ -379,13 +382,14 @@
* .toFormatter();
* return LocalDate.from(chrono.date(df.parse(text)));
* } else {
* return null;
* }
- * }
+ * }}
* </code></pre>
*
+ * @return the string converter of type LocalDate
* @see javafx.scene.control.ComboBox#converterProperty
*/
public final ObjectProperty<StringConverter<LocalDate>> converterProperty() { return converter; }
private ObjectProperty<StringConverter<LocalDate>> converter =
new SimpleObjectProperty<StringConverter<LocalDate>>(this, "converter", null);
< prev index next >