@Test public void testAddChangeListener() { GUITunableHandler gh = mock(GUITunableHandler.class); fieldHandler.addChangeListener(gh); fieldHandler.notifyChangeListeners(); verify(gh, times(1)).changeOccurred(anyString(), anyString()); }
@Override public void addChangeListener(GUITunableHandler gh) { if (!listeners.contains(gh)) { if (notifyingListeners) { GUITunableHandler old = getListenerFor(gh.getQualifiedName()); if (old != null) { listeners = new LinkedList<>(listeners); listeners.remove(old); } } listeners.add(gh); } }
AbstractGUITunableHandler extends AbstractTunableHandler implements GUITunableHandler { @Override public void addChangeListener(GUITunableHandler gh) { if (!listeners.contains(gh)) { if (notifyingListeners) { GUITunableHandler old = getListenerFor(gh.getQualifiedName()); if (old != null) { listeners = new LinkedList<>(listeners); listeners.remove(old); } } listeners.add(gh); } } }
AbstractGUITunableHandler extends AbstractTunableHandler implements GUITunableHandler { @Override public void addChangeListener(GUITunableHandler gh) { if (!listeners.contains(gh)) { if (notifyingListeners) { GUITunableHandler old = getListenerFor(gh.getQualifiedName()); if (old != null) { listeners = new LinkedList<>(listeners); listeners.remove(old); } } listeners.add(gh); } } protected  AbstractGUITunableHandler(final Field field, final Object instance, final Tunable tunable); protected  AbstractGUITunableHandler(final Method getter, final Method setter, final Object instance, final Tunable tunable); }
AbstractGUITunableHandler extends AbstractTunableHandler implements GUITunableHandler { @Override public void addChangeListener(GUITunableHandler gh) { if (!listeners.contains(gh)) { if (notifyingListeners) { GUITunableHandler old = getListenerFor(gh.getQualifiedName()); if (old != null) { listeners = new LinkedList<>(listeners); listeners.remove(old); } } listeners.add(gh); } } protected  AbstractGUITunableHandler(final Field field, final Object instance, final Tunable tunable); protected  AbstractGUITunableHandler(final Method getter, final Method setter, final Object instance, final Tunable tunable); @Override void setValue(final Object newValue); @Override void notifyDependents(); @Override void notifyChangeListeners(); @Override void addChangeListener(GUITunableHandler gh); @Override void addDependent(GUITunableHandler gh); @Override String getDependency(); @Override String[] getChangeSources(); @Override final void changeOccurred(final String name, final String state); @Override final void checkDependency(final String depName, final String depState); @Override JPanel getJPanel(); @Override abstract void handle(); @Override void update(); @Override String getState(); boolean isHorizontal(); }
AbstractGUITunableHandler extends AbstractTunableHandler implements GUITunableHandler { @Override public void addChangeListener(GUITunableHandler gh) { if (!listeners.contains(gh)) { if (notifyingListeners) { GUITunableHandler old = getListenerFor(gh.getQualifiedName()); if (old != null) { listeners = new LinkedList<>(listeners); listeners.remove(old); } } listeners.add(gh); } } protected  AbstractGUITunableHandler(final Field field, final Object instance, final Tunable tunable); protected  AbstractGUITunableHandler(final Method getter, final Method setter, final Object instance, final Tunable tunable); @Override void setValue(final Object newValue); @Override void notifyDependents(); @Override void notifyChangeListeners(); @Override void addChangeListener(GUITunableHandler gh); @Override void addDependent(GUITunableHandler gh); @Override String getDependency(); @Override String[] getChangeSources(); @Override final void changeOccurred(final String name, final String state); @Override final void checkDependency(final String depName, final String depState); @Override JPanel getJPanel(); @Override abstract void handle(); @Override void update(); @Override String getState(); boolean isHorizontal();  }