JavaFX 2’s Callback

Leave a comment

March 13, 2013 by huionn

JavaFX is heavily using Callback interface. The experience of developing JavaFX 2 is very enjoyable – the tool is good, the API is intuitive…

But today I encounter the API of CheckBoxTableCell<s ,T>

public static <S,T> Callback<TableColumn<S,T>, TableCell<S,T>> forTableColumn(
    final Callback<Integer, ObservableValue<Boolean>> getSelectedProperty, 
    final StringConverter<T> converter) {
  return new Callback<TableColumn<S,T>, TableCell<S,T>>() {
    @Override public TableCell<S,T> call(TableColumn<S,T> list) {
      return new CheckBoxTableCell<S,T>(getSelectedProperty, converter);

Can I call it mindfuck ;P ?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: