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;
43 if (instance == null) {
45 if (instance == null) {
56 if (startupWindowToUse == null) {
58 Collection<? extends StartupWindowInterface> startupWindows
61 int windowsCount = startupWindows.size();
62 if (windowsCount == 1) {
63 startupWindowToUse = startupWindows.iterator().next();
64 logger.log(Level.INFO,
"Will use the default startup window: " + startupWindowToUse.toString());
65 }
else if (windowsCount == 2) {
67 Iterator<? extends StartupWindowInterface> it = startupWindows.iterator();
68 while (it.hasNext()) {
71 startupWindowToUse = window;
72 logger.log(Level.INFO,
"Will use the custom startup window: " + startupWindowToUse.toString());
78 Iterator<? extends StartupWindowInterface> it = startupWindows.iterator();
79 while (it.hasNext()) {
81 if (!window.getClass().getCanonicalName().startsWith(
"org.sleuthkit.autopsy")) {
82 startupWindowToUse = window;
83 logger.log(Level.INFO,
"Will use the custom startup window: " + startupWindowToUse.toString());
89 if (startupWindowToUse == null) {
90 logger.log(Level.SEVERE,
"Unexpected error, no startup window chosen, using the default");
98 if (startupWindowToUse != null) {
99 startupWindowToUse.
open();
105 if (startupWindowToUse != null) {
106 startupWindowToUse.
close();
static volatile StartupWindowProvider instance
volatile StartupWindowInterface startupWindowToUse
synchronized static Logger getLogger(String name)
static StartupWindowProvider getInstance()
static final Logger logger