private void init()

in modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondPanel.java [69:294]


    private void init(){

        cmbLan = new JComboBox();
        cmbLan.addItem("java");
        cmbLan.setToolTipText("Select the language of the generated code");

        cmbServiceName = new JComboBox();
        add(cmbServiceName);
        cmbServiceName.setToolTipText("Select the name of the service that the code should be generated for");

        cmbPortName = new JComboBox();
        cmbPortName.setToolTipText("Select the port name that the code should be generated for");

        txtPacakgeName = new JTextField("org.axis2");
        txtPacakgeName.setToolTipText("Set the package name of the generated code");

        cmbdbtype = new JComboBox();
        cmbdbtype.addItem("adb");
        cmbdbtype.addItem("xmlbeans");
        cmbdbtype.addItem("none");
        cmbdbtype.setToolTipText("Select the databinding framework to be used in the generation process");

        chkTestCase = new JCheckBox("Generate Test Case", false);
        chkTestCase.setVisible(true);
        chkTestCase.setToolTipText("A test case will be generated if this is checked");

        ButtonGroup generationType = new ButtonGroup();

        clientSide = new JRadioButton("Generate Client Side",true);
        generationType.add(clientSide);

        ButtonGroup buttonGroup = new ButtonGroup();

        rdBoth = new JRadioButton("Generate both sync and async", true);
        buttonGroup.add(rdBoth);

        rdsyn = new JRadioButton("Generate sync only", false);
        buttonGroup.add(rdsyn);

        rdasync = new JRadioButton("Generate async only", false);
        buttonGroup.add(rdasync);

        serverSide = new JRadioButton("Generate Server Side");
        generationType.add(serverSide);

        serviceXML = new JCheckBox("Generate default service.xml", false);

        serverSideInterface = new JCheckBox("Generate an interface for skeleton", false);

        all = new JRadioButton("Generate All");
        generationType.add(all);

        model = new PackageNameTableModel(new Object [1][2]);
        table = new JTable(model);        
        spTable=new JScrollPane(table);

        cmbCodeGenOption =new JComboBox();
        cmbCodeGenOption .addItem("default");
        cmbCodeGenOption .addItem("custom");
        cmbCodeGenOption .setToolTipText("Select the Codegen option");


        this.setLayout(new GridBagLayout());

        this.add(new JLabel("Cogen Option")
                , new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.NONE
                , new Insets(1, 10, 0,10), 0, 0));

        this.add(cmbCodeGenOption
                , new GridBagConstraints(1, 0, GridBagConstraints.REMAINDER, 1, 1.0, 0.0
                , GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL
                , new Insets(1, 5, 0,10), 0, 0));
        cmbCodeGenOption.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    setEnabledForCodegenType();
                    update();
                }
            }
        });

        this.add(new JLabel("Out put lang")
                , new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.NONE
                , new Insets(1,10, 0,10), 0, 0));

        this.add(cmbLan
                , new GridBagConstraints(1, 1, GridBagConstraints.REMAINDER, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
                , new Insets(1, 5, 0,10), 0, 0));

        this.add(new JLabel("Service name")
                , new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.NONE
                , new Insets(1, 10, 0,10), 0, 0));

        this.add(cmbServiceName
                , new GridBagConstraints(1, 2, GridBagConstraints.REMAINDER, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
                , new Insets(1, 5, 0,10), 0, 0));

        this.add(new JLabel("port Name")
                , new GridBagConstraints(0, 3, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.NONE
                , new Insets(1, 10, 0,10), 0, 0));
        this.add(cmbPortName
                , new GridBagConstraints(1, 3, GridBagConstraints.REMAINDER, 1,1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
                , new Insets(1, 5, 0,10), 0, 0));
        this.add(new JLabel("DataBinding")
                , new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.NONE
                , new Insets(1, 10, 0,10), 0, 0));
        this.add(cmbdbtype
                , new GridBagConstraints(1, 4, GridBagConstraints.REMAINDER, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
                , new Insets(1, 5, 0,10), 0, 0));
        this.add(new JLabel("Custom Packege")
                , new GridBagConstraints(0, 5, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.NONE
                , new Insets(1, 10, 0,10), 0, 0));
        this.add(txtPacakgeName
                , new GridBagConstraints(1, 5, GridBagConstraints.REMAINDER, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
                , new Insets(1, 5, 0,10), 0, 0));
        this.add(chkTestCase
                , new GridBagConstraints(0, 6, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
                , new Insets(1, 10, 0,10), 0, 0));
        this.add(new JSeparator()
                , new GridBagConstraints(0, 7, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.BOTH
                , new Insets(1, 10, 1,1), 0, 0));


        this.add(clientSide
                , new GridBagConstraints(0, 8, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.NONE
                , new Insets(1, 10, 0,10), 0, 0));
        clientSide.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    setEnabledForCustom();
                    update();
                }
            }
        });
        this.add(rdBoth
                , new GridBagConstraints(0, 9, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.NONE
                , new Insets(1, 10, 0,10), 0, 0));
        this.add(rdsyn
                , new GridBagConstraints(1, 9, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.NONE
                , new Insets(1, 5, 0,10), 0, 0));
        this.add(rdasync
                , new GridBagConstraints(2, 9, 1, 1, 1.0,0.0
                , GridBagConstraints.WEST , GridBagConstraints.NONE
                , new Insets(1, 5, 0,10), 0, 0));


        this.add(new JSeparator()
                , new GridBagConstraints(0, 10, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.BOTH
                , new Insets(1, 10, 1,1), 0, 0));

        this.add(serverSide
                , new GridBagConstraints(0, 11, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
                , new Insets(1, 10, 0,10), 0, 0));
        serverSide.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    setEnabledForCustom();
                    update();
                }
            }
        });
        this.add(serviceXML
                , new GridBagConstraints(0, 12, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
                , new Insets(1, 10, 0,10), 0, 0));
        this.add(serverSideInterface
                , new GridBagConstraints(1, 12, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
                , new Insets(1, 5, 0,10), 0, 0));


        this.add(new JSeparator()
                , new GridBagConstraints(0, 13, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.BOTH
                , new Insets(1, 10, 1,1), 0, 0));


        this.add(all
                , new GridBagConstraints(0, 14, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
                , new Insets(1,10, 0,10), 0, 0));
        all.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    setEnabledForCustom();
                    update();
                }
            }
        });
        this.add(new JSeparator()
                , new GridBagConstraints(0, 15, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.BOTH
                , new Insets(1, 10, 1,1), 0, 0));

        this.add(new JLabel("Namespace to Package Mapping")
                , new GridBagConstraints(0, 16, 1, 1, 1.0, 0.0
                , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
                , new Insets(1,10, 0,10), 0, 0));

        this.add(spTable
                , new GridBagConstraints(0, 17, GridBagConstraints.REMAINDER, 1, 1.0, 1.0
                , GridBagConstraints.NORTHWEST , GridBagConstraints.BOTH
                , new Insets(1,10, 20,10), 0, 0));

        setNextButtonEnabled(false);
        setEnabledForCodegenType();

    }