All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
Drops the idea of using serializable Adds a new controller object which takes care of profiles and saving Moves profile independent settings to its own file Makes saving and loading from file a lot cleaner Fixes the bug preventing lastly used profile from loading Makes the profile object only do profile things Moves gui initialization to the controller object Updates vanilla version from 1.16.1 to 1.16.2 Moves backup to common functions
56 lines
1.4 KiB
Java
56 lines
1.4 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);
|
|
|
|
/**
|
|
* 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);
|
|
|
|
}
|