19 package org.sleuthkit.autopsy.casemodule;
21 import java.util.Collection;
22 import java.util.Iterator;
23 import java.util.logging.Level;
24 import org.openide.util.Lookup;
42 if (instance == null) {
44 if (instance == null) {
55 if (startupWindowToUse == null) {
57 Collection<? extends StartupWindowInterface> startupWindows =
60 int windowsCount = startupWindows.size();
61 if (windowsCount > 2) {
62 logger.log(Level.WARNING,
"More than 2 (" + windowsCount +
") start up windows discovered, will use the first custom one");
63 }
else if (windowsCount == 1) {
64 startupWindowToUse = startupWindows.iterator().next();
65 logger.log(Level.INFO,
"Will use the default startup window: " + startupWindowToUse.toString());
68 Iterator<? extends StartupWindowInterface> it = startupWindows.iterator();
69 while (it.hasNext()) {
72 startupWindowToUse = window;
73 logger.log(Level.INFO,
"Will use the custom startup window: " + startupWindowToUse.toString());
79 if (startupWindowToUse == null) {
80 logger.log(Level.SEVERE,
"Unexpected error, no custom startup window found, using the default");
92 if (startupWindowToUse != null) {
93 startupWindowToUse.
open();
99 if (startupWindowToUse != null) {
100 startupWindowToUse.
close();
static volatile StartupWindowProvider instance
volatile StartupWindowInterface startupWindowToUse
static StartupWindowProvider getInstance()
static Logger getLogger(String name)
static final Logger logger