class DefaultComboBoxRenderer<V> extends ComboBoxRenderer<V> {

        private int textVisibleLeftPosition;

        /**
         * Default constructor
         */
        public DefaultComboBoxRenderer() {
            this.textVisibleLeftPosition = 0;
        }

        @Override
        public TerminalPosition getCursorLocation(ComboBox<V> comboBox) {
            if(comboBox.isDropDownFocused()) {
                if(comboBox.getThemeDefinition().isCursorVisible()) {
                    return new TerminalPosition(comboBox.getSize().getColumns() - 1, 0);
                }
                else {
                    return null;
                }
            }
            else {
                int textInputPosition = comboBox.getTextInputPosition();
                int textInputColumn = TerminalTextUtils.getColumnWidth(comboBox.getText().substring(0, textInputPosition));
                return new TerminalPosition(textInputColumn - textVisibleLeftPosition, 0);
            }
        }

        @Override
        public TerminalSize getPreferredSize(final ComboBox<V> comboBox) {<FILL_FUNCTION_BODY>}

        @Override
        public void drawComponent(TextGUIGraphics graphics, ComboBox<V> comboBox) {
            ThemeDefinition themeDefinition = comboBox.getThemeDefinition();
            if(comboBox.isReadOnly()) {
                graphics.applyThemeStyle(themeDefinition.getNormal());
            }
            else {
                if(comboBox.isFocused()) {
                    graphics.applyThemeStyle(themeDefinition.getActive());
                }
                else {
                    graphics.applyThemeStyle(themeDefinition.getPreLight());
                }
            }
            graphics.fill(' ');
            int editableArea = graphics.getSize().getColumns() - 2; //This is exclusing the 'drop-down arrow'
            int textInputPosition = comboBox.getTextInputPosition();
            int columnsToInputPosition = TerminalTextUtils.getColumnWidth(comboBox.getText().substring(0, textInputPosition));
            if(columnsToInputPosition < textVisibleLeftPosition) {
                textVisibleLeftPosition = columnsToInputPosition;
            }
            if(columnsToInputPosition - textVisibleLeftPosition >= editableArea) {
                textVisibleLeftPosition = columnsToInputPosition - editableArea + 1;
            }
            if(columnsToInputPosition - textVisibleLeftPosition + 1 == editableArea &&
                    comboBox.getText().length() > textInputPosition &&
                    TerminalTextUtils.isCharCJK(comboBox.getText().charAt(textInputPosition))) {
                textVisibleLeftPosition++;
            }

            String textToDraw = TerminalTextUtils.fitString(comboBox.getText(), textVisibleLeftPosition, editableArea);
            graphics.putString(0, 0, textToDraw);
            graphics.applyThemeStyle(themeDefinition.getInsensitive());
            graphics.setCharacter(editableArea, 0, themeDefinition.getCharacter("POPUP_SEPARATOR", Symbols.SINGLE_LINE_VERTICAL));
            if(comboBox.isFocused() && comboBox.isDropDownFocused()) {
                graphics.applyThemeStyle(themeDefinition.getSelected());
            }
            graphics.setCharacter(editableArea + 1, 0, themeDefinition.getCharacter("POPUP", Symbols.TRIANGLE_DOWN_POINTING_BLACK));
        }
    }

            TerminalSize size = TerminalSize.ONE.withColumns(
                    (comboBox.getItemCount() == 0 ? TerminalTextUtils.getColumnWidth(comboBox.getText()) : 0) + 2);
            //noinspection SynchronizationOnLocalVariableOrMethodParameter
            synchronized(comboBox) {
                for(int i = 0; i < comboBox.getItemCount(); i++) {
                    V item = comboBox.getItem(i);
                    size = size.max(new TerminalSize(TerminalTextUtils.getColumnWidth(item.toString()) + 2 + 1, 1));   // +1 to add a single column of space
                }
            }
            return size;
        
<methods>public com.googlecode.lanterna.TerminalPosition getCursorLocation() ,public com.googlecode.lanterna.gui2.InputFilter getInputFilter() ,public InteractableRenderer<ComboBox<V>> getRenderer() ,public final synchronized com.googlecode.lanterna.gui2.Interactable.Result handleInput(com.googlecode.lanterna.input.KeyStroke) ,public boolean isActivationStroke(com.googlecode.lanterna.input.KeyStroke) ,public boolean isEnabled() ,public boolean isFocusable() ,public boolean isFocused() ,public boolean isKeyboardActivationStroke(com.googlecode.lanterna.input.KeyStroke) ,public boolean isMouseActivationStroke(com.googlecode.lanterna.input.KeyStroke) ,public boolean isMouseDown(com.googlecode.lanterna.input.KeyStroke) ,public boolean isMouseDrag(com.googlecode.lanterna.input.KeyStroke) ,public boolean isMouseMove(com.googlecode.lanterna.input.KeyStroke) ,public boolean isMouseUp(com.googlecode.lanterna.input.KeyStroke) ,public final void onEnterFocus(com.googlecode.lanterna.gui2.Interactable.FocusChangeDirection, com.googlecode.lanterna.gui2.Interactable) ,public final void onLeaveFocus(com.googlecode.lanterna.gui2.Interactable.FocusChangeDirection, com.googlecode.lanterna.gui2.Interactable) ,public synchronized ComboBox<V> setEnabled(boolean) ,public synchronized ComboBox<V> setInputFilter(com.googlecode.lanterna.gui2.InputFilter) ,public ComboBox<V> takeFocus() <variables>private boolean enabled,private boolean inFocus,private com.googlecode.lanterna.gui2.InputFilter inputFilter