亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? quizwizard1.java

?? eclipse平臺的CDT項目3.0版本的源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package cdt.projects.tree.wizards.quiz;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.LinkedList;
import javax.swing.*;
import javax.swing.border.BevelBorder;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;

import cdt.Frame1;
import cdt.gui.HTMLTextPane;
import cdt.projects.Project;
import cdt.projects.tree.nodes.*;
import cdt.wizard.WizardFrame;

/**
 * Initiates a wizard to create a quiz in a project.
 */
public final class QuizWizard1 extends WizardFrame {
    
    /** The JFrame acting as the parent to this wizard. */
    private JFrame parent;

    /** The Node representing the 'Quiz/Questions' folder. */
    private Node oldQuestionsFolder;
    /** The Node representing the 'Quiz/Answers' folder. */
    private Node oldAnswersFolder;
    /** The question that this instance of the QuizWizard represents. */
    private int questionNumber;

    /** The JPanel associated with the answer feedback. */
    private JPanel answerPanel;
    /**
     * The {@link cdt.gui.HTMLTextPane HTMLTextPane} containing
     * the text of the question.
     */
    private HTMLTextPane questionText;
    /**
     * The {@link cdt.gui.HTMLTextPane HTMLTextPane} containing
     * the text of a choice.
     */
    private HTMLTextPane choiceText;
    /**
     * The {@link cdt.gui.HTMLTextPane HTMLTextPane} containing
     * the text of the feedback to a choice.
     */
    private HTMLTextPane feedbackText;
    /**
     * The JCheckBox indicating whether or not the selected answer is the
     * correct answer.
     */
    private JCheckBox isCorrectChoice;

    /** The JPanel associated with the question text. */
    private JPanel questionPanel;

    /** The JList containing the choices for the question. */
    private JList choicesList;

    /**
     * The {@link cdt.projects.tree.nodes.Question Question} that this
     * frame of the wizard represents.
     */
    private Question question;

    /**
     * Creates the quiz wizard, starting on question number 1.
     *
     * @param parent The parent JFrame, in this case typically an instance of
     *      {@link cdt.Frame1 Frame1}.
     */
    public QuizWizard1(JFrame parent) {
        this(parent, 1);
    }

    /**
     * Creates the quiz wizard.
     *
     * @param parent The parent JFrame, in this case typically an instance of
     *      {@link cdt.Frame1 Frame1}.
     * @param questionNumber The number of the question that this QuizWizard
     *      is gathering information for.
     */
    private QuizWizard1(JFrame parent, int questionNumber) {
        super(parent);

        this.parent = parent;
        this.questionNumber = questionNumber;

        // Finds the 'Quiz/Questions' folder, or creates it if it cannot be found
        this.oldQuestionsFolder = (Node)data.get("oldQuestionsFolder");
        this.oldAnswersFolder = (Node)data.get("oldAnswersFolder");

        final String questionString = "Question #" +this.questionNumber;

        // Sets up the question to hold whatever information is already in the project tree
        Node questionNode = Node.findChildNode(this.oldQuestionsFolder, questionString);
        if(null != questionNode) {
            if(questionNode instanceof Question) {
                this.question = (Question)questionNode;
            } else {
                this.question = new Question("Question #" +this.questionNumber);
                this.question.setData(questionNode.getData());
            }
        } else {
            // Couldn't find the question in the old questions folder, so make a new one
            this.question = new Question("Question #" +this.questionNumber);
            this.question.setupDefault(this.questionNumber);
        }

        // Copies any previous answer information into the answer we store for this question
        Node answerNode = Node.findChildNode(this.oldAnswersFolder, questionString);
        if(null != answerNode && answerNode instanceof Hold) {
            LinkedList answerChildren = answerNode.getChildren();
            for(int i = 0; i < answerChildren.size(); ++i) {
                Node n = Node.findChildNode(answerNode, "Answer #" +(i+1));
                if(null != n) {
                    this.question.setFeedback(i, n.getData());
                }
            }
        }

        // Initializes the wizard
        init();
    }

    /**
     * Sets up the layout of this page.
     */
    public void customize() {
        showPreviousButton(true);
        showFinishButton(true);

        setTitle("Quiz Wizard");

        Dimension dim;

        // Sets up a JScrollPane for the question text
        this.questionText = new HTMLTextPane(parent, this.question.getQuestion());
        dim = new Dimension(360, 120);
        this.questionPanel = new JPanel();
        JScrollPane scrollPane = new JScrollPane(questionText);
        scrollPane.setPreferredSize(dim);
        scrollPane.setMinimumSize(dim);
        scrollPane.setMaximumSize(dim);
        scrollPane.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED,Color.lightGray,
                Color.lightGray,Color.gray,Color.darkGray));
        setupBorder(this.questionPanel, "Question " +this.questionNumber);
        this.questionPanel.add(scrollPane);
        dim = new Dimension(370, 100);
        this.questionPanel.setMaximumSize(dim);

        // Sets up the HTMLTextPane for the text for the selected choice
        this.choiceText = new HTMLTextPane(parent, "");
        this.choiceText.setEditable(false);
        this.choiceText.setBackground(Color.lightGray);
        dim = new Dimension(360, 120);
        JScrollPane scrollPane3 = new JScrollPane(this.choiceText);
        scrollPane3.setPreferredSize(dim);
        scrollPane3.setMinimumSize(dim);
        scrollPane3.setMaximumSize(dim);
        Border b = BorderFactory.createLineBorder(Color.darkGray);
        b = BorderFactory.createTitledBorder(b, "Answer Text");
        ((TitledBorder)b).setTitleJustification(TitledBorder.CENTER);
        scrollPane3.setBorder(b);

        // Sets up an HTMLTextPane for the feedback for the selected choice
        this.feedbackText = new HTMLTextPane(parent, "");
        this.feedbackText.setEditable(false);
        this.feedbackText.setBackground(Color.lightGray);
        dim = new Dimension(360, 120);
        JScrollPane scrollPane4 = new JScrollPane(this.feedbackText);
        scrollPane4.setPreferredSize(dim);
        scrollPane4.setMinimumSize(dim);
        scrollPane4.setMaximumSize(dim);
        b = BorderFactory.createLineBorder(Color.darkGray);
        b = BorderFactory.createTitledBorder(b, "Feedback");
        ((TitledBorder)b).setTitleJustification(TitledBorder.CENTER);
        scrollPane4.setBorder(b);

        // Sets up a JList of the choices
        Object choices[] = this.question.getChoices().toArray();
        DefaultListModel listModel = new DefaultListModel();
        for(int i = 0; i < choices.length; ++i) {
            if(i == question.getCorrectChoice()) {
                listModel.addElement("Answer " +(i+1)+ " **");
            } else {
                listModel.addElement("Answer " +(i+1));
            }
        }
        this.choicesList = new JList(listModel);
        this.choicesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        this.choicesList.addListSelectionListener(new ChoiceSelectionListener());

        // Puts the list into a JScrollPane
        dim = new Dimension(90, 120);
        JScrollPane scrollPane2 = new JScrollPane(this.choicesList);
        scrollPane2.setMaximumSize(dim);
        scrollPane2.setPreferredSize(dim);
        scrollPane2.setMinimumSize(dim);

        // Sets up a JCheckBox for whether or not the currently selected choice is correct
        isCorrectChoice = new JCheckBox("Is this choice correct?");
        isCorrectChoice.addActionListener(new CheckBoxListener(this.choicesList));
        isCorrectChoice.setEnabled(false);

        // Lays out the answerText, the feedbackText, and the isCorrectChoice
        // to be stacked on top of eachother vertically.
        JPanel nestedPanel = new JPanel();
        nestedPanel.setLayout(new BoxLayout(nestedPanel, BoxLayout.Y_AXIS));
        nestedPanel.add(scrollPane3);
        nestedPanel.add(Box.createVerticalStrut(5));
        nestedPanel.add(scrollPane4);
        nestedPanel.add(Box.createVerticalStrut(5));
        nestedPanel.add(new JSeparator(JSeparator.HORIZONTAL));
        nestedPanel.add(Box.createVerticalStrut(5));
        nestedPanel.add(isCorrectChoice);

        // Lays out the list to be on the left of the answerText and feedbackText
        this.answerPanel = new JPanel();
        this.answerPanel.setLayout(new BoxLayout(this.answerPanel, BoxLayout.X_AXIS));
        this.answerPanel.add(Box.createHorizontalStrut(10));
        this.answerPanel.add(scrollPane2);
        this.answerPanel.add(Box.createHorizontalStrut(10));
        this.answerPanel.add(new JSeparator(JSeparator.VERTICAL));
        this.answerPanel.add(Box.createHorizontalStrut(10));
        this.answerPanel.add(nestedPanel);
        setupBorder(this.answerPanel, "No Answer Selected");

        // Lays out the question section and the answer section to be
        // stacked vertically
        JPanel panel2 = new JPanel();
        panel2.setLayout(new BoxLayout(panel2, BoxLayout.Y_AXIS));
        panel2.add(this.questionPanel);
        panel2.add(Box.createVerticalStrut(5));
        panel2.add(new JSeparator(JSeparator.HORIZONTAL));
        panel2.add(Box.createVerticalStrut(5));
        panel2.add(this.answerPanel);

        // Adds the entire thing to the wizard panel.
        centerPanel.add(panel2, BorderLayout.CENTER);
    }

    /**
     * Sets up an HTMLEditorKit with the appropriate border.
     *
     * @param c The component to put the border onto.
     * @param title The title for the border.
     */
    private static void setupBorder(JComponent c, String title) {
        TitledBorder b = BorderFactory.createTitledBorder(title);
        b.setTitleJustification(TitledBorder.CENTER);
        c.setBorder(b);
    }

    /**
     * Saves the question given the values currently in the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久―日本道色综合久久| 欧美一区二区免费| 国产乱子伦视频一区二区三区| 亚洲午夜在线视频| 亚洲素人一区二区| 亚洲美女屁股眼交3| 国产精品国产自产拍在线| 国产精品久久久一区麻豆最新章节| 久久精品一区四区| 欧美极品少妇xxxxⅹ高跟鞋| 中文字幕av一区 二区| 国产精品女同一区二区三区| 亚洲欧洲精品一区二区三区| 亚洲欧美精品午睡沙发| 一区二区三区欧美日| 一区二区三区在线免费| 五月婷婷综合激情| 日韩国产欧美视频| 国产伦精品一区二区三区视频青涩| 国产麻豆91精品| av在线播放不卡| 欧美性猛片aaaaaaa做受| 555www色欧美视频| 久久这里只有精品6| 国产精品污www在线观看| 亚洲综合视频在线观看| 日韩国产一二三区| 国产成人精品免费看| 91免费国产在线观看| 欧美军同video69gay| 久久午夜羞羞影院免费观看| 亚洲欧洲一区二区在线播放| 亚洲妇女屁股眼交7| 国产精品亚洲成人| 日本福利一区二区| 精品对白一区国产伦| 亚洲日本在线视频观看| 免费视频一区二区| 99久久er热在这里只有精品15| 91麻豆精品国产综合久久久久久| 久久这里都是精品| 亚洲va韩国va欧美va| 粉嫩av一区二区三区粉嫩| 欧美精品三级日韩久久| 中文欧美字幕免费| 免费成人在线视频观看| 日本电影亚洲天堂一区| 欧美精品一区二| 性欧美疯狂xxxxbbbb| www.成人在线| 精品国产乱码久久久久久浪潮| 亚洲在线视频网站| 暴力调教一区二区三区| 精品国产一区二区三区忘忧草| 亚洲电影一级片| voyeur盗摄精品| 久久久久久久久久久久久女国产乱| 亚洲国产一区二区在线播放| 成人h动漫精品| 久久久久久免费毛片精品| 免费视频最近日韩| 在线不卡免费av| 曰韩精品一区二区| 91亚洲男人天堂| 国产精品美女久久久久aⅴ国产馆| 看电影不卡的网站| 日韩一区二区在线观看视频播放| 亚洲精品高清在线| 94色蜜桃网一区二区三区| 国产日产欧产精品推荐色| 精品一区二区三区在线视频| 91精品国产日韩91久久久久久| 午夜精品影院在线观看| 在线免费一区三区| 亚洲美女淫视频| 色欧美88888久久久久久影院| 日韩一区在线播放| 色婷婷综合久色| 亚洲男女一区二区三区| 在线观看一区不卡| 亚洲一区二区三区国产| 精品视频999| 亚洲成人免费观看| 91精品国产色综合久久ai换脸 | 中文在线一区二区| 国产成人av影院| 国产精品乱码一区二区三区软件| 丁香婷婷综合激情五月色| 国产精品午夜免费| 色综合av在线| 视频一区国产视频| 日韩精品一区二区在线观看| 国产一区二区三区在线观看免费视频| 精品国产乱码久久久久久浪潮| 国产成人综合在线| 《视频一区视频二区| 欧美色精品天天在线观看视频| 青青草国产精品97视觉盛宴| 久久久美女艺术照精彩视频福利播放| 国产99一区视频免费 | 一本大道av伊人久久综合| 一区二区在线观看av| 91精品欧美久久久久久动漫 | 亚洲成a人片在线不卡一二三区| 欧美精三区欧美精三区| 激情另类小说区图片区视频区| 日本一区二区高清| 欧美性猛交xxxx黑人交| 国产精品自拍三区| 亚洲午夜成aⅴ人片| 久久网站最新地址| 日本久久一区二区三区| 久久精品国产亚洲a| 最新热久久免费视频| 日韩一区二区麻豆国产| 91视频一区二区三区| 美国毛片一区二区| 亚洲男同1069视频| 久久精品免视看| 欧美日韩中文一区| 成人深夜在线观看| 日本亚洲最大的色成网站www| 中文字幕一区二区视频| 欧美一区二区三区视频免费 | 夜夜亚洲天天久久| 日本一区二区三区免费乱视频| 欧美人狂配大交3d怪物一区| 高清不卡一区二区在线| 免费欧美在线视频| 亚洲一区二区不卡免费| 中文字幕欧美区| 日韩欧美精品在线视频| 欧美日韩一级大片网址| 91视频免费看| 国产不卡在线一区| 精品一区二区三区欧美| 亚洲一二三四久久| 一区在线播放视频| 欧美激情一区二区三区在线| 日韩精品一区二区三区视频| 9191国产精品| 欧美吻胸吃奶大尺度电影| 色一情一乱一乱一91av| 91在线国产福利| 成人av资源网站| 国产成人午夜高潮毛片| 国产福利91精品| 韩国av一区二区三区| 九九国产精品视频| 久久99精品国产91久久来源| 日韩成人av影视| 秋霞电影网一区二区| 美女免费视频一区| 久久精品国产99国产精品| 久久av中文字幕片| 国内不卡的二区三区中文字幕 | 欧美人牲a欧美精品| 欧美日本免费一区二区三区| 欧美中文字幕一二三区视频| 91国产福利在线| 欧美日韩国产美女| 欧美一区二区黄色| 日韩三级.com| 久久综合狠狠综合| 国产日韩欧美精品在线| 欧美韩国日本不卡| 亚洲欧美福利一区二区| 一级做a爱片久久| 午夜精品福利视频网站| 蜜臀va亚洲va欧美va天堂| 六月丁香婷婷色狠狠久久| 国产在线播放一区| 成人午夜短视频| 日本电影欧美片| 日韩一区二区在线观看视频播放| 精品日韩欧美一区二区| 欧美激情中文字幕一区二区| 亚洲美女淫视频| 麻豆中文一区二区| 成人午夜av影视| 午夜电影网亚洲视频| 夜夜精品浪潮av一区二区三区| 日本午夜一本久久久综合| 国产在线视频不卡二| 99精品视频中文字幕| 欧美精品三级在线观看| 久久精品日韩一区二区三区| 亚洲精品国产一区二区精华液| 青青草国产精品亚洲专区无| 成人免费视频一区| 欧美日本韩国一区| 中文字幕av一区 二区| 日韩国产在线观看| 91在线精品秘密一区二区| 日韩欧美国产一二三区| 自拍偷拍亚洲激情| 国产一区二区在线看| 欧美亚洲图片小说| 欧美经典三级视频一区二区三区| 亚洲国产精品麻豆|