Class StartupShutdownSongManager
java.lang.Object
org.netbeans.spi.sendopts.OptionProcessor
org.jjazz.songeditormanager.api.StartupShutdownSongManager
public class StartupShutdownSongManager
extends org.netbeans.spi.sendopts.OptionProcessor
implements Callable<Boolean>
Manage the opening/closing of song files at startup/shutdown.
Upon startup, if file names arguments are passed on the command line, open these files. Otherwise restore the last opened files depending on setting.
Upon shutdown ask for user confirmation for unsaved songs.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionReserved, do not use : use getInstance() instead. -
Method Summary
Modifier and TypeMethodDescriptioncall()Called upon shutdown.Get the files specified on the command line to be opened upon startup.static final StartupShutdownSongManagerbooleanvoidvoidsetOpenLastFilesUponStartup(boolean b)
-
Constructor Details
-
StartupShutdownSongManager
public StartupShutdownSongManager()Reserved, do not use : use getInstance() instead.(constructor must be made public because of @ServiceProvider)
-
-
Method Details
-
getInstance
-
setOpenLastFilesUponStartup
public void setOpenLastFilesUponStartup(boolean b) -
isOpenLastFilesUponStartup
public boolean isOpenLastFilesUponStartup() -
getCmdLineFilesToOpen
-
call
Called upon shutdown.Ask user confirmation if unsaved changes (whatever nb of unsaved files), close properly the opened songs (so that listeners with persistence like RecentFiles are notified).
Also save the opened songs for possible reopen at startup (see isOpenRecentFilesUponStartup()).
-
resetRecentFileList
public void resetRecentFileList()
-