Top Description Inners Fields Constructors Methods
com.calendarfx.view.print

public Class TimeRangeField

extends ViewTypeControl
Class Inheritance
Imports
impl.com.calendarfx.view.print.TimeRangeFieldSkin, javafx.beans.InvalidationListener, javafx.beans.property.BooleanProperty, .ObjectProperty, .SimpleBooleanProperty, .SimpleObjectProperty, javafx.beans.value.ObservableValue, javafx.collections.FXCollections, .ObservableList, javafx.scene.control.Skin, org.controlsfx.control.PropertySheet.Item, java.time.LocalDate, .Month, java.time.temporal.WeekFields, java.util.ArrayList, .Arrays, .Collection, .Collections, .Comparator, .List, .Optional

A control for specifying the start or end time of a time range. This control is used by the TimeRangeView as part of the print preview functionality. It allows the user to specify the time range that has to be printed. The control supports defining time points for day ranges, week rangers, or month ranges. The default style class used by this control is "time-range-field". Time Range Field

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private final ObjectProperty<Integer>
public static final String
private final BooleanProperty
private final ObjectProperty<Integer>
private final ObjectProperty<LocalDate>
private final ObjectProperty<Integer>
private static final String
private final ObjectProperty<LocalDate>
private final ObjectProperty<TimeRangeField.TimeRangeFieldValue>
private final ObservableList<TimeRangeField.TimeRangeFieldValue>
private final ObservableList<TimeRangeField.TimeRangeFieldValue>
private final ObjectProperty<WeekFields>

Constructor Summary

AccessConstructor and Description
public
public
public
TimeRangeField(boolean endField)

public
TimeRangeField(ViewType viewType, boolean endField)

Method Summary

Modifier and TypeMethod and Description
public final ObjectProperty<Integer>
protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control.

public final BooleanProperty
public final Integer
public final Integer
public final LocalDate
public final Integer
public ObservableList<PropertySheet.Item>
getPropertySheetItems()

Overrides com.calendarfx.view.print.ViewTypeControl.getPropertySheetItems.

Returns a list of property items that can be shown by the PropertySheet of ControlsFX.

public final LocalDate

Returns:

the date representing "today"
getToday
()

Returns the value of todayProperty().

public final TimeRangeField.TimeRangeFieldValue
public ObservableList<TimeRangeField.TimeRangeFieldValue>
public final WeekFields

Returns:

the week fields
getWeekFields
()

Returns the value of weekFieldsProperty().

public final boolean
public final ObjectProperty<Integer>
public final ObjectProperty<LocalDate>
public final ObjectProperty<Integer>
public final void
setAfterUnits(Integer afterUnits)

public final void
setEndField(boolean endField)

public final void
setMonthYear(Integer monthYear)

public final void
public final void
setOnWeekNumber(Integer onWeekNumber)

public final void
setToday(LocalDate
the date representing "today"
date
)

Sets the value of todayProperty().

public final void
public final void
setWeekFields(WeekFields
the new week fields
fields
)

Sets the value of weekFieldsProperty().

public final ObjectProperty<LocalDate>

Returns:

the date representing "today"
todayProperty
()

Stores the date that is considered to represent "today".

private void
private void
public final ObjectProperty<TimeRangeField.TimeRangeFieldValue>
public final ObjectProperty<WeekFields>

Returns:

the week fields
weekFieldsProperty
()

Week fields are used to determine the first day of a week (e.g. "Monday" in Germany or "Sunday" in the US).

Inherited from com.calendarfx.view.print.ViewTypeControl:
getViewTypesetViewTypeviewTypeProperty

Field Detail

afterUnitsback to summary
private final ObjectProperty<Integer> afterUnits
DEFAULT_STYLEback to summary
public static final String DEFAULT_STYLE
endFieldback to summary
private final BooleanProperty endField
monthYearback to summary
private final ObjectProperty<Integer> monthYear
onDateback to summary
private final ObjectProperty<LocalDate> onDate
onWeekNumberback to summary
private final ObjectProperty<Integer> onWeekNumber
TIME_RANGE_FIELD_CATEGORYback to summary
private static final String TIME_RANGE_FIELD_CATEGORY
todayback to summary
private final ObjectProperty<LocalDate> today
valueback to summary
private final ObjectProperty<TimeRangeField.TimeRangeFieldValue> value
valuesback to summary
private final ObservableList<TimeRangeField.TimeRangeFieldValue> values
valuesUnmodifiableback to summary
private final ObservableList<TimeRangeField.TimeRangeFieldValue> valuesUnmodifiable
weekFieldsback to summary
private final ObjectProperty<WeekFields> weekFields

Constructor Detail

TimeRangeFieldback to summary
public TimeRangeField()
TimeRangeFieldback to summary
public TimeRangeField(ViewType viewType)
TimeRangeFieldback to summary
public TimeRangeField(boolean endField)
TimeRangeFieldback to summary
public TimeRangeField(ViewType viewType, boolean endField)

Method Detail

afterUnitsPropertyback to summary
public final ObjectProperty<Integer> afterUnitsProperty()
createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Doc from javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Returns:Skin<?>

new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.

Annotations
@Override
endFieldPropertyback to summary
public final BooleanProperty endFieldProperty()
getAfterUnitsback to summary
public final Integer getAfterUnits()
getMonthYearback to summary
public final Integer getMonthYear()
getOnDateback to summary
public final LocalDate getOnDate()
getOnWeekNumberback to summary
public final Integer getOnWeekNumber()
getPropertySheetItemsback to summary
public ObservableList<PropertySheet.Item> getPropertySheetItems()

Overrides com.calendarfx.view.print.ViewTypeControl.getPropertySheetItems.

Doc from com.calendarfx.view.CalendarFXControl.getPropertySheetItems.

Returns a list of property items that can be shown by the PropertySheet of ControlsFX.

Returns:ObservableList<PropertySheet.Item>

the property sheet items

Annotations
@Override
getTodayback to summary
public final LocalDate getToday()

Returns the value of todayProperty().

Returns:LocalDate

the date representing "today"

getValueback to summary
public final TimeRangeField.TimeRangeFieldValue getValue()
getValuesback to summary
public ObservableList<TimeRangeField.TimeRangeFieldValue> getValues()
getWeekFieldsback to summary
public final WeekFields getWeekFields()

Returns the value of weekFieldsProperty().

Returns:WeekFields

the week fields

isEndFieldback to summary
public final boolean isEndField()
monthYearPropertyback to summary
public final ObjectProperty<Integer> monthYearProperty()
onDatePropertyback to summary
public final ObjectProperty<LocalDate> onDateProperty()
onWeekNumberPropertyback to summary
public final ObjectProperty<Integer> onWeekNumberProperty()
setAfterUnitsback to summary
public final void setAfterUnits(Integer afterUnits)
setEndFieldback to summary
public final void setEndField(boolean endField)
setMonthYearback to summary
public final void setMonthYear(Integer monthYear)
setOnDateback to summary
public final void setOnDate(LocalDate onDate)
setOnWeekNumberback to summary
public final void setOnWeekNumber(Integer onWeekNumber)
setTodayback to summary
public final void setToday(LocalDate date)

Sets the value of todayProperty().

Parameters
date:LocalDate

the date representing "today"

setValueback to summary
public final void setValue(TimeRangeField.TimeRangeFieldValue value)
setWeekFieldsback to summary
public final void setWeekFields(WeekFields fields)

Sets the value of weekFieldsProperty().

Parameters
fields:WeekFields

the new week fields

todayPropertyback to summary
public final ObjectProperty<LocalDate> todayProperty()

Stores the date that is considered to represent "today". This property is initialized with LocalDate#now() but can be any date.

Returns:ObjectProperty<LocalDate>

the date representing "today"

updateFieldsback to summary
private void updateFields()
updateValuesback to summary
private void updateValues()
valuePropertyback to summary
public final ObjectProperty<TimeRangeField.TimeRangeFieldValue> valueProperty()
weekFieldsPropertyback to summary
public final ObjectProperty<WeekFields> weekFieldsProperty()

Week fields are used to determine the first day of a week (e.g. "Monday" in Germany or "Sunday" in the US). It is also used to calculate the week number as the week fields determine how many days are needed in the first week of a year. This property is initialized with WeekFields#ISO.

Returns:ObjectProperty<WeekFields>

the week fields

com.calendarfx.view.print back to summary

public sealed Enum TimeRangeField.TimeRangeFieldValue

extends Enum<TimeRangeField.TimeRangeFieldValue>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
private final String
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
private final int
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue
public static final TimeRangeField.TimeRangeFieldValue

Constructor Summary

AccessConstructor and Description
private
TimeRangeFieldValue(int order, String messageKey)

Method Summary

Modifier and TypeMethod and Description
public static TimeRangeField.TimeRangeFieldValue
public String
public static List<TimeRangeField.TimeRangeFieldValue>
getSelectablesForView(ViewType viewType, boolean endField)

public abstract Collection<ViewType>
public boolean
public boolean
public static TimeRangeField.TimeRangeFieldValue
public static TimeRangeField.TimeRangeFieldValue[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AFTERback to summary
public static final TimeRangeField.TimeRangeFieldValue AFTER
APRILback to summary
public static final TimeRangeField.TimeRangeFieldValue APRIL
AUGUSTback to summary
public static final TimeRangeField.TimeRangeFieldValue AUGUST
DECEMBERback to summary
public static final TimeRangeField.TimeRangeFieldValue DECEMBER
FEBRUARYback to summary
public static final TimeRangeField.TimeRangeFieldValue FEBRUARY
JANUARYback to summary
public static final TimeRangeField.TimeRangeFieldValue JANUARY
JULYback to summary
public static final TimeRangeField.TimeRangeFieldValue JULY
JUNEback to summary
public static final TimeRangeField.TimeRangeFieldValue JUNE
MARCHback to summary
public static final TimeRangeField.TimeRangeFieldValue MARCH
MAYback to summary
public static final TimeRangeField.TimeRangeFieldValue MAY
messageKeyback to summary
private final String messageKey
NEXT_MONTHback to summary
public static final TimeRangeField.TimeRangeFieldValue NEXT_MONTH
NEXT_WEEKback to summary
public static final TimeRangeField.TimeRangeFieldValue NEXT_WEEK
NOVEMBERback to summary
public static final TimeRangeField.TimeRangeFieldValue NOVEMBER
OCTOBERback to summary
public static final TimeRangeField.TimeRangeFieldValue OCTOBER
ON_DATEback to summary
public static final TimeRangeField.TimeRangeFieldValue ON_DATE
ON_WEEK_NUMBERback to summary
public static final TimeRangeField.TimeRangeFieldValue ON_WEEK_NUMBER
orderback to summary
private final int order
SEPTEMBERback to summary
public static final TimeRangeField.TimeRangeFieldValue SEPTEMBER
THIS_MONTHback to summary
public static final TimeRangeField.TimeRangeFieldValue THIS_MONTH
THIS_WEEKback to summary
public static final TimeRangeField.TimeRangeFieldValue THIS_WEEK
TODAYback to summary
public static final TimeRangeField.TimeRangeFieldValue TODAY
TOMORROWback to summary
public static final TimeRangeField.TimeRangeFieldValue TOMORROW

Constructor Detail

TimeRangeFieldValueback to summary
private TimeRangeFieldValue(int order, String messageKey)

Method Detail

getFromMonthback to summary
public static TimeRangeField.TimeRangeFieldValue getFromMonth(Month month)
getMessageKeyback to summary
public String getMessageKey()
getSelectablesForViewback to summary
public static List<TimeRangeField.TimeRangeFieldValue> getSelectablesForView(ViewType viewType, boolean endField)
getViewTypesback to summary
public abstract Collection<ViewType> getViewTypes()
isMonthValueback to summary
public boolean isMonthValue()
isSelectableForViewback to summary
public boolean isSelectableForView(ViewType viewType)
valueOfback to summary
public static TimeRangeField.TimeRangeFieldValue valueOf(String name)
valuesback to summary
public static TimeRangeField.TimeRangeFieldValue[] values()