Class AdjustTimeDialog

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

public class AdjustTimeDialog extends JDialog
Dialog for user friendly setting up start/end day time.
See Also:
  • Field Details

    • btCancel

      private JButton btCancel
    • btOK

      private JButton btOK
    • lbColumn1

      private JLabel lbColumn1
    • lbSelectTime

      private JLabel lbSelectTime
    • pnButtons

      private JPanel pnButtons
    • spHours

      private JSpinner spHours
    • spMinutes

      private JSpinner spMinutes
    • previousHours

      private Integer previousHours
      Last correct value of hours specified by user.
    • previousMinutes

      private Integer previousMinutes
      Last correct value of minutes specified by user.
    • task

      private Task task
      Task whose time should be edited.
  • Constructor Details

    • AdjustTimeDialog

      public AdjustTimeDialog(Frame parent, String title, Task task)
      Creates new dialog for time selection and presets hours and minutes
      Parameters:
      parent - Parent window that invoked this dialog.
      task - Source task whose time will be preset in the dialog.
    • AdjustTimeDialog

      public AdjustTimeDialog(Frame parent, String title, int hours, int minutes)
      Creates new dialog for time selection and presets hours and minutes
      Parameters:
      parent - Parent window that invoked this dialog.
      hours - Number of hours to be preset in the dialog.
      minutes - Number of minutes to be preset in the dialog.
    • AdjustTimeDialog

      public AdjustTimeDialog(Frame parent, String title)
      Creates new dialog for time selection.
      Parameters:
      parent - Parent window that invoked this dialog.
  • 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.
    • spMinutesKeyPressed

      private void spMinutesKeyPressed(KeyEvent evt)
    • spHoursKeyPressed

      private void spHoursKeyPressed(KeyEvent evt)
    • spMinutesStateChanged

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

      private void spHoursStateChanged(ChangeEvent evt)
      Method called when hours were be changed.
      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.
    • btOKActionPerformed

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

      private void formMouseEntered(MouseEvent evt)