API review: Conversion methods in Binding API (original) (raw)
Martin Sladecek martin.sladecek at oracle.com
Tue Nov 6 00:15:58 PST 2012
- Previous message: API review: Conversion methods in Binding API
- Next message: API review: Conversion methods in Binding API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
One request just came last Friday: http://javafx-jira.kenai.com/browse/RT-25996 ;-)
-Martin
On 11/02/2012 09:54 PM, Richard Bair wrote:
I haven't seen this as a request by developers yet, I tend to think we ought to keep this feature / tweak in our backlog and revisit if / when we see some demand from users?
Richard On Sep 18, 2012, at 12:00 AM, Michael Heinrichs <michael.heinrichs at oracle.com> wrote:
Hi,
there are sometimes situations, when a developer has a general typed value, but needs a specific type, e.g. a user may have an ObjectProperty but needs an ObservableIntegerValue. I want to add some conversion methods for these kind of cases. http://javafx-jira.kenai.com/browse/RT-19020 class BooleanExpression: public static BooleanExpression booleanExpression(ObservableValue) The current booleanExpression() method will be marked as deprecated and should be removed when we do an incompatible update of the JavaFX API. Same for the methods in DoubleExpression etc. class DoubleExpression: public static DoubleExpression doubleExpression(ObservableValue) class FloatExpression: public static FloatExpression floatExpression(ObservableValue) class IntegerExpression: public static IntegerExpression integerExpression(ObservableValue) class LongExpression: public static LongExpression longExpression(ObservableValue) class ObjectExpression: public BooleanBinding asBoolean() public DoubleBinding asDouble() public FloatBinding asFloat() public IntegerBinding asInteger() public LongBinding asLong() The bindings returned by these methods will return the default value, if the type of the wrapped Object does not match the expected. class Bindings: public static BooleanExpression convertToBoolean(ObservableValue) public static DoubleExpression convertToDouble(ObservableValue) public static FloatExpression convertToFloat(ObservableValue) public static IntegerExpression convertToInteger(ObservableValue) public static LongExpression convertToLong(ObservableValue) Thanks, Michael
- Previous message: API review: Conversion methods in Binding API
- Next message: API review: Conversion methods in Binding API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]