package ru.skipy.test.ide.idea6;

import javax.swing.*;
import java.awt.*;

public class DirectoryDialog extends JFrame {

    private JComboBox chooseDriveComboBox;
    private JButton okButton;
    private JButton cancelButton;
    private JTree chooseDirectoryTree;
    private JButton projectRootButton;
    private JButton createNewButton;
    private JPanel mainPanel;

    public DirectoryDialog() {
        super("DirectoryDialog - IntelliJ IDEA 6.0");
        setContentPane(mainPanel);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(400, 300);
        setLocationRelativeTo(null);
    }

    public static void main(String[] args) {
        DirectoryDialog dd = new DirectoryDialog();
        dd.setVisible(true);
    }

    {
// GUI initializer generated by IntelliJ IDEA GUI Designer
// >>> IMPORTANT!! <<<
// DO NOT EDIT OR ADD ANY CODE HERE!
        $$$setupUI$$$();
    }

    /**
     * Method generated by IntelliJ IDEA GUI Designer
     * >>> IMPORTANT!! <<<
     * DO NOT edit this method OR call it in your code!
     *
     * @noinspection HardCodedStringLiteral
     */
    private void $$$setupUI$$$() {
        mainPanel = new JPanel();
        mainPanel.setLayout(new GridBagLayout());
        mainPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5), null));
        chooseDriveComboBox = new JComboBox();
        final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();
        defaultComboBoxModel1.addElement("C:\\");
        defaultComboBoxModel1.addElement("D:\\");
        defaultComboBoxModel1.addElement("E:\\");
        chooseDriveComboBox.setModel(defaultComboBoxModel1);
        GridBagConstraints gbc;
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 1;
        gbc.anchor = GridBagConstraints.WEST;
        gbc.fill = GridBagConstraints.HORIZONTAL;
        mainPanel.add(chooseDriveComboBox, gbc);
        final JLabel label1 = new JLabel();
        label1.setText("Choose Drive");
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 0;
        gbc.weightx = 1.0;
        gbc.anchor = GridBagConstraints.SOUTHWEST;
        mainPanel.add(label1, gbc);
        okButton = new JButton();
        okButton.setText("Ok");
        gbc = new GridBagConstraints();
        gbc.gridx = 1;
        gbc.gridy = 1;
        gbc.fill = GridBagConstraints.HORIZONTAL;
        gbc.insets = new Insets(0, 5, 0, 0);
        mainPanel.add(okButton, gbc);
        final JLabel label2 = new JLabel();
        label2.setText("Choose Directory");
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 2;
        gbc.anchor = GridBagConstraints.SOUTHWEST;
        mainPanel.add(label2, gbc);
        cancelButton = new JButton();
        cancelButton.setText("Cancel");
        gbc = new GridBagConstraints();
        gbc.gridx = 1;
        gbc.gridy = 2;
        gbc.fill = GridBagConstraints.HORIZONTAL;
        gbc.insets = new Insets(0, 5, 10, 0);
        mainPanel.add(cancelButton, gbc);
        final JScrollPane scrollPane1 = new JScrollPane();
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 3;
        gbc.gridheight = 2;
        gbc.weightx = 1.0;
        gbc.weighty = 1.0;
        gbc.fill = GridBagConstraints.BOTH;
        mainPanel.add(scrollPane1, gbc);
        chooseDirectoryTree = new JTree();
        scrollPane1.setViewportView(chooseDirectoryTree);
        projectRootButton = new JButton();
        projectRootButton.setText("Project Root...");
        gbc = new GridBagConstraints();
        gbc.gridx = 1;
        gbc.gridy = 4;
        gbc.weighty = 1.0;
        gbc.anchor = GridBagConstraints.NORTH;
        gbc.fill = GridBagConstraints.HORIZONTAL;
        gbc.insets = new Insets(0, 5, 0, 0);
        mainPanel.add(projectRootButton, gbc);
        createNewButton = new JButton();
        createNewButton.setText("Create New...");
        gbc = new GridBagConstraints();
        gbc.gridx = 1;
        gbc.gridy = 3;
        gbc.fill = GridBagConstraints.HORIZONTAL;
        gbc.insets = new Insets(0, 5, 10, 0);
        mainPanel.add(createNewButton, gbc);
        label1.setLabelFor(chooseDriveComboBox);
        label2.setLabelFor(scrollPane1);
    }

    public JComponent $$$getRootComponent$$$() {
        return mainPanel;
    }
}

