Package javax.swing.text

Examples of javax.swing.text.JTextComponent.addKeyListener()


        final AbstractAutoCompleteAdaptor adaptor = new ComboBoxAdaptor(comboBox);
        final AutoCompleteDocument document = createAutoCompleteDocument(adaptor, strictMatching,
                stringConverter, editorComponent.getDocument());
        decorate(editorComponent, document, adaptor);
       
        editorComponent.addKeyListener(new AutoComplete.KeyAdapter(comboBox));
       
        //set before adding the listener for the editor
        comboBox.setEditor(new AutoCompleteComboBoxEditor(comboBox.getEditor(), document.stringConverter));
       
        // Changing the l&f can change the combobox' editor which in turn
View Full Code Here


            AbstractAutoCompleteAdaptor adaptor = new ComboBoxAdaptor(comboBox);
            AutoCompleteDocument document = createAutoCompleteDocument(adaptor, strictMatching,
                    acEditor.stringConverter, editorComponent.getDocument());
            decorate(editorComponent, document, adaptor);
           
            editorComponent.addKeyListener(new AutoComplete.KeyAdapter(comboBox));
           
            //set before adding the listener for the editor
            comboBox.setEditor(new AutoCompleteComboBoxEditor(comboBox.getEditor(), document.stringConverter));
        }
    }
View Full Code Here

                        listEditor.setPopupVisible(true);
                    }
                }
            });

        editor.addKeyListener(
            new KeyAdapter() {
                public void keyPressed(KeyEvent e) {
                    if (listEditor.isDisplayable()) {
                        listEditor.setPopupVisible(true);
                    }
View Full Code Here

                        listEditor.setPopupVisible(true);
                    }
                }
            });

        editor.addKeyListener(
            new KeyAdapter() {
                public void keyPressed(KeyEvent e) {
                    if (listEditor.isDisplayable()) {
                        listEditor.setPopupVisible(true);
                    }
View Full Code Here

        this.setRenderer(new BorderedComboBoxRenderer());
        JTextComponent comp = (JTextComponent)this.editor.getEditorComponent();
        comp.setBackground(this.getBackground());
        comp.setDocument(new FixedLengthDocument(0));

        comp.addKeyListener(new ComboBoxKeyHandler());
    }

  /**
     * Determine whether autoComplete is enabled or not. If autoComplete is true, the fill-in field will attempt
     * to populate the editor with a value from the list of possible values.
View Full Code Here

        this.setRenderer(new BorderedComboBoxRenderer());
        JTextComponent comp = (JTextComponent)this.editor.getEditorComponent();
        comp.setBackground(this.getBackground());
        comp.setDocument(new FixedLengthDocument(0));

        comp.addKeyListener(new ComboBoxKeyHandler());
    }

  /**
     * Determine whether autoComplete is enabled or not. If autoComplete is true, the fill-in field will attempt
     * to populate the editor with a value from the list of possible values.
View Full Code Here

        this.setRenderer(new BorderedComboBoxRenderer());
        JTextComponent comp = (JTextComponent)this.editor.getEditorComponent();
        comp.setBackground(this.getBackground());
        comp.setDocument(new FixedLengthDocument(0));

        comp.addKeyListener(new ComboBoxKeyHandler());
    }

  /**
     * Determine whether autoComplete is enabled or not. If autoComplete is true, the fill-in field will attempt
     * to populate the editor with a value from the list of possible values.
View Full Code Here

                            ForteKeyboardFocusManager.setTabTraversal(true);
                            textArea.transferFocus();
                        }
                    }
                };
                textArea.addKeyListener(newKeyAdapter);
                textArea.putClientProperty(KEY_ADAPTER_PROPERTY, newKeyAdapter);
            }
        }
        else {
            // we need to remove the existing key listener if there is one
View Full Code Here

                            ForteKeyboardFocusManager.setTabTraversal(true);
                            textArea.transferFocus();
                        }
                    }
                };
                textArea.addKeyListener(newKeyAdapter);
                textArea.putClientProperty(KEY_ADAPTER_PROPERTY, newKeyAdapter);
            }
        }
        else {
            // we need to remove the existing key listener if there is one
View Full Code Here

                            ForteKeyboardFocusManager.setTabTraversal(true);
                            textArea.transferFocus();
                        }
                    }
                };
                textArea.addKeyListener(newKeyAdapter);
                textArea.putClientProperty(KEY_ADAPTER_PROPERTY, newKeyAdapter);
            }
        }
        else {
            // we need to remove the existing key listener if there is one
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.