+
+ dayOfWeekLabel = addLabel("Wednesday-", 35, row - 1, "tmenu", false);
+ dayOfWeekLabel.setLabel(String.format("%-10s",
+ calendar.getDisplayName(Calendar.DAY_OF_WEEK,
+ Calendar.LONG, Locale.getDefault())));
+
+ addSpinner(35 + dayOfWeekLabel.getWidth(), row - 1,
+ new TAction() {
+ public void DO() {
+ calendar.add(Calendar.DAY_OF_WEEK, 1);
+ dayOfWeekLabel.setLabel(String.format("%-10s",
+ calendar.getDisplayName(
+ Calendar.DAY_OF_WEEK, Calendar.LONG,
+ Locale.getDefault())));
+ }
+ },
+ new TAction() {
+ public void DO() {
+ calendar.add(Calendar.DAY_OF_WEEK, -1);
+ dayOfWeekLabel.setLabel(String.format("%-10s",
+ calendar.getDisplayName(
+ Calendar.DAY_OF_WEEK, Calendar.LONG,
+ Locale.getDefault())));
+ }
+ }
+ );
+
+
+ activate(first);
+
+ statusBar = newStatusBar(i18n.getString("statusBar"));
+ statusBar.addShortcutKeypress(kbF1, cmHelp,
+ i18n.getString("statusBarHelp"));
+ statusBar.addShortcutKeypress(kbF2, cmShell,
+ i18n.getString("statusBarShell"));
+ statusBar.addShortcutKeypress(kbF3, cmOpen,
+ i18n.getString("statusBarOpen"));
+ statusBar.addShortcutKeypress(kbF10, cmExit,
+ i18n.getString("statusBarExit"));
+ }
+
+ // ------------------------------------------------------------------------
+ // TWindow ----------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * We need to override onClose so that the timer will no longer be called
+ * after we close the window. TTimers currently are completely unaware
+ * of the rest of the UI classes.
+ */
+ @Override
+ public void onClose() {
+ getApplication().removeTimer(timer);