public class Util extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Util.Converter<L,R>
An interface used for converting an object of one type to an object
of another type.
|
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static LocalDate |
adjustToFirstDayOfWeek(LocalDate date,
DayOfWeek firstDayOfWeek)
Adjusts the given date to a new date that marks the beginning of the week where the
given date is located.
|
static LocalDate |
adjustToLastDayOfWeek(LocalDate date,
DayOfWeek firstDayOfWeek)
Adjusts the given date to a new date that marks the end of the week where the
given date is located.
|
static <L,R> void |
bindBidirectional(Property<L> leftProperty,
Property<R> rightProperty,
Util.Converter<L,R> converter)
Creates a bidirectional binding between the two given properties of different types via the
help of a
Util.Converter . |
static String |
convertRFC2445ToText(String rrule,
LocalDate startDate)
Converts the given recurrence rule (according to RFC 2445) into a human
readable text, e.g.
|
static ScrollBar |
findScrollBar(Parent parent,
Orientation orientation)
Searches for a
ScrollBar of the given orientation (vertical, horizontal)
somewhere in the containment hierarchy of the given parent node. |
public static String convertRFC2445ToText(String rrule, LocalDate startDate)
rrule
- the rulestartDate
- the start date for the rulepublic static ScrollBar findScrollBar(Parent parent, Orientation orientation)
ScrollBar
of the given orientation (vertical, horizontal)
somewhere in the containment hierarchy of the given parent node.parent
- the parent nodeorientation
- the orientation (horizontal, vertical)public static LocalDate adjustToFirstDayOfWeek(LocalDate date, DayOfWeek firstDayOfWeek)
date
- the date to adjustfirstDayOfWeek
- the day of week that is considered the start of the week ("Monday" in Germany, "Sunday" in the US)adjustToLastDayOfWeek(LocalDate, DayOfWeek)
,
DateControl.getFirstDayOfWeek()
public static LocalDate adjustToLastDayOfWeek(LocalDate date, DayOfWeek firstDayOfWeek)
date
- the date to adjustfirstDayOfWeek
- the day of week that is considered the start of the week ("Monday" in Germany, "Sunday" in the US)adjustToFirstDayOfWeek(LocalDate, DayOfWeek)
,
DateControl.getFirstDayOfWeek()
public static <L,R> void bindBidirectional(Property<L> leftProperty, Property<R> rightProperty, Util.Converter<L,R> converter)
Util.Converter
.L
- the type of the left propertyR
- the type of the right propertyleftProperty
- the left propertyrightProperty
- the right propertyconverter
- the converterCopyright © 2017 Dirk Lemmermann Software & Consulting. All rights reserved.