Example usage for javafx.application Platform runLater

List of usage examples for javafx.application Platform runLater

Introduction

In this page you can find the example usage for javafx.application Platform runLater.

Prototype

public static void runLater(Runnable runnable) 

Source Link

Document

Run the specified Runnable on the JavaFX Application Thread at some unspecified time in the future.

Usage

From source file:org.sleuthkit.autopsy.timeline.ui.detailview.EventNodeBase.java

/**
 * TODO: this method implementation is wrong and just a place holder
 *//*  w  w  w  .java2s.  c o m*/
@Subscribe
public void handleTimeLineTagEvent(TagsDeletedEvent event) {
    Sets.SetView<Long> difference = Sets.difference(getEvent().getEventIDs(), event.getUpdatedEventIDs());

    if (false == difference.isEmpty()) {
        Platform.runLater(() -> {
            show(tagIV, true);
        });
    }
}

From source file:javafx1.JavaFX1.java

/**
     */* w  ww .java  2 s. c  o  m*/
     * @param s
     */
    @Override
    public void setPosition(String s) {

        RunLater rl = new RunLater(position, s);
        Platform.runLater(rl);
    }

From source file:com.github.drbookings.ui.controller.MainController.java

@FXML
private void handleMenuItemShowEarningsChart(final ActionEvent event) {
    Platform.runLater(() -> showEarningsChart());
}

From source file:at.ac.tuwien.qse.sepm.gui.controller.impl.OrganizerImpl.java

private <T> void refreshFilter(Aggregator<T> aggregator, FilterGroup<T> filter, Iterable<T> values,
        String defaultLabel, Function<T, String> converter) {
    Platform.runLater(() -> {
        // NOTE: Remember the values that were excluded before the refresh and exclude them.
        // That way the filter stays the same and new values are included automatically.
        Set<T> excluded = filter.getExcludedValues();
        filter.getItems().clear();/*from  w  w  w.j a va2  s.  c o m*/
        values.forEach(p -> {
            FilterControl<T> item = new FilterControl<>();
            item.setValue(p);
            item.setConverter(val -> {
                if (val == null) {
                    return defaultLabel;
                }
                return converter.apply(val);
            });
            item.setIncluded(!excluded.contains(p));
            item.setCount(aggregator.getCount(p));
            filter.getItems().add(item);
        });
    });
}

From source file:com.github.drbookings.ui.controller.MainController.java

@FXML
private void handleMenuItemShowNightlyRateChart(final ActionEvent event) {
    Platform.runLater(() -> showNightlyRateChart());
}

From source file:org.sleuthkit.autopsy.imagegallery.datamodel.grouping.GroupManager.java

void setGroupBy(DrawableAttribute<?> groupBy) {
    this.groupBy = groupBy;
    Platform.runLater(() -> groupByProp.set(groupBy));
}

From source file:com.github.drbookings.ui.controller.MainController.java

@FXML
private void handleMenuItemShowMonthlyMoney(final ActionEvent event) {
    Platform.runLater(() -> showMonthlyMoney());
}

From source file:com.github.drbookings.ui.controller.MainController.java

@FXML
private void handleMenuItemShowProfitChart(final ActionEvent event) {
    Platform.runLater(() -> showProfitChart());
}

From source file:org.jevis.jeconfig.JEConfig.java

/**
 * Inform the user the some precess is working
 *
 * @param working/*from w ww.j a v  a2  s .  co m*/
 */
public static void loadNotification(final boolean working) {
    Platform.runLater(new Runnable() {
        @Override
        public void run() {
            if (working) {
                getStage().getScene().setCursor(Cursor.WAIT);
            } else {
                getStage().getScene().setCursor(Cursor.DEFAULT);
            }
        }
    });

}

From source file:org.sleuthkit.autopsy.imagegallery.datamodel.grouping.GroupManager.java

void setSortOrder(SortOrder sortOrder) {
    this.sortOrder = sortOrder;
    Platform.runLater(() -> sortOrderProp.set(sortOrder));
}