From aa8ba10c811e2849115465a5cc67593f3f7295e9 Mon Sep 17 00:00:00 2001 From: Valentina Kiryushkina Date: Mon, 25 Jul 2016 19:22:19 +0300 Subject: [PATCH] Remove redundant inheritance from JPanel --- .../ui/CCCreateAnswerPlaceholderDialog.java | 2 +- .../coursecreator/ui/CCCreateAnswerPlaceholderPanel.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderDialog.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderDialog.java index 3ce4e8ecae8f..db3c0d053eeb 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderDialog.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderDialog.java @@ -64,7 +64,7 @@ public class CCCreateAnswerPlaceholderDialog extends DialogWrapper { @Nullable @Override protected JComponent createCenterPanel() { - return myPanel; + return myPanel.getMailPanel(); } @Nullable diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderPanel.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderPanel.java index c33ab81687e1..f2a479d2fa1b 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderPanel.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderPanel.java @@ -17,7 +17,7 @@ import java.awt.event.FocusEvent; import java.util.ArrayList; import java.util.List; -public class CCCreateAnswerPlaceholderPanel extends JPanel { +public class CCCreateAnswerPlaceholderPanel { private static String ourFirstHintText = "Type here to add hint"; private JPanel myPanel; @@ -33,9 +33,6 @@ public class CCCreateAnswerPlaceholderPanel extends JPanel { }}; public CCCreateAnswerPlaceholderPanel() { - super(new BorderLayout()); - add(myPanel, BorderLayout.CENTER); - myHintTextArea.setLineWrap(true); myHintTextArea.setWrapStyleWord(true); myPlaceholderTextArea.setBorder(BorderFactory.createLineBorder(JBColor.border())); @@ -109,6 +106,10 @@ public class CCCreateAnswerPlaceholderPanel extends JPanel { updateHintNumberLabel(); } + public JPanel getMailPanel() { + return myPanel; + } + private class GoForward extends AnAction { public GoForward() {