switch (condition) { case JComponent.WHEN_IN_FOCUSED_WINDOW:  return (InputMap) UIManager.get(prefix + ".windowInputMap"); case JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT: return (InputMap) UIManager.get(prefix + ".ancestorInputMap"); default: case JComponent.WHEN_FOCUSED: return (InputMap) UIManager.get(prefix + ".focusInputMap"); }
InputMap shared = (InputMap) SharedUIDefaults.get(prefix + ".focusInputMap"); if (shared != null) im.setParent(shared); return im;
  InputMap getInputMap(int condition)  {    String prefix = getPropertyPrefix();    switch (condition)      {      case JComponent.WHEN_IN_FOCUSED_WINDOW:        // FIXME: is this the right string? nobody seems to use it.        return (InputMap) UIManager.get(prefix + ".windowInputMap");       case JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT:        return (InputMap) UIManager.get(prefix + ".ancestorInputMap");      default:      case JComponent.WHEN_FOCUSED:        return (InputMap) UIManager.get(prefix + ".focusInputMap");      }  }