Ejemplo n.º 1
0
  public SpeedSearchBase(Comp component) {
    myComponent = component;

    myComponent.addFocusListener(
        new FocusAdapter() {
          public void focusLost(FocusEvent e) {
            manageSearchPopup(null);
          }
        });
    myComponent.addKeyListener(
        new KeyAdapter() {
          public void keyTyped(KeyEvent e) {
            processKeyEvent(e);
          }

          public void keyPressed(KeyEvent e) {
            processKeyEvent(e);
          }
        });

    installSupplyTo(component);
  }
Ejemplo n.º 2
0
  public SpeedSearchBase(Comp component) {
    myComponent = component;

    myComponent.addFocusListener(
        new FocusAdapter() {
          public void focusLost(FocusEvent e) {
            manageSearchPopup(null);
          }
        });
    myComponent.addKeyListener(
        new KeyAdapter() {
          public void keyTyped(KeyEvent e) {
            processKeyEvent(e);
          }

          public void keyPressed(KeyEvent e) {
            processKeyEvent(e);
          }
        });

    component.putClientProperty(SPEED_SEARCH_COMPONENT_MARKER, this);
  }