@Override public void onChanged(final SetChangeListener.Change<? extends File> c) { assertFxApplicationThread(); if (c.getElementRemoved() != null) unselectTreeItemForUnselectedFile(c.getElementRemoved()); if (c.getElementAdded() != null) selectFileTreeItemForSelectedFile(c.getElementAdded()); updateDisable(); }
public <T> void onChanged(SetChangeListener.Change<? super T> change) { if (change.wasAdded()) { out.printf("Added: %s", change.getElementAdded()); } else if (change.wasRemoved()) { out.printf("Removed: %s", change.getElementRemoved()); } out.printf(", Set after the change: %s\n", change.getSet()); }