EDU-596 Remove show hint checkbox in Add/Edit Answer Placeholder dialog
[idea/community.git] / python / educational-core / course-creator / src / com / jetbrains / edu / coursecreator / ui / CCCreateAnswerPlaceholderPanel.java
index cc55b58ec101e02617d99e0d12dd9831bc583d2b..28cd014d328864f7ff4b6507dc942e37ef3ccbda 100644 (file)
@@ -2,41 +2,21 @@ package com.jetbrains.edu.coursecreator.ui;
 
 import javax.swing.*;
 import java.awt.*;
-import java.awt.event.ItemEvent;
-import java.awt.event.ItemListener;
 
 public class CCCreateAnswerPlaceholderPanel extends JPanel {
 
   private JPanel myPanel;
   private JTextArea myHintText;
-  private JCheckBox myCreateHintCheckBox;
   private JTextField myAnswerPlaceholderText;
 
   public CCCreateAnswerPlaceholderPanel() {
     super(new BorderLayout());
     add(myPanel, BorderLayout.CENTER);
-    enableHint(false);
     myHintText.setLineWrap(true);
     myHintText.setWrapStyleWord(true);
-    myCreateHintCheckBox.addItemListener(new ItemListener() {
-      @Override
-      public void itemStateChanged(ItemEvent e) {
-        int state = e.getStateChange();
-        // 1 for checked
-        enableHint(state == 1);
-        if (state == 2) {
-          resetHint();
-        }
-      }
-    });
-
     myAnswerPlaceholderText.grabFocus();
   }
 
-  private void enableHint(boolean isEnable) {
-    myHintText.setEnabled(isEnable);
-  }
-
   public void setAnswerPlaceholderText(String answerPlaceholderText) {
     myAnswerPlaceholderText.setText(answerPlaceholderText);
   }
@@ -53,14 +33,6 @@ public class CCCreateAnswerPlaceholderPanel extends JPanel {
     return myHintText.getText();
   }
 
-  public void doClick() {
-    myCreateHintCheckBox.doClick();
-  }
-
-  public void resetHint() {
-    myHintText.setText("");
-  }
-
   public JComponent getPreferredFocusedComponent() {
     return myAnswerPlaceholderText;
   }