/** * Checks to see if there is already a path and name stored; if not, calls * "save as"; otherwise, saves the board to the specified file. */ private void boardSave() { if (curfileBoard == null) { boardSaveAs(); return; } // save! try { OutputStream os = new FileOutputStream(curfileBoard); // tell the board to save! client.getGame().getBoard().save(os); // okay, done! os.close(); } catch (IOException ex) { System.err.println("error opening file to save!"); //$NON-NLS-1$ System.err.println(ex); } }
} else if ("fileBoardSaveAs".equalsIgnoreCase(event.getActionCommand())) { //$NON-NLS-1$ ignoreHotKeys = true; boardSaveAs(); ignoreHotKeys = false; } else if ("fileBoardSaveAsImage".equalsIgnoreCase(event.getActionCommand())) { //$NON-NLS-1$