Thursday, November 4, 2010

File menu

The File menu is now fully functional it seems. There's logic to facilitate New/Open/Save/Save As/Exit. In support of this I implemented fairly standard logic to prompt a user to save his/her grid prior to program exit or change discarding in favor of a new or opened grid. I also added the file name currently being modified to the title bar in standard fashion, including a standard * (asterisk) to the immediate left of the file name to signify a dirty grid (unsaved changes).

2 comments:

  1. For your Open and Save As dialogs, I actually prefer the heavyweight FileDialog over lightweight (and admittedly more feature-rich) JFileChooser. The reason is that FileDialog opens the platform-native file dialog, while JFileChooser is a generic Swing-based chooser. In this instance, I choose platform consistency (i.e., the user sees the same file dialog that is seen in other applications on the same operating system) over application consistency (i.e., the user sees the same file dialog regardless of whether they are using the application on Linux, Windows, Mac OS X, etc.). Your open/save needs are fairly rudimentary anyway, and, as far as I can tell, don't benefit from whatever JFileChooser adds functionality-wise.

    ReplyDelete
  2. I knew from reading your code that the application can only handle one graph window at a time, but the presented UI suggests that it can handle more than one, a la your typical multi-document application. Based on your code, it does not seem too much of a stretch to add multi-document (graph) support eventually.

    ReplyDelete