Main Assignment

Assignment 2

This assignment is about Actions, Internationalization and some more advanced features in the GUI.

Links and Resources

Deadline check list

  • Deadline is Monday, February 20, 23:59.
  • All code is committed to the CVS.
  • All diaries are updated
  • The JAR file of the project is uploaded to Studentportalen forum "Assignment 2" as thread Group X (where X is your group's number). Source code is included!

Tasks

  • All rules from assignment 1 apply.
  • The GUI must have menus, at least for "File", "Edit" and "Help". Under these menus there should be suitable submenus.
  • Use Action for all buttons and menus.
    • Aim to use all attributes of the Action. (See documentation of Action for details)
  • Action will require icons. Handle it as a resource. See getResource(String name) in the javadoc for Class.
    • To be able to get access to icons when your program runs as a JAR-file, you need to handle those as resources instead of files. See getResource(String name) in Class). Make sure that you add the icons in the right way to your project.
    • Free icons here.
    • Also note that Mnemonics are integers, not Strings. Your ResourceBundle only handles strings, though. You can resolve this problem by using something like the following code:

  //ResourceBundle contains:
  //menu.file.exit.mnemonic = x
  s = resourceBundle.getString("menu.file.exit.mnemonic");
  if (s != null) {
    Integer mn = new Integer(s.charAt(0));
    putValue(Action.MNEMONIC_KEY, mn);
  }

  • The database and XML-system should work completely now.
  • The TODO-application should now support at least two different languages.
  • Your application must implement a progress (or priority) "meter" for each TODO item that the user can manipulate to show how much of that task that is done (or how important the task is). Use your imagination for your choice of design.
  • When started, the application should remember its status from the last time. The application should open with the same windows open at the same place and with the same size as it had when it was last closed. Note that this also should behave ok for the first startup, or if the preferences file is damaged or is missing. You have many options:
    • Save the information needed in a file that is unique for your group´s application: HOME/.TODO-groupX, where X is your group id. $HOME refers to the user´s home directory, which you can lookup during runtime using System.getProperty("user.home"). (this allows me to open several different TODO-applications after each other).
    • Use java.util.Properties-files to store the information.
    • Use java.util.prefs.Preferences to store the information.