axel/src/main/java/fr/xgouchet/xmleditor/core/utils/DoubleDeckerBus.java
public void postOnUiThread(final Object event) {

        if (event == null) {
            throw new NullPointerException("Event to post must not be null.");
        }

        if (Looper.myLooper() == Looper.getMainLooper()) {
            post(event);
        } else {
            mainThread.post(new Runnable() {
                @Override
                public void run() {
                    post(event);
                }
            });
        }
    }
/**
     * Posts an event to all registered handlers, making sure the event is sent on the main thread.
     * This method will return successfully.
     * <p/>
     * If no handlers have been subscribed for event's class, and event is not already a DeadEvent, it will be wrapped in a DeadEvent and reposted.
     *
     * @param event event to post.
     * @throws NullPointerException if the event is null.
     */
Posts an event to all registered handlers, making sure the event is sent on the main thread.
This method will return successfully.

If no handlers have been subscribed for event's class, and event is not already a DeadEvent, it will be wrapped in a DeadEvent and reposted.

@param event event to post.
@throws NullPointerException if the event is null.
Posts an event to all registered handlers making sure the event is sent on the main thread . This method will return successfully . If no handlers have been subscribed for event ' s class and event is not already a DeadEvent it will be wrapped in a DeadEvent and reposted . @param event event to post . @throws NullPointerException if the event is null .
public void postOnUiThread(final Object event) {
        if (event == null) {
            throw new NullPointerException("Event to post must not be null.");
        }
        if (Looper.myLooper() == Looper.getMainLooper()) {
            post(event);
        } else {
            mainThread.post(new Runnable() {
                @Override
                public void run() {
                    post(event);
                }
            });
        }
    }
public void postOnUiThread ( final Object event ) { if ( event == null ) { throw new NullPointerException ( "Event to post must not be null." ) ; } if ( Looper . myLooper ( ) == Looper . getMainLooper ( ) ) { post ( event ) ; } else { mainThread . post ( new Runnable ( ) { @ Override public void run ( ) { post ( event ) ; } } ) ; } }
Posts an event to all registered handlers, making sure the event is sent on the main thread.
Posts an event to all registered handlers making sure the event is sent on the main thread .