private void setupBinding() {
        showing = Bindings.createBooleanBinding(() -> {
            if (getScene() != null && getScene().getWindow() != null) {
                return getScene().getWindow().isShowing();
            } else {
                return false;
            }            
        }, sceneProperty(), getScene().windowProperty(), getScene().getWindow().showingProperty());
        
        showing.addListener(o -> {
        if (showing.get()) {
            while(tileEventQueue.peek() != null) {
                TileEvent event = tileEventQueue.poll();
                    for (TileEventListener listener : tileEventListeners) { listener.onTileEvent(event); }
                }
            }

            boundsListeners.forEach(listener -> ((TileSkin) (getSkin())).setOnContentBoundsChanged(listener));
            ((TileSkin) (getSkin())).getContentBounds().fireBoundsEvent();

            fireTileEvent(REGIONS_ON_TOP_EVENT);
            fireTileEvent(RESIZE_EVENT);
        });
    }
Calling this method will stop all threads. This is needed when using
JavaFX on mobile devices when the device goes to sleep mode.
src/main/java/eu/hansolo/tilesfx/Tile.java