focus OK button in "Analyze stacktrace" dialog (IDEA-106726)

This commit is contained in:
peter
2013-05-17 15:45:05 +02:00
parent 036e6c6ce9
commit 48fc5efe01
2 changed files with 8 additions and 4 deletions
@@ -213,6 +213,10 @@ public class UnscrambleDialog extends DialogWrapper {
return new Action[]{createNormalizeTextAction(), getOKAction(), getCancelAction(), getHelpAction()};
}
public JComponent getPreferredFocusedComponent() {
return getButtons()[1]; //ok
}
private void createLogFileChooser() {
myLogFile = new TextFieldWithHistory();
JPanel panel = GuiUtils.constructFieldWithBrowseButton(myLogFile, new ActionListener() {
@@ -417,10 +421,6 @@ public class UnscrambleDialog extends DialogWrapper {
return "#com.intellij.unscramble.UnscrambleDialog";
}
public JComponent getPreferredFocusedComponent() {
return myStacktraceEditorPanel.getEditorComponent();
}
@Nullable
private static String getExceptionName(String unscrambledTrace) {
@SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
@@ -991,6 +991,10 @@ public abstract class DialogWrapper {
return getDimensionServiceKey();
}
protected JButton[] getButtons() {
return myButtons;
}
public int getExitCode() {
return myExitCode;
}