Class PropertyValues


  • public final class PropertyValues
    extends Object
    A factory class for Value instances based on JavaFX models and properties
    • Method Detail

      • selectedItemValue

        public static <T> Value<T> selectedItemValue​(javafx.scene.control.SingleSelectionModel<Item<T>> selectionModel)
        Type Parameters:
        T - the value type
        Parameters:
        selectionModel - the selection model
        Returns:
        a Value based on the selected item in the given selection model
      • booleanPropertyValue

        public static Value<Boolean> booleanPropertyValue​(javafx.beans.property.BooleanProperty booleanProperty)
        Parameters:
        booleanProperty - the boolean property
        Returns:
        a Value based on the given boolean property
      • selectedValue

        public static <T> Value<T> selectedValue​(javafx.scene.control.SingleSelectionModel<T> selectionModel)
        Type Parameters:
        T - the type of the actual value
        Parameters:
        selectionModel - the selection model
        Returns:
        a Value based on the selected item in the given selection model
      • singleSearchValue

        public static Value<Entity> singleSearchValue​(EntitySearchModel searchModel)
        Parameters:
        searchModel - the search model
        Returns:
        a Value based on the entities selected in the given search model
        Throws:
        IllegalArgumentException - in case the search model has multiple selection enabled
      • multipleSearchValue

        public static Value<List<Entity>> multipleSearchValue​(EntitySearchModel searchModel)
        Parameters:
        searchModel - the search model
        Returns:
        a Value based on the entities selected in the given search model
      • stringPropertyValue

        public static StringValue<String> stringPropertyValue​(javafx.beans.property.StringProperty property)
        Parameters:
        property - the string property
        Returns:
        a StringValue based on the given string property
      • integerPropertyValue

        public static StringValue<Integer> integerPropertyValue​(javafx.beans.property.StringProperty property,
                                                                NumberFormat numberFormat)
        Parameters:
        property - the string property
        numberFormat - the format to use
        Returns:
        an Integer StringValue based on the given string property
      • longPropertyValue

        public static StringValue<Long> longPropertyValue​(javafx.beans.property.StringProperty property,
                                                          NumberFormat numberFormat)
        Parameters:
        property - the string property
        numberFormat - the format to use
        Returns:
        a Long StringValue based on the given string property
      • doublePropertyValue

        public static StringValue<Double> doublePropertyValue​(javafx.beans.property.StringProperty property,
                                                              NumberFormat numberFormat)
        Parameters:
        property - the string property
        numberFormat - the format to use
        Returns:
        a Double StringValue based on the given string property
      • bigDecimalPropertyValue

        public static StringValue<BigDecimal> bigDecimalPropertyValue​(javafx.beans.property.StringProperty property,
                                                                      DecimalFormat decimalFormat)
        Parameters:
        property - the string property
        decimalFormat - the format to use
        Returns:
        a BigDecimal StringValue based on the given string property
      • datePropertyValue

        public static StringValue<LocalDate> datePropertyValue​(javafx.beans.property.StringProperty property,
                                                               DateTimeFormatter dateTimeFormatter)
        Parameters:
        property - the string property
        dateTimeFormatter - the formatter to use
        Returns:
        a LocalDate StringValue based on the given string property
      • timestampPropertyValue

        public static StringValue<LocalDateTime> timestampPropertyValue​(javafx.beans.property.StringProperty property,
                                                                        DateTimeFormatter dateTimeFormatter)
        Parameters:
        property - the string property
        dateTimeFormatter - the formatter to use
        Returns:
        a LocalDateTime StringValue based on the given string property
      • timePropertyValue

        public static StringValue<LocalTime> timePropertyValue​(javafx.beans.property.StringProperty property,
                                                               DateTimeFormatter dateTimeFormatter)
        Parameters:
        property - the string property
        dateTimeFormatter - the formatter to use
        Returns:
        a LocalTime StringValue based on the given string property
      • parseStrict

        public static Object parseStrict​(Format format,
                                         String value)
                                  throws ParseException
        Parses the given value using the given format
        Parameters:
        format - the format
        value - the value
        Returns:
        the parsed value
        Throws:
        ParseException - in case of an exception