Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of ViewListCells #275

Closed
mthiele opened this issue Jul 1, 2015 · 1 comment
Closed

Allow customization of ViewListCells #275

mthiele opened this issue Jul 1, 2015 · 1 comment
Milestone

Comments

@mthiele
Copy link

mthiele commented Jul 1, 2015

When using ListViews with mvvmFX, the CachedViewModelCellFactory can be used to supply a View with its according View Model as items to the ListView. Those items are of type ViewListCell which is a specialization of ListCell.
Now I want to adjust the behaviour of the ViewListCell by calling:

listView.setCellFactory(new CachedViewModelCellFactory<>(viewModel ->
        FluentViewLoader.fxmlView(MyView.class).viewModel(viewModel).load()) {
      @Override
      public ViewListCell call(final ListView element) {
        final ViewListCell result = super.call(element);
        ...
        return result;
      }
    });

Unfortunately, I cannot do that since ViewListCell is of visibility package local. It would be really helpful if it were of visibility public to alter its behaviour.

@manuel-mauky
Copy link
Collaborator

Hi micha,
good idea. It's done and you can test it with the current snapshot.

@manuel-mauky manuel-mauky added this to the 1.4.0 milestone Jul 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants