All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dvb.event.UserEventRepository Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package org.dvb.event ;

/**
 * The application will use this class to define the events that it wants to 
 * receive. Events that are able to be put in the repository are defined in
 * the UserEvent class.

Where a repository includes a KEY_PRESSED type event * without the KEY_RELEASED type event for the same key code or vice versa then * exclusive reservations shall be made for both event types but only the one * requested shall be received by the listener. Where a repository includes * a KEY_TYPED event without the corresponding KEY_PRESSED and * KEY_RELEASED * events (excluding KEY_PRESSED or KEY_RELEASED events for modifiers), * when an exclusive reservation is requested, it shall also be made for * those corresponding KEY_PRESSED and KEY_RELEASED events but only the * requested event shall be received by the listener.

* Repositories do not keep a count of the number of times a particular user * event is added or removed. Repeatedly adding an event to a repository has no * effect. Removing an event removes it regardless of the number of times it has * been added. For example, org.dvb.event.UserEventRepository.addUserEvent(UserEvent * event) does nothing in case that the event is already in the repository. * Events are considered to be already in the repository if an event with the same * triplet of family, type and code is already in the repository.

* If an application loses exclusive access to a repository, it shall lose access to all * events defined in that repository. * Repositories are resolved when they are passed into the methods of EventManager. * Adding or removing events from the repository after those method calls does not * affect the subscription to those events. *

Unless stated otherwise, all constants used in the specification of this class are defined * in java.awt.event.KeyEvent and its parent classes and not in this class. * @see UserEvent */ public class UserEventRepository extends RepositoryDescriptor { /** * The method to construct a new UserEventRepository. * * @param name the name of the repository. */ public UserEventRepository (String name) { } /** * Adds the given user event to the repository. * The values of the modifiers (if any) in the UserEvent shall be ignored by * the MHP terminal. * The value of the source used to construct the specified UserEvent shall * be ignored by the MHP terminal when the UserEventRepository is used to * specify events which an application wants to receive. * @param event the user event to be added in the repository. */ public void addUserEvent (UserEvent event) {} /** * Returns the list of the user events that are in the repository. * * @return an array which contains the user events that are in the * repository. */ public UserEvent[] getUserEvent () { return null;} /** * Remove a user event from the repository. Removing a user event * which is not in the repository shall have no effect. * * @param event the event to be removed from the repository. */ public void removeUserEvent (UserEvent event) {} /** * Adds the specified keycode to the repository. Keycodes added in this way shall * be listed in the list of user events returned by the getUserEvent method. * If a key is already in the repository, this method has no effect. * After calling this method, the keycode shall be present for both * the KEY_PRESSED and KEY_RELEASED modes. * @param keycode the key code. */ public void addKey (int keycode) {} /** * The method to remove a key from the repository. Removing a key which * is not in the repository has no effect. * After calling this method, the keycode shall not be present for both * the KEY_PRESSED and KEY_RELEASED modes. * * @param keycode the key code. */ public void removeKey (int keycode) {} /** * Adds the key codes for the numeric keys (VK_0, VK_1, VK_2, VK_3, * VK_4, VK_5, VK_6, VK_7, VK_8, VK_9). Any key codes already in the * repository will not be added again. * After calling this method, the keycodes shall be present for both * the KEY_PRESSED and KEY_RELEASED modes. */ public void addAllNumericKeys() {} /** * Adds the key codes for the colour keys (VK_COLORED_KEY_0, * VK_COLORED_KEY_1, VK_COLORED_KEY_2, VK_COLORED_KEY_3). Any key * codes already in the repository will not be added again. * After calling this method, the keycodes shall be present for both * the KEY_PRESSED and KEY_RELEASED modes. */ public void addAllColourKeys(){} /** * Adds the key codes for the arrow keys (VK_LEFT, VK_RIGHT, VK_UP, * VK_DOWN). Any key codes already in the repository will not be * added again. * After calling this method, the keycodes shall be present for both * the KEY_PRESSED and KEY_RELEASED modes. */ public void addAllArrowKeys(){} /** * Remove the key codes for the numeric keys (VK_0, VK_1, VK_2, VK_3, * VK_4, VK_5, VK_6, VK_7, VK_8, VK_9). Key codes from this set which * are not present in the repository will be ignored. * After calling this method, the keycodes shall not be present for both * the KEY_PRESSED and KEY_RELEASED modes. */ public void removeAllNumericKeys(){} /** * Removes the key codes for the colour keys (VK_COLORED_KEY_0, * VK_COLORED_KEY_1, VK_COLORED_KEY_2, VK_COLORED_KEY_3). Key codes from * this set which are not present in the repository will be ignored. * After calling this method, the keycodes shall not be present for both * the KEY_PRESSED and KEY_RELEASED modes. */ public void removeAllColourKeys(){} /** * Removes the key codes for the arrow keys (VK_LEFT, VK_RIGHT, VK_UP, * VK_DOWN). Key codes from this set which are not present in the * repository will be ignored. * After calling this method, the keycodes shall not be present for both * the KEY_PRESSED and KEY_RELEASED modes. */ public void removeAllArrowKeys(){} /** * Returns the name of the current repository as passed to the constructor. * @return a String with the name of the repository. */ public java.lang.String getName() {return null;} }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy