Package v1.sulphurapi.interfaces
Interface GUIActionInterface
- All Known Implementing Classes:
APILoader
,EndpointsHandler
,GUIManager
,ObjectDialog
public interface GUIActionInterface
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
runAsyncAction
(Runnable action, String logMessageDone) Runs a given action asynchronously and logs a message when done.default void
runAsyncLightAction
(Runnable action)
-
Method Details
-
runAsyncAction
Runs a given action asynchronously and logs a message when done. This method is intended to be used for actions that may take time to complete, allowing the GUI to remain responsive. Use Lambda expressions to pass the action and log message:runAsyncAction(() -> { // Your action code here }, "Action completed successfully.");
- Parameters:
action
- The action to run in the background.logMessageDone
- The message to log when the action is completed.- See Also:
-
runAsyncLightAction
-