diff options
Diffstat (limited to 'platform/platform-api/src/com/intellij/util/net/HTTPProxySettingsDialog.java')
-rw-r--r-- | platform/platform-api/src/com/intellij/util/net/HTTPProxySettingsDialog.java | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/platform/platform-api/src/com/intellij/util/net/HTTPProxySettingsDialog.java b/platform/platform-api/src/com/intellij/util/net/HTTPProxySettingsDialog.java index 52dfa7e7e5ab..5d7d807095f1 100644 --- a/platform/platform-api/src/com/intellij/util/net/HTTPProxySettingsDialog.java +++ b/platform/platform-api/src/com/intellij/util/net/HTTPProxySettingsDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,43 +22,48 @@ import org.jetbrains.annotations.NotNull; import javax.swing.*; import java.awt.event.ActionEvent; +@Deprecated +@SuppressWarnings("UnusedDeclaration") /** - * Created by IntelliJ IDEA. - * User: stathik - * Date: Oct 21, 2003 - * Time: 4:35:44 PM - * To change this template use Options | File Templates. + * @deprecated Use {@link com.intellij.util.net.HttpConfigurable#editConfigurable(javax.swing.JComponent)} + * to remove in IDEA 15 */ public class HTTPProxySettingsDialog extends DialogWrapper { - private final HTTPProxySettingsPanel panel; + private final HttpProxySettingsUi panel; private final Action okAction; private final Action cancelAction; public HTTPProxySettingsDialog() { super(false); + setTitle(CommonBundle.message("title.http.proxy.settings")); - panel = new HTTPProxySettingsPanel(HttpConfigurable.getInstance()); - panel.reset(); + final HttpConfigurable settings = HttpConfigurable.getInstance(); + panel = new HttpProxySettingsUi(settings); + panel.reset(settings); okAction = new AbstractAction(CommonBundle.getOkButtonText()) { - public void actionPerformed(ActionEvent e) { - panel.apply(); + @Override + public void actionPerformed(@NotNull ActionEvent e) { + panel.apply(settings); close(OK_EXIT_CODE); } }; okAction.putValue(DEFAULT_ACTION, Boolean.TRUE.toString()); cancelAction = new AbstractAction(CommonBundle.getCancelButtonText()) { - public void actionPerformed(ActionEvent e) { + @Override + public void actionPerformed(@NotNull ActionEvent e) { close(CANCEL_EXIT_CODE); } }; init(); } + @Override protected JComponent createCenterPanel() { - return panel.createComponent(); + return panel.getComponent(); } + @Override @NotNull protected Action[] createActions() { return new Action[]{okAction, cancelAction}; |