@Override public final void addCloseTabListener(@NonNull final TabCloseListener listener) { Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null"); tabCloseListeners.add(listener); }
/** * Adds a new callback, which should be notified, when the tab's properties have been changed. * * @param callback * The callback, which should be added, as an instance of the type {@link Callback}. The * callback may not be null */ public final void addCallback(@NonNull final Callback callback) { Condition.INSTANCE.ensureNotNull(callback, "The callback may not be null"); this.callbacks.add(callback); }
@Override public final void addTabPreviewListener(@NonNull final TabPreviewListener listener) { Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null"); tabPreviewListeners.add(listener); }
/** * Adds a specific event handler to the dispatcher. * * @param handler * The event handler, which should be added, as an instance of hte class {@link * AbstractTouchEventHandler}. The event handler may not be null */ public final void addEventHandler(@NonNull final AbstractTouchEventHandler handler) { Condition.INSTANCE.ensureNotNull(handler, "The handler may not be null"); int key = handler.getPriority(); ListenerList<AbstractTouchEventHandler> handlers = eventHandlers.get(key); if (handlers == null) { handlers = new ListenerList<>(); eventHandlers.put(key, handlers); } handlers.add(handler); notifyOnAddedEventHandler(handler); }
@Override public final void addValidationListener( @NonNull final ValidationListener<CharSequence> listener) { validationListeners.add(listener); }
@Override public final void addWizardListener(@NonNull final WizardListener listener) { Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null"); wizardListeners.add(listener); }
/** * Adds a new listener, which should be notified, when the user navigates within the activity, * if it is used as a wizard. * * @param listener * The listener, which should be added, as an instance of the type {@link * WizardListener}. The listener may not be null */ public final void addWizardListener(@NonNull final WizardListener listener) { Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null"); wizardListeners.add(listener); }
/** * Adds a new listener, which should be notified, when a navigation preference has been added or * removed to/from the activity. * * @param listener * The listener, which should be added, as an instance of the type {@link * NavigationListener}. The listener may not be null */ public final void addNavigationListener(@NonNull final NavigationListener listener) { Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null"); navigationListeners.add(listener); }
/** * Adds a new listener, which should be notified, when an area is modified by the dialog. * * @param listener * The listener, which should be added, as an instance of the type {@link AreaListener}. * The listener may not be null */ public final void addAreaListener(@NonNull final AreaListener listener) { Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null"); this.areaListeners.add(listener); }
/** * Adds a listener, which should be notified, when the scroll view is scrolled. * * @param listener * The listener, which should be added, as an instance of the type {@link * ScrollListener}. The listener may not be null */ public void addScrollListener(@NonNull final ScrollListener listener) { Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null"); this.scrollListeners.add(listener); }
/** * Adds a new listener, which should be notified about the animation's internal state, to the * animation. * * @param listener * The listener, which should be added, as an instance of the type {@link * HideViewOnScrollAnimationListener}. The listener may not be null */ public final void addListener(@NonNull final HideViewOnScrollAnimationListener listener) { Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null"); listeners.add(listener); }
@Override public final void addValidationListener(@NonNull final ValidationListener<ValueType> listener) { Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null"); this.validationListeners.add(listener); }
/** * Adds a new listener, which should be notified, when the currently shown preference fragment * has been changed, to the activity. * * @param listener * The listener, which should be added, as an instance of the type {@link * PreferenceFragmentListener}. The listener may not be null */ public final void addPreferenceFragmentListener( @NonNull final PreferenceFragmentListener listener) { Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null"); preferenceFragmentListeners.add(listener); }
@Override public final void addOnPageChangeListener(@NonNull final OnPageChangeListener listener) { Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null"); onPageChangeListeners.add(listener); if (viewPager != null) { viewPager.addOnPageChangeListener(listener); } }