Class AnalogTimePicker


  • class AnalogTimePicker
    extends VPanel
    • Field Detail

      • dialRadius

        int dialRadius
      • dialCenter

        org.eclipse.swt.graphics.Point dialCenter
      • setH

        boolean setH
      • setM

        boolean setM
      • setS

        boolean setS
      • overHour

        boolean overHour
      • overMin

        boolean overMin
      • overSec

        boolean overSec
      • is24Hour

        boolean is24Hour
      • hourHand

        boolean hourHand
      • minHand

        boolean minHand
      • secHand

        boolean secHand
      • am_pm

        boolean am_pm
      • compact

        boolean compact
      • snap

        private int[] snap
      • increment

        long increment
      • pattern

        java.lang.String pattern
      • tapl

        private org.eclipse.swt.widgets.Listener tapl
    • Constructor Detail

      • AnalogTimePicker

        public AnalogTimePicker​(CDateTime parent)
    • Method Detail

      • createContents

        protected void createContents()
      • getFields

        public int[] getFields()
      • getIncrement

        long getIncrement()
      • getSnap

        int[] getSnap()
        Get the snap intervals used when setting the minutes and seconds.
        Returns:
        an int[2] where int[0] is the minutes snap, and int[1] is the seconds snap
        See Also:
        #setTimeSnap(int, int)
      • handleMouseDown

        private void handleMouseDown()
      • handleMouseMove

        private void handleMouseMove​(int x,
                                     int y)
      • handleMouseUp

        private void handleMouseUp()
      • handleMouseWheel

        private void handleMouseWheel​(int count)
      • setFields

        public void setFields​(int[] calendarFields)
      • setIncrement

        void setIncrement​(long millis)
      • setSelection

        private void setSelection​(java.util.Date date)
      • setSnap

        void setSnap​(int min,
                     int sec)
        Set the snap for the minutes and seconds. If the value given for either parameter is less than or equal to zero then its corresponding snap will be set to its default of one (1).
        Parameters:
        min - the snap interval for the minutes
        sec - the snap interval for the seconds
        See Also:
        getSnap()
      • setStyle

        public boolean setStyle​(int style,
                                boolean set)
        Overrides:
        setStyle in class VControl
      • snap

        private java.util.Date snap​(java.util.Date date)
        perform the snap and return a new "snapped" Date object
      • snap

        private java.util.Date snap​(java.util.Date date,
                                    boolean toIncrement)
        perform the snap and return a new "snapped" Date object
      • updateLabels

        void updateLabels()
      • updateView

        void updateView()