Revert "Use JFXListView in place of custom components to accelerate rendering"

This reverts commit 0813211
This commit is contained in:
huanghongxun
2019-02-06 17:14:49 +08:00
parent bcaa019551
commit c0bcafd747
2 changed files with 47 additions and 55 deletions

View File

@@ -18,7 +18,10 @@
package org.jackhuang.hmcl.task;
import javafx.application.Platform;
import javafx.beans.property.*;
import javafx.beans.property.ReadOnlyDoubleProperty;
import javafx.beans.property.ReadOnlyDoubleWrapper;
import javafx.beans.property.ReadOnlyStringProperty;
import javafx.beans.property.ReadOnlyStringWrapper;
import org.jackhuang.hmcl.event.EventManager;
import org.jackhuang.hmcl.util.AutoTypingMap;
import org.jackhuang.hmcl.util.InvocationDispatcher;
@@ -55,18 +58,14 @@ public abstract class Task {
this.significance = significance;
}
private ReadOnlyObjectWrapper<TaskState> state = new ReadOnlyObjectWrapper<>(this, "state", TaskState.READY);
private TaskState state = TaskState.READY;
public TaskState getState() {
return state.get();
return state;
}
void setState(TaskState state) {
this.state.setValue(state);
}
public ReadOnlyObjectProperty<TaskState> stateProperty() {
return state.getReadOnlyProperty();
this.state = state;
}
private Throwable lastException = null;