Skip to content

Commit

Permalink
Revert "Application: Show splash screen at startup while loading is i…
Browse files Browse the repository at this point in the history
…n progress"

This reverts commit d2390b7.
  • Loading branch information
ShadelessFox committed May 16, 2024
1 parent d2390b7 commit 84b1c8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 201 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
public class Application implements com.shade.platform.model.app.Application {
private static final Logger log = LoggerFactory.getLogger(Application.class);

private Preferences preferences;
private ServiceManager serviceManager;
private final Preferences preferences;
private final ServiceManager serviceManager;

private MessageBusConnection connection;
private JFrame frame;
Expand All @@ -79,6 +79,11 @@ public class Application implements com.shade.platform.model.app.Application {
configureLogger();
}

public Application() {
this.preferences = Preferences.userRoot().node("decima-explorer");
this.serviceManager = new ServiceManager(getConfigPath());
}

@NotNull
public static Application getInstance() {
return (Application) ApplicationManager.getApplication();
Expand All @@ -97,25 +102,12 @@ public void start(@NotNull String[] args) {
log.info("CLI Arguments: {}", Arrays.asList(args));
log.info("-------------------");

if (args.length == 0) {
Splash.getInstance().show();
}

Splash.getInstance().set("Loading services");

this.preferences = Preferences.userRoot().node("decima-explorer");
this.serviceManager = new ServiceManager(getConfigPath());

if (args.length > 0) {
ApplicationCLI.execute(args);
}

Splash.getInstance().show();

connection = MessageBus.getInstance().connect();

Splash.getInstance().set("Configuring UI");

configureUI();
frame = new JFrame();
configureFrame(frame);
Expand Down Expand Up @@ -159,16 +151,12 @@ public void selectionCleared() {
panel.add(ViewManager.getInstance().getComponent(), BorderLayout.CENTER);
panel.add(statusBar, BorderLayout.SOUTH);

Splash.getInstance().set("Done");

frame.setTitle(getApplicationTitle());
frame.setIconImages(FlatSVGUtils.createWindowIconImages("/icons/application.svg"));
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
frame.setContentPane(panel);
frame.setVisible(true);

Splash.getInstance().hide();

Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(() -> {
try {
serviceManager.persist();
Expand Down
182 changes: 0 additions & 182 deletions modules/decima-ui/src/main/java/com/shade/decima/ui/Splash.java

This file was deleted.

0 comments on commit 84b1c8f

Please sign in to comment.