public class TimePicker extends Dialog<java.time.LocalTime>
A TimePicker is used to select a single time (hours:minutes). The selected time is indicated by the filled circle at the end of the clock hand.
A user can select between minutes or hours selection by tapping the hour or minute label in the title bar, additionally he can also select between am or pm by tapping the respective label. When the user is finished selecting the time he can press the OK button.
The TimePicker is a Dialog
, for any further explanation on how dialogs work please refer to the
Dialog
documentation.
Dialog
Type | Property and Description |
---|---|
javafx.beans.property.ObjectProperty<java.time.LocalTime> |
time
The time represented in this TimePicker.
|
autoHideProperty, contentProperty, graphicProperty, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, showingProperty, titleProperty, titleTextProperty
Constructor and Description |
---|
TimePicker()
Creates a TimePicker instance with the current time instant.
|
TimePicker(java.time.LocalTime time)
Creates a TimePicker instance with the specified time.
|
Modifier and Type | Method and Description |
---|---|
java.time.LocalTime |
getTime()
Gets the value of the property time.
|
void |
setTime(java.time.LocalTime value)
Sets the value of the property time.
|
javafx.beans.property.ObjectProperty<java.time.LocalTime> |
timeProperty()
The time represented in this TimePicker.
|
autoHideProperty, buildEventDispatchChain, contentProperty, getButtons, getContent, getGraphic, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getTitle, getTitleText, graphicProperty, hide, isAutoHide, isFullscreen, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, setAutoHide, setContent, setGraphic, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setResult, setTitle, setTitleText, showAndWait, showingProperty, titleProperty, titleTextProperty
public final javafx.beans.property.ObjectProperty<java.time.LocalTime> timeProperty
getTime()
,
setTime(LocalTime)
public TimePicker()
public TimePicker(java.time.LocalTime time)
time
- The time instant to set on this TimePickerpublic final javafx.beans.property.ObjectProperty<java.time.LocalTime> timeProperty()
getTime()
,
setTime(LocalTime)
public final java.time.LocalTime getTime()
public final void setTime(java.time.LocalTime value)