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
1 package com.jetbrains.edu.coursecreator.ui;
2
3 import javax.swing.*;
4 import java.awt.*;
5
6 public class CCCreateAnswerPlaceholderPanel extends JPanel {
7
8   private JPanel myPanel;
9   private JTextArea myHintText;
10   private JTextField myAnswerPlaceholderText;
11
12   public CCCreateAnswerPlaceholderPanel() {
13     super(new BorderLayout());
14     add(myPanel, BorderLayout.CENTER);
15     myHintText.setLineWrap(true);
16     myHintText.setWrapStyleWord(true);
17     myAnswerPlaceholderText.grabFocus();
18   }
19
20   public void setAnswerPlaceholderText(String answerPlaceholderText) {
21     myAnswerPlaceholderText.setText(answerPlaceholderText);
22   }
23
24   public void setHintText(String hintText) {
25     myHintText.setText(hintText);
26   }
27
28   public String getAnswerPlaceholderText() {
29     return myAnswerPlaceholderText.getText();
30   }
31
32   public String getHintText() {
33     return myHintText.getText();
34   }
35
36   public JComponent getPreferredFocusedComponent() {
37     return myAnswerPlaceholderText;
38   }
39 }