Ignore:
Timestamp:
2017-05-10T22:30:20+02:00 (7 years ago)
Author:
michael2402
Message:

Document fire mode parameter for selection event manager.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java

    r12070 r12096  
    8383     * Registers a new {@code SelectionChangedListener}.
    8484     * @param listener listener to add
    85      * @param fireMode EDT firing mode
     85     * @param fireMode Set this to IN_EDT_CONSOLIDATED if you want the event to be fired in the EDT thread.
     86     *                 Set it to IMMEDIATELY if youw ant the event to fire in the thread that caused the selection update.
    8687     */
    8788    public void addSelectionListener(SelectionChangedListener listener, FireMode fireMode) {
    88         if (fireMode == FireMode.IN_EDT)
     89        if (fireMode == FireMode.IN_EDT)  {
    8990            throw new UnsupportedOperationException("IN_EDT mode not supported, you probably want to use IN_EDT_CONSOLIDATED.");
    90         if (fireMode == FireMode.IN_EDT || fireMode == FireMode.IN_EDT_CONSOLIDATED) {
     91        } else if (fireMode == FireMode.IN_EDT_CONSOLIDATED) {
    9192            inEDTListeners.addIfAbsent(new ListenerInfo(listener));
    9293        } else {
Note: See TracChangeset for help on using the changeset viewer.