Class UpDownArrowSpinner

  • All Implemented Interfaces:
    java.util.EventListener, org.eclipse.swt.events.KeyListener, org.eclipse.swt.internal.SWTEventListener

    public class UpDownArrowSpinner
    extends java.lang.Object
    implements org.eclipse.swt.events.KeyListener
    Class to handle arrow up/down keys for e.g. a unit text in an entry field. When up/down is pressed, the text contents is parsed for a value (decimal too). The increment is by 1.
    Author:
    Christopher Mindus
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static voidenable​(org.eclipse.swt.widgets.Text text, boolean neg)
      Adds up/down support for a text control.
      voidkeyPressed​(org.eclipse.swt.events.KeyEvent e)
      Up/down pressed.
      voidkeyReleased​(org.eclipse.swt.events.KeyEvent e) 
      • Methods inherited from class java.lang.Object

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

      • enable

        public static void enable​(org.eclipse.swt.widgets.Text text,
                                  boolean neg)
        Adds up/down support for a text control.
      • keyPressed

        public void keyPressed​(org.eclipse.swt.events.KeyEvent e)
        Up/down pressed.
        Specified by:
        keyPressed in interface org.eclipse.swt.events.KeyListener
      • keyReleased

        public void keyReleased​(org.eclipse.swt.events.KeyEvent e)
        Specified by:
        keyReleased in interface org.eclipse.swt.events.KeyListener