home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / sdkjava.exe / SDKJava.cab / Samples / AFC / JNotepad / src / JNoteKeyFeature.java < prev    next >
Encoding:
Java Source  |  1998-03-05  |  1.3 KB  |  54 lines

  1. //
  2. // (c) 1998 Microsoft Corporation.  All rights reserved.
  3. //
  4. import KeyFeature;
  5. import com.ms.ui.event.*;
  6.  
  7. /**
  8. *    Class to wrap KeyFeature's key listener events a little
  9. *    and give key features a little easier access to key events.
  10. *    <p>
  11. *    Gives default implementations for the less important keyPressed()
  12. *    and keyReleased() methods. This is an abstract class; subclass it and
  13. *    add functionality before using.
  14. *
  15. *    @see    KeyFeature
  16. *    @see    ITextFeature
  17. *
  18. *    @version    1.0, 7/21/97
  19. */
  20.  
  21. public abstract class JNoteKeyFeature extends KeyFeature
  22. {
  23. /**
  24. *    Called when a key is pressed but before it
  25. *    is released. Does nothing in this class. Part of the IUIKeyListener interface. 
  26. *
  27. *    @param    ke    Key event being processed.
  28.     */
  29.     public synchronized void keyPressed(UIKeyEvent ke)
  30.     {
  31.     }
  32.     
  33.     /**
  34.     *    Called when a key is released. Does nothing in this class.
  35.     *    Part of the IUIKeyListener interface.
  36.     *
  37.     *    @param    ke    Key event being processed.
  38.     */    
  39.     public synchronized void keyReleased(UIKeyEvent ke)
  40.     {
  41.     }
  42.     
  43.     /**
  44.     *    Called when a key is typed (after it is released).
  45.     *    Does nothing in this class. Part of the IUIKeyListener interface.
  46.     *
  47.     *    @param    ke    Key event being processed.
  48.     */    
  49.     public synchronized void keyTyped(UIKeyEvent ke)
  50.     {
  51.     }
  52. }
  53.  
  54.