@@ -0,0 +1,1670 @@
+/*%0A * Copyright (C) 2017 EfficiOS Inc., Alexandre Montplaisir %3Calexmonthy@efficios.com%3E%0A *%0A * All rights reserved. This program and the accompanying materials are%0A * made available under the terms of the Eclipse Public License v1.0 which%0A * accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A */%0A%0Apackage org.lttng.scope.tmf2.views.core;%0A%0Aimport javafx.beans.property.Property;%0Aimport javafx.beans.value.ChangeListener;%0A%0A/**%0A * Simple class encapsulating a %7B@link ChangeListener%7D and its target property.%0A * It allows disabling and re-enabling the listener, by simply detaching it from%0A * its target, on demand. The calling class then only has one class to manage%0A * (this handler) instead of two.%0A *%0A * @author Alexandre Montplaisir%0A *%0A * @param %3CT%3E%0A *            The type of property%0A */%0Apublic final class ChangeListenerHandler%3CT%3E %7B%0A%0A    private final Property%3CT%3E fTarget;%0A    private final ChangeListener%3CT%3E fListener;%0A%0A    /**%0A     * Build a new listener handler. The listener will be added to the target%0A     * (enabled).%0A     *%0A     * @param target%0A     *            The target property%0A     * @param listener%0A     *            The listener%0A     */%0A    public ChangeListenerHandler(Property%3CT%3E target, ChangeListener%3CT%3E listener) %7B%0A        fTarget = target;%0A        fListener = listener;%0A        enable();%0A    %7D%0A%0A    /**%0A     * Attach the listener to its property, re-enabling it.%0A     */%0A    public void enable() %7B%0A        fTarget.addListener(fListener);%0A    %7D%0A%0A    /**%0A     * Detach the listener from its property, disabling it.%0A     */%0A    public void disable() %7B%0A        fTarget.removeListener(fListener);%0A    %7D%0A%7D%0A

Add a ChangeListenerHandler helper class