void (@NotNull String findText, @NotNull String replaceText, boolean replaceMode, boolean multiline) { setMultilineInternal(multiline); boolean needToResetSearchFocus = mySearchTextComponent != null && mySearchTextComponent.hasFocus(); boolean needToResetReplaceFocus = myReplaceTextComponent != null && myReplaceTextComponent.hasFocus(); updateSearchComponent(findText); updateReplaceComponent(replaceText); myReplaceFieldWrapper.setVisible(replaceMode); myReplaceToolbarWrapper.setVisible(replaceMode); if (needToResetReplaceFocus) myReplaceTextComponent.requestFocusInWindow(); if (needToResetSearchFocus) mySearchTextComponent.requestFocusInWindow(); updateBindings(); updateActions(); List<Component> focusOrder = new ArrayList<>(); focusOrder.add(mySearchTextComponent); focusOrder.add(myReplaceTextComponent); focusOrder.addAll(myExtraSearchButtons); focusOrder.addAll(myExtraReplaceButtons); setFocusCycleRoot(true); setFocusTraversalPolicy(new ListFocusTraversalPolicy(focusOrder)); revalidate(); repaint(); }