why does the ui crash
This commit is contained in:
0
HMCLAPI/build.gradle
Normal file → Executable file
0
HMCLAPI/build.gradle
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/C.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/C.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/HMCLog.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/HMCLog.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/AppenderControl.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/AppenderControl.java
Normal file → Executable file
6
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/Configuration.java
Normal file → Executable file
6
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/Configuration.java
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -28,9 +28,9 @@ import org.jackhuang.hellominecraft.logging.layout.DefaultLayout;
|
||||
*/
|
||||
public class Configuration {
|
||||
|
||||
public ArrayList<IAppender> appenders = new ArrayList<IAppender>();
|
||||
public ArrayList<IAppender> appenders = new ArrayList<>();
|
||||
|
||||
public static Configuration DEFAULT;
|
||||
public static final Configuration DEFAULT;
|
||||
|
||||
static {
|
||||
DEFAULT = new Configuration();
|
||||
|
||||
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/Level.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/Level.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/LogEvent.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/LogEvent.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/LoggingException.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/LoggingException.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/appender/AbstractAppender.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/appender/AbstractAppender.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/appender/ConsoleAppender.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/appender/ConsoleAppender.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/appender/IAppender.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/appender/IAppender.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/appender/OutputStreamAppender.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/appender/OutputStreamAppender.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/layout/AbstractStringLayout.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/layout/AbstractStringLayout.java
Normal file → Executable file
6
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/layout/DefaultLayout.java
Normal file → Executable file
6
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/layout/DefaultLayout.java
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -27,11 +27,11 @@ import org.jackhuang.hellominecraft.logging.LogEvent;
|
||||
*/
|
||||
public class DefaultLayout extends AbstractStringLayout {
|
||||
|
||||
private static final SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("HH:mm:ss");
|
||||
|
||||
@Override
|
||||
public String toSerializable(LogEvent event) {
|
||||
return "[" + sdf.format(new Date()) + "] [" + event.threadName + "/" + event.level.name() + "] " + event.message.getFormattedMessage() + "\n";
|
||||
return "[" + SDF.format(new Date()) + "] [" + event.threadName + "/" + event.level.name() + "] " + event.message.getFormattedMessage() + "\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/layout/ILayout.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/layout/ILayout.java
Normal file → Executable file
8
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/logger/AbstractLogger.java
Normal file → Executable file
8
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/logger/AbstractLogger.java
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -24,7 +24,7 @@ import org.jackhuang.hellominecraft.logging.message.ParameterizedMessageFactory;
|
||||
import org.jackhuang.hellominecraft.logging.message.StringFormattedMessage;
|
||||
|
||||
public abstract class AbstractLogger
|
||||
implements ILogger {
|
||||
implements ILogger {
|
||||
|
||||
public static final Class<? extends IMessageFactory> DEFAULT_MESSAGE_FACTORY_CLASS = ParameterizedMessageFactory.class;
|
||||
|
||||
@@ -52,9 +52,7 @@ implements ILogger {
|
||||
private IMessageFactory createDefaultMessageFactory() {
|
||||
try {
|
||||
return (IMessageFactory) DEFAULT_MESSAGE_FACTORY_CLASS.newInstance();
|
||||
} catch (InstantiationException e) {
|
||||
throw new IllegalStateException(e);
|
||||
} catch (IllegalAccessException e) {
|
||||
} catch (InstantiationException | IllegalAccessException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/logger/ILogger.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/logger/ILogger.java
Normal file → Executable file
8
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/logger/Logger.java
Normal file → Executable file
8
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/logger/Logger.java
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -38,8 +38,12 @@ public class Logger extends AbstractLogger {
|
||||
}
|
||||
|
||||
public Logger(String name, IMessageFactory messageFactory, Level defaultLevel) {
|
||||
this(name, Configuration.DEFAULT, messageFactory, defaultLevel);
|
||||
}
|
||||
|
||||
public Logger(String name, Configuration config, IMessageFactory messageFactory, Level defaultLevel) {
|
||||
super(name, messageFactory);
|
||||
this.config = new PrivateConfig(Configuration.DEFAULT, this, defaultLevel);
|
||||
this.config = new PrivateConfig(config, this, defaultLevel);
|
||||
}
|
||||
|
||||
public synchronized void setLevel(Level level) {
|
||||
|
||||
10
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/logger/SimpleLogger.java
Normal file → Executable file
10
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/logger/SimpleLogger.java
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -85,14 +85,14 @@ public class SimpleLogger extends AbstractLogger {
|
||||
dateText = this.dateFormatter.format(now);
|
||||
}
|
||||
sb.append(dateText);
|
||||
sb.append(' ');
|
||||
sb.append(SPACE);
|
||||
}
|
||||
|
||||
sb.append(level.toString());
|
||||
sb.append(' ');
|
||||
sb.append(SPACE);
|
||||
if ((this.logName != null) && (this.logName.length() > 0)) {
|
||||
sb.append(this.logName);
|
||||
sb.append(' ');
|
||||
sb.append(SPACE);
|
||||
}
|
||||
sb.append(msg.getFormattedMessage());
|
||||
Object[] params = msg.getParameters();
|
||||
@@ -102,7 +102,7 @@ public class SimpleLogger extends AbstractLogger {
|
||||
else
|
||||
t = throwable;
|
||||
if (t != null) {
|
||||
sb.append(' ');
|
||||
sb.append(SPACE);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
t.printStackTrace(new PrintStream(baos));
|
||||
sb.append(baos.toString());
|
||||
|
||||
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/AbstractMessageFactory.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/AbstractMessageFactory.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/IMessage.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/IMessage.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/IMessageFactory.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/IMessageFactory.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/ObjectMessage.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/ObjectMessage.java
Normal file → Executable file
16
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/ParameterizedMessage.java
Normal file → Executable file
16
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/ParameterizedMessage.java
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -31,7 +31,7 @@ import java.util.Set;
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class ParameterizedMessage
|
||||
implements IMessage {
|
||||
implements IMessage {
|
||||
|
||||
public static final String RECURSION_PREFIX = "[...";
|
||||
public static final String RECURSION_SUFFIX = "...]";
|
||||
@@ -203,19 +203,23 @@ implements IMessage {
|
||||
boolean isEscaped = false;
|
||||
for (int i = 0; i < messagePattern.length(); i++) {
|
||||
char curChar = messagePattern.charAt(i);
|
||||
if (curChar == ESCAPE_CHAR)
|
||||
switch (curChar) {
|
||||
case ESCAPE_CHAR:
|
||||
isEscaped = !isEscaped;
|
||||
else if (curChar == DELIM_START) {
|
||||
break;
|
||||
case DELIM_START:
|
||||
if ((!isEscaped)
|
||||
&& (i < messagePattern.length() - 1)
|
||||
&& (messagePattern.charAt(i + 1) == DELIM_STOP)) {
|
||||
result++;
|
||||
i++;
|
||||
}
|
||||
|
||||
isEscaped = false;
|
||||
} else
|
||||
break;
|
||||
default:
|
||||
isEscaped = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/ParameterizedMessageFactory.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/ParameterizedMessageFactory.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/SimpleMessage.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/SimpleMessage.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/StringFormattedMessage.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/logging/message/StringFormattedMessage.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/DecompressTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/DecompressTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/DoingDoneListener.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/DoingDoneListener.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/DoubleTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/DoubleTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/ParallelTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/ParallelTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/ProgressProviderListener.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/ProgressProviderListener.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/Task.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/Task.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskInfo.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskInfo.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskList.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskList.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskObservable.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskObservable.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskRunnable.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskRunnable.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskRunnableArg1.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskRunnableArg1.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskWindow.form
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskWindow.form
Normal file → Executable file
10
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskWindow.java
Normal file → Executable file
10
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/TaskWindow.java
Normal file → Executable file
@@ -48,6 +48,7 @@ public class TaskWindow extends javax.swing.JDialog
|
||||
|
||||
private TaskList taskList;
|
||||
private final ArrayList<String> failReasons = new ArrayList();
|
||||
private String stackTrace = null, lastStackTrace = null;
|
||||
|
||||
/**
|
||||
* Creates new form DownloadWindow
|
||||
@@ -91,7 +92,11 @@ public class TaskWindow extends javax.swing.JDialog
|
||||
try {
|
||||
taskList.start();
|
||||
} catch (Exception e) {
|
||||
HMCLog.warn("Failed to start thread, maybe there're already a taskwindow here.", e);
|
||||
HMCLog.err("Failed to start thread, maybe there're already a taskwindow here.", e);
|
||||
HMCLog.err("There's the stacktrace of the this invoking.");
|
||||
HMCLog.err(stackTrace);
|
||||
HMCLog.err("There's the stacktrace of the last invoking.");
|
||||
HMCLog.err(lastStackTrace);
|
||||
MessageBox.Show(C.i18n("taskwindow.no_more_instance"));
|
||||
return false;
|
||||
}
|
||||
@@ -300,6 +305,7 @@ public class TaskWindow extends javax.swing.JDialog
|
||||
}
|
||||
|
||||
public boolean start() {
|
||||
String stacktrace = StrUtils.getStackTrace(new Throwable());
|
||||
return SwingUtils.invokeAndWait(() -> {
|
||||
synchronized (INSTANCE) {
|
||||
if (INSTANCE.isVisible())
|
||||
@@ -307,6 +313,8 @@ public class TaskWindow extends javax.swing.JDialog
|
||||
TaskWindow tw = inst();
|
||||
for (Task t : ll)
|
||||
tw.addTask(t);
|
||||
tw.lastStackTrace = tw.stackTrace;
|
||||
tw.stackTrace = stacktrace;
|
||||
return tw.start();
|
||||
}
|
||||
});
|
||||
|
||||
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/communication/DefaultPreviousResult.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/communication/DefaultPreviousResult.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/communication/PreviousResult.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/communication/PreviousResult.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/communication/PreviousResultRegistrar.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/communication/PreviousResultRegistrar.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/download/ContentGetAndShowTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/download/ContentGetAndShowTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/download/DownloadListener.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/download/DownloadListener.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/download/FileDownloadTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/download/FileDownloadTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/download/HTTPGetTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/download/HTTPGetTask.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/download/NetException.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/tasks/download/NetException.java
Normal file → Executable file
18
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/ArrayUtils.java
Normal file → Executable file
18
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/ArrayUtils.java
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -18,6 +18,7 @@
|
||||
package org.jackhuang.hellominecraft.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -121,4 +122,19 @@ public class ArrayUtils {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static <T> boolean equals(T[] a, T[] b) {
|
||||
if (a == null && b == null)
|
||||
return true;
|
||||
if (a == null || b == null)
|
||||
return false;
|
||||
if (a.length != b.length)
|
||||
return false;
|
||||
Arrays.sort(a);
|
||||
Arrays.sort(b);
|
||||
for (int i = 0; i < a.length; i++)
|
||||
if (a[i] == null && b[i] != null || a[i] != null && b[i] == null || !a[i].equals(b[i]))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/CollectionUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/CollectionUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/DoubleOutputStream.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/DoubleOutputStream.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/Event.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/Event.java
Normal file → Executable file
2
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/EventHandler.java
Normal file → Executable file
2
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/EventHandler.java
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
|
||||
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/IUpdateChecker.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/IUpdateChecker.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/LauncherPrintStream.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/LauncherPrintStream.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/MathUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/MathUtils.java
Normal file → Executable file
18
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/MessageBox.java
Normal file → Executable file
18
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/MessageBox.java
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -95,12 +95,12 @@ public class MessageBox {
|
||||
*/
|
||||
public static int Show(String Msg, String Title, int Option) {
|
||||
switch (Option) {
|
||||
case YES_NO_OPTION:
|
||||
case YES_NO_CANCEL_OPTION:
|
||||
case OK_CANCEL_OPTION:
|
||||
return SwingUtils.invokeAndWait(() -> JOptionPane.showConfirmDialog(null, Msg, Title, Option - 10));
|
||||
default:
|
||||
SwingUtils.invokeAndWait(() -> JOptionPane.showMessageDialog(null, Msg, Title, Option));
|
||||
case YES_NO_OPTION:
|
||||
case YES_NO_CANCEL_OPTION:
|
||||
case OK_CANCEL_OPTION:
|
||||
return SwingUtils.invokeAndWait(() -> JOptionPane.showConfirmDialog(null, Msg, Title, Option - 10));
|
||||
default:
|
||||
SwingUtils.invokeAndWait(() -> JOptionPane.showMessageDialog(null, Msg, Title, Option));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -127,4 +127,8 @@ public class MessageBox {
|
||||
public static int Show(String Msg) {
|
||||
return Show(Msg, TITLE, INFORMATION_MESSAGE);
|
||||
}
|
||||
|
||||
public static int ShowLocalized(String msg) {
|
||||
return Show(C.i18n(msg));
|
||||
}
|
||||
}
|
||||
|
||||
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/NetUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/NetUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/Pair.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/Pair.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/StrUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/StrUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/UpdateChecker.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/UpdateChecker.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/Utils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/Utils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/VersionNumber.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/VersionNumber.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/code/Base64.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/code/Base64.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/code/Charsets.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/code/Charsets.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/code/DigestUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/code/DigestUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/code/Hex.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/code/Hex.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/BiConsumer.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/BiConsumer.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/BiFunction.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/BiFunction.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/Consumer.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/Consumer.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/Function.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/Function.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/NonFunction.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/NonFunction.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/Predicate.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/Predicate.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/TriConsumer.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/functions/TriConsumer.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/Compressor.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/Compressor.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/FileUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/FileUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/IOUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/IOUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/Java.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/Java.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/JavaProcess.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/JavaProcess.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/JavaProcessMonitor.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/JavaProcessMonitor.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/JdkVersion.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/JdkVersion.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/OS.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/OS.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/Platform.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/Platform.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/ProcessManager.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/ProcessManager.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/ProcessThread.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/ProcessThread.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/ThreadExecutor.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/utils/system/ThreadExecutor.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/version/MinecraftRemoteLatestVersion.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/version/MinecraftRemoteLatestVersion.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/version/MinecraftRemoteVersion.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/version/MinecraftRemoteVersion.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/version/MinecraftRemoteVersions.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/version/MinecraftRemoteVersions.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/version/MinecraftVersionRequest.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/version/MinecraftVersionRequest.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/AbstractFilter.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/AbstractFilter.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/BasicColors.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/BasicColors.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/DropShadowBorder.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/DropShadowBorder.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/FastBlurFilter.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/FastBlurFilter.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/LogWindow.form
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/LogWindow.form
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/LogWindow.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/LogWindow.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/LogWindowOutputStream.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/LogWindowOutputStream.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/Selector.form
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/Selector.form
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/Selector.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/Selector.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/SwingUtils.java
Normal file → Executable file
0
HMCLAPI/src/main/java/org/jackhuang/hellominecraft/views/SwingUtils.java
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user