Class TaskDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class TaskDialog extends JDialog
Visualizer of task.
See Also:
  • Field Details

    • task

      private Task task
      Task that is being edited.
    • day

      private Day day
      Day which new task should be added to.
    • readOnly

      private boolean readOnly
      Flag determining if task can be edited or not.
    • btCancel

      private JButton btCancel
    • btOK

      private JButton btOK
    • chbAutoStart

      private JCheckBox chbAutoStart
    • chbNotification

      private JCheckBox chbNotification
    • chbPrivate

      private JCheckBox chbPrivate
    • chbRegular

      private JCheckBox chbRegular
    • chbStartTask

      private JCheckBox chbStartTask
    • cmbPriority

      private JComboBox cmbPriority
    • cmbRepetition

      private JComboBox cmbRepetition
    • lblCategory

      private JLabel lblCategory
    • lblColon

      private JLabel lblColon
    • lblDescription

      private JLabel lblDescription
    • lblNotes

      private JLabel lblNotes
    • lblPriority

      private JLabel lblPriority
    • pnButtons

      private JPanel pnButtons
    • spHours

      private JSpinner spHours
    • spMinutes

      private JSpinner spMinutes
    • spNotes

      private JScrollPane spNotes
    • taNotes

      private JTextArea taNotes
    • txtCategory

      private JTextField txtCategory
    • txtDescription

      private JTextField txtDescription
  • Constructor Details

    • TaskDialog

      public TaskDialog(Task task, Day day, boolean readOnly)
      Creates new dialog for editing of given task.
      Parameters:
      task - Task which is going to be edited.
      day - Day which the task belongs to.
      readOnly - Flag determining if task can be edited or not.
    • TaskDialog

      public TaskDialog(Day day)
      Creates new dialog for creating new task for given day.
      Parameters:
      day - Day which new task should be added to.
    • TaskDialog

      public TaskDialog(RegularTask regularTask)
      Creates new dialog for editing existing regular task.
      Parameters:
      regularTask - Regular task that should be edited.
    • TaskDialog

      public TaskDialog()
      Creates new dialog for creating new regular task.
  • Method Details

    • getFont

      public Font getFont()
      Returns font that should be used for all widgets in this component based on the language preferences specified by user.
      Specified by:
      getFont in interface MenuContainer
      Overrides:
      getFont in class Component
      Returns:
      Font to be used in this component.
    • initComponents

      private void initComponents()
      This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
    • chbPrivateKeyPressed

      private void chbPrivateKeyPressed(KeyEvent evt)
    • cmbRepetitionKeyPressed

      private void cmbRepetitionKeyPressed(KeyEvent evt)
    • chbRegularKeyPressed

      private void chbRegularKeyPressed(KeyEvent evt)
    • chbAutoStartKeyPressed

      private void chbAutoStartKeyPressed(KeyEvent evt)
    • spMinutesKeyPressed

      private void spMinutesKeyPressed(KeyEvent evt)
    • spHoursKeyPressed

      private void spHoursKeyPressed(KeyEvent evt)
    • chbNotificationKeyPressed

      private void chbNotificationKeyPressed(KeyEvent evt)
    • cmbPriorityKeyPressed

      private void cmbPriorityKeyPressed(KeyEvent evt)
    • taNotesKeyPressed

      private void taNotesKeyPressed(KeyEvent evt)
    • txtCategoryKeyPressed

      private void txtCategoryKeyPressed(KeyEvent evt)
    • txtDescriptionKeyPressed

      private void txtDescriptionKeyPressed(KeyEvent evt)
    • txtCategoryFocusLost

      private void txtCategoryFocusLost(FocusEvent evt)
    • txtCategoryFocusGained

      private void txtCategoryFocusGained(FocusEvent evt)
    • txtCategoryKeyTyped

      private void txtCategoryKeyTyped(KeyEvent evt)
    • btOKActionPerformed

      private void btOKActionPerformed(ActionEvent evt)
      Method called when ok button was pressed.
      Parameters:
      evt - Event that invoked this method call.
    • btCancelActionPerformed

      private void btCancelActionPerformed(ActionEvent evt)
      Method called when cancel button was pressed.
      Parameters:
      evt - Event that invoked this method call.
    • spMinutesStateChanged

      private void spMinutesStateChanged(ChangeEvent evt)
      Method called when minutes of notification time were changed.
      Parameters:
      evt - Event that invoked this method call.
    • spHoursStateChanged

      private void spHoursStateChanged(ChangeEvent evt)
      Method called when hours of notification time were changed.
      Parameters:
      evt - Event that invoked this method call.
    • chbNotificationChanged

      private void chbNotificationChanged(ActionEvent evt)
      Method called when notification was turned on/off.
      Parameters:
      evt - Event that invoked this method call.
    • closeDialog

      private void closeDialog(WindowEvent evt)
      Method called when dialog should be closed.
      Parameters:
      evt - Event that invoked this method call.
    • chbStartTaskKeyPressed

      private void chbStartTaskKeyPressed(KeyEvent evt)
    • formMouseEntered

      private void formMouseEntered(MouseEvent evt)
    • getTask

      public Task getTask()
      Return task that was edited or created by this dialog.
      Returns:
      Task that was edited or created by this dialog.
    • requestFocus

      public void requestFocus()
      Overrides:
      requestFocus in class Component