/** Reset the workspace to defaults: clear the workspace and then load the default layout. */ public static void resetToDefaults() { LOGGER.info("Reset workspace and load defaults."); clearWorkspace(); loadLayout(Settings.dataFolder + Settings.defaultLayoutFile); // Put drawers on top if (leftDrawer != null) TouchClient.putZoneOnTop(leftDrawer); if (rightDrawer != null) TouchClient.putZoneOnTop(rightDrawer); if (topDrawer != null) { TouchClient.putZoneOnTop(topDrawer); } setSelectedBrush(getAllBrushes().get(0)); setSelectedPaint(getAllPaints().get(0)); setActionPerformed(); PromptManager.reset(); idleApplication(); }
/** * Load a save file, including the layout and painting. * * @param save SaveFile object to load data from */ public static void loadSave(SaveFile save) { LOGGER.info("Loading a save file " + save.filename); clearWorkspace(); loadLayout(save.layoutPath); canvas.clearAndLoad(save.drawingPath); // Put drawers on top if (leftDrawer != null) TouchClient.putZoneOnTop(leftDrawer); if (rightDrawer != null) TouchClient.putZoneOnTop(rightDrawer); if (topDrawer != null) { TouchClient.putZoneOnTop(topDrawer); } setSelectedBrush(getAllBrushes().get(0)); setSelectedPaint(getAllPaints().get(0)); PromptManager.reset(); }