void (MouseEvent e) { if (!icons.isEmpty()) { handleMouse(e, true); } else if (isSearchField(getComponent())) { final SearchAction action = getActionUnder(e.getPoint()); if (action != null) { switch (action) { case CLEAR -> { Object listener = getComponent().getClientProperty(ON_CLEAR); if (listener instanceof ActionListener) { ((ActionListener)listener).actionPerformed(new ActionEvent(getComponent(), ActionEvent.ACTION_PERFORMED, "action")); } getComponent().setText(""); } case NEWLINE -> { AbstractAction newLineAction = getNewLineAction(getComponent()); if (newLineAction != null) { newLineAction.actionPerformed(new ActionEvent(getComponent(), ActionEvent.ACTION_PERFORMED, "action")); } } } e.consume(); } } }