474 private class DCButtonListener implements ActionListener {
475 public void actionPerformed(ActionEvent e) {
476 if (e.getSource() == ok) {
477 DateTimeDialog.this.dateTimeDialogClose(true);
478 }
479 else
480 if (e.getSource() == cancel) {
481 DateTimeDialog.this.dateTimeDialogClose(false);
482 }
483 else
484 if (e.getSource() == now) {
485 DateTimeDialog.this.setCurrentTime();
486 }
487 else
488 if (e.getSource() == midnight) {
489 DateTimeDialog.this.setMidnight();
490 }
491 else
492 if (e.getSource() == help) {
493 if (hd != null)
494 hd.show();
495 else {
496 hd = new
497 HelpDialog(DateTimeDialog.this.parent,
498 getString("Help for Date and Time Dialog"), false);
499 hd.setVisible(true);
500 hd.setText(getString(hrb, "DateTimeDialogHelp"));
501 }
502 }
503 } // actionPerformed
504 }
505
506 /**
507 * Listener for any change in focus with respect to the text
508 * fields. When a text field is going out of focus, it detemines if the
509 * text value in it is valid. If not, it returns focus to that text
510 * field.
511 */
512 private class DCFocusListener extends FocusAdapter {
513
514 public void focusLost(FocusEvent e) {
|
474 private class DCButtonListener implements ActionListener {
475 public void actionPerformed(ActionEvent e) {
476 if (e.getSource() == ok) {
477 DateTimeDialog.this.dateTimeDialogClose(true);
478 }
479 else
480 if (e.getSource() == cancel) {
481 DateTimeDialog.this.dateTimeDialogClose(false);
482 }
483 else
484 if (e.getSource() == now) {
485 DateTimeDialog.this.setCurrentTime();
486 }
487 else
488 if (e.getSource() == midnight) {
489 DateTimeDialog.this.setMidnight();
490 }
491 else
492 if (e.getSource() == help) {
493 if (hd != null)
494 hd.setVisible(true);
495 else {
496 hd = new
497 HelpDialog(DateTimeDialog.this.parent,
498 getString("Help for Date and Time Dialog"), false);
499 hd.setVisible(true);
500 hd.setText(getString(hrb, "DateTimeDialogHelp"));
501 }
502 }
503 } // actionPerformed
504 }
505
506 /**
507 * Listener for any change in focus with respect to the text
508 * fields. When a text field is going out of focus, it detemines if the
509 * text value in it is valid. If not, it returns focus to that text
510 * field.
511 */
512 private class DCFocusListener extends FocusAdapter {
513
514 public void focusLost(FocusEvent e) {
|