从JavaFX中从Task API调用的嵌套函数更新标签

时间:2017-08-16 08:43:02

标签: javafx properties task

我正在使用此课程执行一些后台任务

setParent()

此任务依次调用DownloadHelper来执行某项任务。

class Download extends Task{
     protected Object call() throws Exception {
        try {
            updateMessage("Establishing Connection");
            DownloadHelper downloadHelper = new DownloadHelper();
            downloadHelper.performTask();
            return null;
        } catch (IOException | ParseException ex) {
            logger.error(ExceptionUtils.getStackTrace(ex));
            throw ex;
        }
    }
}

有没有办法从DownloadHelper类更新Task API(updateMessage())的状态消息。?

0 个答案:

没有答案
相关问题