Class DurationDialog


  • public class DurationDialog
    extends org.eclipse.swt.widgets.Dialog
    The duration dialog to edit a Long Millisecond duration.
    Author:
    Christopher Mindus
    • Constructor Summary

      Constructors 
      ConstructorDescription
      DurationDialog​(org.eclipse.swt.widgets.Shell parent, int precision, long millis, boolean allowInfinite, long minimum, long maximum, long defaultValue)
      Create the dialog.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      longopen()
      Open the dialog.
      • Methods inherited from class org.eclipse.swt.widgets.Dialog

        checkSubclass, getParent, getStyle, getText, setText
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DurationDialog

        public DurationDialog​(org.eclipse.swt.widgets.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 Detail

      • open

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