public class TimePickerSettings extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TimePickerSettings.TimeArea
TimeArea, These enumerations represent areas of the components whose color can be changed.
|
static class |
TimePickerSettings.TimeIncrement
TimeIncrement, This is a list of increments that can be used with the generateMenuTimes()
function.
|
Modifier and Type | Field and Description |
---|---|
Border |
borderTimePopup
borderTimePopup, This allows you to set a custom border for the time picker popup menu.
|
Font |
fontInvalidTime
fontInvalidTime, This is the text field text font for invalid times.
|
Font |
fontValidTime
fontValidTime, This is the text field text font for valid times.
|
Font |
fontVetoedTime
fontVetoedTime, This is the text field text font for vetoed times.
|
ArrayList<DateTimeFormatter> |
formatsForParsing
formatsForParsing, This holds a list of formats that are used to attempt to parse times that
are typed by the user.
|
LocalTime |
initialTime
initialTime, This is the time that the time picker will have when it is created.
|
int |
maximumVisibleMenuRows
maximumVisibleMenuRows, This is the maximum number of rows that can be displayed in the time
selection menu without using a scroll bar.
|
boolean |
useLowercaseForDisplayTime
useLowercaseForDisplayTime, This indicates if the display time should always be shown in
lowercase.
|
boolean |
useLowercaseForMenuTimes
useLowercaseForMenuTimes, This indicates if the menu times should always be shown in
lowercase.
|
Integer |
zDateTimePicker_GapBeforeTimePickerPixels
zDateTimePicker_GapBeforeTimePickerPixels, This setting only applies to the DateTimePicker
class.
|
Constructor and Description |
---|
TimePickerSettings()
Constructor with Default Locale, This constructs a time picker settings instance using the
system default locale and language.
|
TimePickerSettings(Locale timeLocale)
Constructor with Custom Locale, This constructs a time picker settings instance using the
supplied locale and language.
|
Modifier and Type | Method and Description |
---|---|
void |
generatePotentialMenuTimes(ArrayList<LocalTime> desiredTimes)
generatePotentialMenuTimes, This will generate the menu times for populating the combo box
menu, using the items from a list of LocalTime instances.
|
void |
generatePotentialMenuTimes(TimePickerSettings.TimeIncrement timeIncrement,
LocalTime optionalStartTime,
LocalTime optionalEndTime)
generatePotentialMenuTimes, This will generate a list of menu times for populating the combo
box menu, using a TimePickerSettings.TimeIncrement value.
|
boolean |
getAllowEmptyTimes()
getAllowEmptyTimes, Returns the value of this setting.
|
boolean |
getAllowKeyboardEditing()
getAllowKeyboardEditing, Returns the value of this setting.
|
Color |
getColor(TimePickerSettings.TimeArea area)
getColor, This returns the currently set color for the specified area.
|
boolean |
getDisplaySpinnerButtons()
getDisplaySpinnerButtons, Returns the value of this setting.
|
boolean |
getDisplayToggleTimeMenuButton()
getDisplayToggleTimeMenuButton, Returns the value of this setting.
|
DateTimeFormatter |
getFormatForDisplayTime()
getFormatForDisplayTime, Returns the value this setting.
|
DateTimeFormatter |
getFormatForMenuTimes()
getFormatForMenuTimes, Returns the value this setting.
|
Integer |
getGapBeforeButtonPixels()
getGapBeforeButtonPixels, Returns the value of this setting.
|
Locale |
getLocale()
getLocale, This returns locale setting of the time picker.
|
int |
getMinimumSpinnerButtonWidthInPixels()
getMinimumSpinnerButtonWidthInPixels, This returns the minimum width of the spinner buttons.
|
int |
getMinimumToggleTimeMenuButtonWidthInPixels()
getMinimumSpinnerButtonWidthInPixels, This returns the minimum width of the toggle menu
button.
|
ArrayList<LocalTime> |
getPotentialMenuTimes()
getPotentialMenuTimes, This returns a copy of the list of potential menu times.
|
Integer |
getSizeTextFieldMinimumWidth()
getSizeTextFieldMinimumWidth, Returns the value of this setting.
|
boolean |
getSizeTextFieldMinimumWidthDefaultOverride()
getSizeTextFieldMinimumWidthDefaultOverride, Returns the value of this setting.
|
TimeVetoPolicy |
getVetoPolicy()
getVetoPolicy, This returns the veto policy.
|
boolean |
isTimeAllowed(LocalTime time)
isTimeAllowed, This checks to see if the specified time is allowed by any currently set veto
policy, and allowed by the current setting of allowEmptyTimes.
|
void |
setAllowEmptyTimes(boolean allowEmptyTimes)
setAllowEmptyTimes, This sets whether or not empty times (null times) are allowed in the time
picker.
|
void |
setAllowKeyboardEditing(boolean allowKeyboardEditing)
setAllowKeyboardEditing, This sets whether or not keyboard editing is allowed for this time
picker.
|
void |
setColor(TimePickerSettings.TimeArea area,
Color color)
setColor, This sets a color for the specified area.
|
void |
setDisplaySpinnerButtons(boolean displaySpinnerButtons)
setDisplaySpinnerButtons, This sets whether or not the spinner buttons will be displayed (and
enabled), on the time picker.
|
void |
setDisplayToggleTimeMenuButton(boolean showToggleTimeMenuButton)
setDisplayToggleTimeMenuButton, This sets whether or not the toggle menu button will be
displayed (and enabled), on the time picker.
|
void |
setFormatForDisplayTime(DateTimeFormatter formatForDisplayTime)
setFormatForDisplayTime, This sets the format that is used to display or parse the text field
time times in the time picker, using a DateTimeFormatter instance.
|
void |
setFormatForDisplayTime(String patternString)
setFormatForDisplayTime, This sets the format that is used to display or parse the text field
time times in the time picker, using a pattern string.
|
void |
setFormatForMenuTimes(DateTimeFormatter formatForMenuTimes)
setFormatForMenuTimes, This sets the format that is used to display or parse menu times in
the time picker, using a DateTimeFormatter instance.
|
void |
setFormatForMenuTimes(String patternString)
setFormatForMenuTimes, This sets the format that is used to display or parse menu times in
the time picker, using a pattern string.
|
void |
setGapBeforeButtonPixels(Integer gapBeforeButtonPixels)
setGapBeforeButtonPixels, This specifies the desired width for the gap between the time
picker and the toggle menu button (in pixels).
|
void |
setInitialTimeToNow()
setInitialTimeToNow, This sets the initial time for the time picker to the current time.
|
void |
setMinimumSpinnerButtonWidthInPixels(int pixels)
setMinimumSpinnerButtonWidthInPixels, This sets the minimum width of the spinner buttons.
|
void |
setMinimumToggleTimeMenuButtonWidthInPixels(int pixels)
setMinimumToggleTimeMenuButtonWidthInPixels, This sets the minimum width of the toggle menu
button.
|
void |
setSizeTextFieldMinimumWidth(Integer minimumWidthInPixels)
setSizeTextFieldMinimumWidth, This sets the minimum width in pixels, of the TimePicker text
field.
|
void |
setSizeTextFieldMinimumWidthDefaultOverride(boolean defaultShouldOverrideIfNeeded)
setSizeTextFieldMinimumWidthDefaultOverride, This specifies how the time picker should choose
the appropriate minimum width for the time picker text field.
|
boolean |
setVetoPolicy(TimeVetoPolicy vetoPolicy)
setVetoPolicy,
This sets a veto policy for the time picker.
|
void |
use24HourClockFormat()
use24HourClockFormat, This can be called to set the TimePicker to use a 24-hour clock format.
|
public Border borderTimePopup
public Font fontInvalidTime
public Font fontValidTime
public Font fontVetoedTime
public ArrayList<DateTimeFormatter> formatsForParsing
public LocalTime initialTime
public int maximumVisibleMenuRows
public boolean useLowercaseForDisplayTime
public boolean useLowercaseForMenuTimes
public Integer zDateTimePicker_GapBeforeTimePickerPixels
public TimePickerSettings()
public TimePickerSettings(Locale timeLocale)
public void generatePotentialMenuTimes(TimePickerSettings.TimeIncrement timeIncrement, LocalTime optionalStartTime, LocalTime optionalEndTime)
public void generatePotentialMenuTimes(ArrayList<LocalTime> desiredTimes)
public boolean getAllowEmptyTimes()
public boolean getAllowKeyboardEditing()
public Color getColor(TimePickerSettings.TimeArea area)
public boolean getDisplaySpinnerButtons()
public boolean getDisplayToggleTimeMenuButton()
public DateTimeFormatter getFormatForDisplayTime()
public DateTimeFormatter getFormatForMenuTimes()
public Integer getGapBeforeButtonPixels()
public Locale getLocale()
public int getMinimumSpinnerButtonWidthInPixels()
public int getMinimumToggleTimeMenuButtonWidthInPixels()
public ArrayList<LocalTime> getPotentialMenuTimes()
public Integer getSizeTextFieldMinimumWidth()
public boolean getSizeTextFieldMinimumWidthDefaultOverride()
public TimeVetoPolicy getVetoPolicy()
public boolean isTimeAllowed(LocalTime time)
public void setAllowEmptyTimes(boolean allowEmptyTimes)
public void setAllowKeyboardEditing(boolean allowKeyboardEditing)
public void setColor(TimePickerSettings.TimeArea area, Color color)
public void setDisplaySpinnerButtons(boolean displaySpinnerButtons)
public void setDisplayToggleTimeMenuButton(boolean showToggleTimeMenuButton)
public void setFormatForDisplayTime(DateTimeFormatter formatForDisplayTime)
public void setFormatForDisplayTime(String patternString)
public void setFormatForMenuTimes(DateTimeFormatter formatForMenuTimes)
public void setFormatForMenuTimes(String patternString)
public void setGapBeforeButtonPixels(Integer gapBeforeButtonPixels)
public void setInitialTimeToNow()
public void setMinimumSpinnerButtonWidthInPixels(int pixels)
public void setMinimumToggleTimeMenuButtonWidthInPixels(int pixels)
public void setSizeTextFieldMinimumWidth(Integer minimumWidthInPixels)
public void setSizeTextFieldMinimumWidthDefaultOverride(boolean defaultShouldOverrideIfNeeded)
public boolean setVetoPolicy(TimeVetoPolicy vetoPolicy)
public void use24HourClockFormat()
Copyright © 2017. All rights reserved.