Class DurationDialog

java.lang.Object
org.eclipse.swt.widgets.Dialog
com.iizigo.prop.editor.dialog.DurationDialog

public class DurationDialog extends Dialog
The duration dialog to edit a Long Millisecond duration.
Author:
Christopher Mindus
  • Constructor Details

    • DurationDialog

      public DurationDialog(Shell parent, int precision, long millis, boolean allowInfinite, long minimum, long maximum, long defaultValue)
      Create the dialog.
      Parameters:
      parent - The parent shell.
      precision - The precision: 0=milliseconds, 1=seconds, 2=minutes, 3=hours.
      millis - The value to edit, -1 for infinite.
      allowInfinite - Flag to allow indefinite.
      minimum - Minimum value, -1 for none.
      maximum - Maximum value, -1 for none.
  • Method Details

    • open

      public long open()
      Open the dialog.
      Returns:
      the result, or -2 for cancel.