Esempio n. 1
0
  /**
   * Update whether a named signal source is active.
   *
   * @param name signal's name (not null)
   * @param sourceIndex index of the signal source (key or button) which is being updated
   * @param newState true if the source is active; false is the source is inactive
   */
  private void update(String name, int sourceIndex, boolean newState) {
    Indices status = statusMap.get(name);
    if (status == null) {
      logger.log(Level.WARNING, "Unknown signal: {0}", MyString.quote(name));
      return;
    }
    logger.log(
        Level.INFO, "name = {0}, newState = {1}", new Object[] {MyString.quote(name), newState});

    status.addRemove(sourceIndex, newState);
  }