All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.datafx.samples.app.RemoveActionTask Maven / Gradle / Ivy

There is a newer version: 8.0b5
Show newest version
package org.datafx.samples.app;

import javax.inject.Inject;

/**
 * A Flow action that removes the currently selected Person instance from the data model
 */
public class RemoveActionTask implements Runnable {

    /**
     * The data model will be injected
     */
    @Inject
    private DataModel model;

    /**
     * Removes the selected person. This method will be called whenever the matching action is called in the Flow.
     */
    @Override
    public void run() {
        model.getPersons().remove(model.getSelectedPersonIndex());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy