/** * Adds an option to this SelectObservableValue. If the observable contains * Boolean.TRUE then the selection changes immediately to the given value. * * @param value * The value associated with the provided observable * @param observable * an observable of value type Boolean.class or Boolean.TYPE */ public void addOption(Object value, IObservableValue observable) { checkRealm(); Option option = new Option(value, observable); addOption(option); if (hasListeners()) { observable.addValueChangeListener(listener); if (Boolean.TRUE.equals(observable.getValue())) { notifyIfChanged(indexOfObservable(observable)); } } }