- java.lang.Object
-
- com.gluonhq.charm.glisten.control.Dialog<LocalTime>
-
- com.gluonhq.charm.glisten.control.TimePicker
-
- All Implemented Interfaces:
EventTarget
public class TimePicker extends Dialog<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 theDialog
documentation.- Since:
- 2.0.0
- See Also:
Dialog
-
-
Property Summary
Properties Type Property Description ObjectProperty<LocalTime>
time
The time represented in this TimePicker.
-
Constructor Summary
Constructors Constructor Description TimePicker()
Creates a TimePicker instance with the current time instant.TimePicker(LocalTime time)
Creates a TimePicker instance with the specified time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalTime
getTime()
Gets the value of the property time.void
setTime(LocalTime value)
Sets the value of the property time.ObjectProperty<LocalTime>
timeProperty()
The time represented in this TimePicker.-
Methods inherited from class com.gluonhq.charm.glisten.control.Dialog
autoHideProperty, buildEventDispatchChain, contentProperty, contentTextProperty, getButtons, getContent, getContentText, getGraphic, getId, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getTitle, getTitleText, graphicProperty, hide, idProperty, isAutoHide, isFullscreen, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, setAutoHide, setContent, setContentText, setGraphic, setId, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setResult, setTitle, setTitleText, showAndWait, showingProperty, titleProperty, titleTextProperty
-
-
-
-
Property Detail
-
time
public final ObjectProperty<LocalTime> timeProperty
The time represented in this TimePicker.- See Also:
getTime()
,setTime(LocalTime)
-
-
Constructor Detail
-
TimePicker
public TimePicker()
Creates a TimePicker instance with the current time instant.
-
TimePicker
public TimePicker(LocalTime time)
Creates a TimePicker instance with the specified time.- Parameters:
time
- The time instant to set on this TimePicker
-
-
Method Detail
-
timeProperty
public final ObjectProperty<LocalTime> timeProperty()
The time represented in this TimePicker.- See Also:
getTime()
,setTime(LocalTime)
-
getTime
public final LocalTime getTime()
Gets the value of the property time.- Property description:
- The time represented in this TimePicker.
-
setTime
public final void setTime(LocalTime value)
Sets the value of the property time.- Property description:
- The time represented in this TimePicker.
-
-