// FXThread -> @FXThread (#6195)
This commit is contained in:
1 parent
d35d1fc81e
commit
f0fcc4ac5e
3 files changed
+21
-14
No files matched your search
@@ -17,7 +17,10 @@
|
||||
*/
|
||||
package org.jackhuang.hmcl.java;
|
||||
|
||||
import com.google.gson.*;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonPrimitive;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import javafx.beans.property.ObjectProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
@@ -33,10 +36,14 @@ import org.jackhuang.hmcl.task.Task;
|
||||
import org.jackhuang.hmcl.ui.FXUtils;
|
||||
import org.jackhuang.hmcl.util.CacheRepository;
|
||||
import org.jackhuang.hmcl.util.DigestUtils;
|
||||
import org.jackhuang.hmcl.util.FXThread;
|
||||
import org.jackhuang.hmcl.util.Lang;
|
||||
import org.jackhuang.hmcl.util.gson.JsonUtils;
|
||||
import org.jackhuang.hmcl.util.io.FileUtils;
|
||||
import org.jackhuang.hmcl.util.platform.*;
|
||||
import org.jackhuang.hmcl.util.platform.Architecture;
|
||||
import org.jackhuang.hmcl.util.platform.OperatingSystem;
|
||||
import org.jackhuang.hmcl.util.platform.Platform;
|
||||
import org.jackhuang.hmcl.util.platform.UnsupportedPlatformException;
|
||||
import org.jackhuang.hmcl.util.platform.windows.WinReg;
|
||||
import org.jackhuang.hmcl.util.versioning.GameVersionNumber;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -269,7 +276,7 @@ public final class JavaManager {
|
||||
}
|
||||
}
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
public static void addJava(JavaRuntime java) throws InterruptedException {
|
||||
Map<Path, JavaRuntime> oldMap = getAllJavaMap();
|
||||
if (!oldMap.containsKey(java.getBinary())) {
|
||||
@@ -280,12 +287,12 @@ public final class JavaManager {
|
||||
}
|
||||
}
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
public static void removeJava(JavaRuntime java) throws InterruptedException {
|
||||
removeJava(java.getBinary());
|
||||
}
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
public static void removeJava(Path realPath) throws InterruptedException {
|
||||
Map<Path, JavaRuntime> oldMap = getAllJavaMap();
|
||||
if (oldMap.containsKey(realPath)) {
|
||||
|
||||
@@ -140,7 +140,7 @@ public final class Controllers {
|
||||
return stage;
|
||||
}
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
public static VersionPage getVersionPage() {
|
||||
if (versionPage == null) {
|
||||
versionPage = new VersionPage();
|
||||
@@ -156,17 +156,17 @@ public final class Controllers {
|
||||
}
|
||||
}
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
public static GameListPage getGameListPage() {
|
||||
return gameListPage.get();
|
||||
}
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
public static RootPage getRootPage() {
|
||||
return rootPage.get();
|
||||
}
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
public static LauncherSettingsPage getSettingsPage() {
|
||||
if (settingsPage == null) {
|
||||
settingsPage = new LauncherSettingsPage();
|
||||
@@ -182,12 +182,12 @@ public final class Controllers {
|
||||
}
|
||||
}
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
public static AccountListPage getAccountListPage() {
|
||||
return accountListPage.get();
|
||||
}
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
public static DownloadPage getDownloadPage() {
|
||||
if (downloadPage == null) {
|
||||
downloadPage = new DownloadPage();
|
||||
@@ -203,12 +203,12 @@ public final class Controllers {
|
||||
}
|
||||
}
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
public static Node getTerracottaPage() {
|
||||
return terracottaPage.get();
|
||||
}
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
public static DecoratorController getDecorator() {
|
||||
return decorator;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ final class ModListPageSkin extends SkinBase<ModListPage> {
|
||||
private final JFXListView<ModInfoObject> listView;
|
||||
private final JFXTextField searchField;
|
||||
|
||||
// FXThread
|
||||
@FXThread
|
||||
private boolean isSearching = false;
|
||||
|
||||
ModListPageSkin(ModListPage skinnable) {
|
||||
|
||||
Reference in new issue
Block a user