Files
Minecraft-Server-Launcher/src/main/java/net/knarcraft/minecraftserverlauncher/userinterface/GUI.java
EpicKnarvik97 e47b34a472 Improves output logging and fixes some bugs
Fixes an error caused by the BuildTools directory not being created
Creates functions for writing to files in CommonFunctions
Adds some more error info to the log when BuildTools fails to download
Fixes some typos
Makes sure all visible text is logged
2021-08-03 15:22:04 +02:00

70 lines
1.6 KiB
Java

package net.knarcraft.minecraftserverlauncher.userinterface;
import java.io.File;
/**
* Describes a generic GUI
*/
public interface GUI {
/**
* Displays a message to the user in the GUI message field
*
* @param message <p>The message contents</p>
*/
void setStatus(String message);
/**
* Displays an error to the user as an independent box
*
* @param title <p>The title of the error message</p>
* @param message <p>The error message contents</p>
*/
void showError(String title, String message);
/**
* Displays an error to the user as an independent box
*
* @param message <p>The error message contents</p>
*/
void showError(String message);
/**
* Displays a message to the user as an independent box
*
* @param title <p>The title of the message</p>
* @param message <p>The message contents</p>
*/
void showMessage(String title, String message);
/**
* Displays a message to the user as an independent box
*
* @param message <p>The message contents</p>
*/
void showMessage(String message);
/**
* Logs a message to the logfile
*
* @param message <p>The message to log</p>
*/
void logMessage(String message);
/**
* Logs an error to the logfile
*
* @param error <p>The error to log</p>
*/
void logError(String error);
/**
* Asks the user for a directory as a file object
*
* @param prompt <p>The prompt to show the user</p>
* @return <p>The directory given by the user</p>
*/
File askForDirectory(String prompt);
}