コード例 #1
0
  protected void installListeners() {
    super.installListeners();

    handler = new AquaFocusHandler();
    final JTextComponent c = getComponent();
    c.addFocusListener(handler);
    c.addPropertyChangeListener(handler);

    LookAndFeel.installProperty(c, "opaque", UIManager.getBoolean(getPropertyPrefix() + "opaque"));
    AquaUtilControlSize.addSizePropertyListener(c);
    AquaTextFieldSearch.installSearchFieldListener(c);
  }
コード例 #2
0
  void configureEditor(ComboBoxEditor newEditor) {
    if (editor != null) {
      editor.removeKeyListener(editorKeyListener);
      editor.removeFocusListener(editorFocusListener);
    }

    if (newEditor != null) {
      editor = (JTextComponent) newEditor.getEditorComponent();
      editor.addKeyListener(editorKeyListener);
      editor.addFocusListener(editorFocusListener);
      editor.setDocument(this);
    }
  }