ellipsisButton = new EllipsisButton("...");
ellipsisButton.addActionListener(action);
textField = new JTextArea();
textField.setLineWrap(true);
textField.setDocument(new NonFilteringPlainDocument());
textField.getInputMap().put(UtilMessages.getInstance().getKeyStroke
("AbstractStringValueCellEditor.Popup.Accelerator"), POPUP_EDITOR);
textField.getActionMap().put(POPUP_EDITOR, action);
textField.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), CANCEL_EDITOR);
textField.getActionMap().put(CANCEL_EDITOR, new CancelAction());
textField.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_MASK), NEWLINE_EDITOR);
textField.getActionMap().put(NEWLINE_EDITOR, new InsertNewLineAction());
textField.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), CONFIRM_EDITOR);
textField.getActionMap().put(CONFIRM_EDITOR, new SelectionAction());
textField.setBorder(BorderFactory.createEmptyBorder());
comboBox = new JComboBox();
final ComboBoxEditor boxEditor = comboBox.getEditor();
if (boxEditor instanceof BasicComboBoxEditor)
{
final BasicComboBoxEditor basicComboBoxEditor = (BasicComboBoxEditor) boxEditor;
final Object editorComponent = basicComboBoxEditor.getEditorComponent();
if (editorComponent instanceof JTextField)
{
final JTextField editorTextField = (JTextField) editorComponent;
editorTextField.setDocument(new NonFilteringPlainDocument());
}
}
comboBox.setRenderer(new EmptyValueListCellRenderer());
comboBox.addActionListener(new SelectionAction());
comboBox.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), new CancelAction());