This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 33884
Collapse All | Expand All

(-)src/org/netbeans/modules/xsl/ui/TransformPanel.form (-8 / +12 lines)
Lines 1-11 Link Here
1
<?xml version="1.0" encoding="UTF-8" ?>
1
<?xml version="1.0" encoding="UTF-8" ?>
2
2
3
<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
3
<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4
  <Properties>
5
    <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
6
      <Dimension value="[600, 155]"/>
7
    </Property>
8
  </Properties>
9
  <AuxValues>
4
  <AuxValues>
10
    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
5
    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
11
  </AuxValues>
6
  </AuxValues>
Lines 33-38 Link Here
33
    <Component class="javax.swing.JComboBox" name="inputComboBox">
28
    <Component class="javax.swing.JComboBox" name="inputComboBox">
34
      <Properties>
29
      <Properties>
35
        <Property name="editable" type="boolean" value="true"/>
30
        <Property name="editable" type="boolean" value="true"/>
31
        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
32
          <Connection code="comboSize(40)" type="code"/>
33
        </Property>
36
      </Properties>
34
      </Properties>
37
      <Events>
35
      <Events>
38
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="inputComboBoxActionPerformed"/>
36
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="inputComboBoxActionPerformed"/>
Lines 82-87 Link Here
82
    <Component class="javax.swing.JComboBox" name="transformComboBox">
80
    <Component class="javax.swing.JComboBox" name="transformComboBox">
83
      <Properties>
81
      <Properties>
84
        <Property name="editable" type="boolean" value="true"/>
82
        <Property name="editable" type="boolean" value="true"/>
83
        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
84
          <Connection code="comboSize(40)" type="code"/>
85
        </Property>
85
      </Properties>
86
      </Properties>
86
      <Events>
87
      <Events>
87
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="transformComboBoxActionPerformed"/>
88
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="transformComboBoxActionPerformed"/>
Lines 134-139 Link Here
134
    <Component class="javax.swing.JComboBox" name="outputComboBox">
135
    <Component class="javax.swing.JComboBox" name="outputComboBox">
135
      <Properties>
136
      <Properties>
136
        <Property name="editable" type="boolean" value="true"/>
137
        <Property name="editable" type="boolean" value="true"/>
138
        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
139
          <Connection code="comboSize(40)" type="code"/>
140
        </Property>
137
      </Properties>
141
      </Properties>
138
      <Events>
142
      <Events>
139
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="outputComboBoxActionPerformed"/>
143
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="outputComboBoxActionPerformed"/>
Lines 159-165 Link Here
159
      </AuxValues>
163
      </AuxValues>
160
      <Constraints>
164
      <Constraints>
161
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
165
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
162
          <GridBagConstraints gridX="1" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
166
          <GridBagConstraints gridX="1" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
163
        </Constraint>
167
        </Constraint>
164
      </Constraints>
168
      </Constraints>
165
    </Component>
169
    </Component>
Lines 174-180 Link Here
174
      </AuxValues>
178
      </AuxValues>
175
      <Constraints>
179
      <Constraints>
176
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
180
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
177
          <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="12" insetsBottom="6" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
181
          <GridBagConstraints gridX="0" gridY="5" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="12" insetsBottom="6" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
178
        </Constraint>
182
        </Constraint>
179
      </Constraints>
183
      </Constraints>
180
    </Component>
184
    </Component>
Lines 189-195 Link Here
189
      </Events>
193
      </Events>
190
      <Constraints>
194
      <Constraints>
191
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
195
        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
192
          <GridBagConstraints gridX="1" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="12" insetsBottom="6" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
196
          <GridBagConstraints gridX="1" gridY="5" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="12" insetsBottom="6" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
193
        </Constraint>
197
        </Constraint>
194
      </Constraints>
198
      </Constraints>
195
    </Component>
199
    </Component>
(-)src/org/netbeans/modules/xsl/ui/TransformPanel.java (-50 / +63 lines)
Lines 456-461 Link Here
456
        return showComboBox.getSelectedIndex();
456
        return showComboBox.getSelectedIndex();
457
    }
457
    }
458
    
458
    
459
    /**
460
     * Compute preffered dimension for combo with
461
     * particulal number of columns
462
     */
463
    private Dimension comboSize(int columns) {
464
        JTextField template = new JTextField();
465
        template.setColumns(columns);
466
        return template.getPreferredSize();
467
    }
459
    
468
    
460
    /** This method is called from within the constructor to
469
    /** This method is called from within the constructor to
461
     * initialize the form.
470
     * initialize the form.
Lines 482-490 Link Here
482
        showLabel.setDisplayedMnemonic (Util.THIS.getChar ("LBL_show_output_mnemonic"));
491
        showLabel.setDisplayedMnemonic (Util.THIS.getChar ("LBL_show_output_mnemonic"));
483
        showComboBox = new javax.swing.JComboBox();
492
        showComboBox = new javax.swing.JComboBox();
484
493
494
        FormListener formListener = new FormListener();
495
485
        setLayout(new java.awt.GridBagLayout());
496
        setLayout(new java.awt.GridBagLayout());
486
497
487
        setPreferredSize(new java.awt.Dimension(600, 155));
488
        inputLabel.setLabelFor(inputComboBox);
498
        inputLabel.setLabelFor(inputComboBox);
489
        inputLabel.setText(Util.THIS.getString ("LBL_XML_input"));
499
        inputLabel.setText(Util.THIS.getString ("LBL_XML_input"));
490
        gridBagConstraints = new java.awt.GridBagConstraints();
500
        gridBagConstraints = new java.awt.GridBagConstraints();
Lines 493-517 Link Here
493
        add(inputLabel, gridBagConstraints);
503
        add(inputLabel, gridBagConstraints);
494
504
495
        inputComboBox.setEditable(true);
505
        inputComboBox.setEditable(true);
496
        inputComboBox.addActionListener(new java.awt.event.ActionListener() {
506
        inputComboBox.setPreferredSize(comboSize(40));
497
            public void actionPerformed(java.awt.event.ActionEvent evt) {
507
        inputComboBox.addActionListener(formListener);
498
                inputComboBoxActionPerformed(evt);
499
            }
500
        });
501
508
502
        gridBagConstraints = new java.awt.GridBagConstraints();
509
        gridBagConstraints = new java.awt.GridBagConstraints();
503
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
510
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
504
        gridBagConstraints.weightx = 1.0;
505
        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
511
        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
512
        gridBagConstraints.weightx = 1.0;
506
        add(inputComboBox, gridBagConstraints);
513
        add(inputComboBox, gridBagConstraints);
507
514
508
        browseInputButton.setMnemonic(Util.THIS.getChar ("LBL_browse_file_mnemonic"));
515
        browseInputButton.setMnemonic(Util.THIS.getChar ("LBL_browse_file_mnemonic"));
509
        browseInputButton.setText(Util.THIS.getString ("LBL_browse_file"));
516
        browseInputButton.setText(Util.THIS.getString ("LBL_browse_file"));
510
        browseInputButton.addActionListener(new java.awt.event.ActionListener() {
517
        browseInputButton.addActionListener(formListener);
511
            public void actionPerformed(java.awt.event.ActionEvent evt) {
512
                browseInputButtonActionPerformed(evt);
513
            }
514
        });
515
518
516
        gridBagConstraints = new java.awt.GridBagConstraints();
519
        gridBagConstraints = new java.awt.GridBagConstraints();
517
        gridBagConstraints.insets = new java.awt.Insets(12, 5, 0, 11);
520
        gridBagConstraints.insets = new java.awt.Insets(12, 5, 0, 11);
Lines 527-553 Link Here
527
        add(transformLabel, gridBagConstraints);
530
        add(transformLabel, gridBagConstraints);
528
531
529
        transformComboBox.setEditable(true);
532
        transformComboBox.setEditable(true);
530
        transformComboBox.addActionListener(new java.awt.event.ActionListener() {
533
        transformComboBox.setPreferredSize(comboSize(40));
531
            public void actionPerformed(java.awt.event.ActionEvent evt) {
534
        transformComboBox.addActionListener(formListener);
532
                transformComboBoxActionPerformed(evt);
533
            }
534
        });
535
535
536
        gridBagConstraints = new java.awt.GridBagConstraints();
536
        gridBagConstraints = new java.awt.GridBagConstraints();
537
        gridBagConstraints.gridx = 1;
537
        gridBagConstraints.gridx = 1;
538
        gridBagConstraints.gridy = 1;
538
        gridBagConstraints.gridy = 1;
539
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
539
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
540
        gridBagConstraints.weightx = 1.0;
541
        gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 0);
540
        gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 0);
541
        gridBagConstraints.weightx = 1.0;
542
        add(transformComboBox, gridBagConstraints);
542
        add(transformComboBox, gridBagConstraints);
543
543
544
        browseXSLTButton.setMnemonic(Util.THIS.getChar ("LBL_browse_xslt_mnemonic"));
544
        browseXSLTButton.setMnemonic(Util.THIS.getChar ("LBL_browse_xslt_mnemonic"));
545
        browseXSLTButton.setText(Util.THIS.getString ("LBL_browse_xslt"));
545
        browseXSLTButton.setText(Util.THIS.getString ("LBL_browse_xslt"));
546
        browseXSLTButton.addActionListener(new java.awt.event.ActionListener() {
546
        browseXSLTButton.addActionListener(formListener);
547
            public void actionPerformed(java.awt.event.ActionEvent evt) {
548
                browseXSLTButtonActionPerformed(evt);
549
            }
550
        });
551
547
552
        gridBagConstraints = new java.awt.GridBagConstraints();
548
        gridBagConstraints = new java.awt.GridBagConstraints();
553
        gridBagConstraints.gridx = 2;
549
        gridBagConstraints.gridx = 2;
Lines 565-622 Link Here
565
        add(outputLabel, gridBagConstraints);
561
        add(outputLabel, gridBagConstraints);
566
562
567
        outputComboBox.setEditable(true);
563
        outputComboBox.setEditable(true);
568
        outputComboBox.addActionListener(new java.awt.event.ActionListener() {
564
        outputComboBox.setPreferredSize(comboSize(40));
569
            public void actionPerformed(java.awt.event.ActionEvent evt) {
565
        outputComboBox.addActionListener(formListener);
570
                outputComboBoxActionPerformed(evt);
571
            }
572
        });
573
566
574
        gridBagConstraints = new java.awt.GridBagConstraints();
567
        gridBagConstraints = new java.awt.GridBagConstraints();
575
        gridBagConstraints.gridx = 1;
568
        gridBagConstraints.gridx = 1;
576
        gridBagConstraints.gridy = 2;
569
        gridBagConstraints.gridy = 2;
577
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
570
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
578
        gridBagConstraints.weightx = 1.0;
579
        gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 0);
571
        gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 0);
572
        gridBagConstraints.weightx = 1.0;
580
        add(outputComboBox, gridBagConstraints);
573
        add(outputComboBox, gridBagConstraints);
581
574
582
        overwriteCheckBox.setSelected(true);
575
        overwriteCheckBox.setSelected(true);
583
        overwriteCheckBox.setText(Util.THIS.getString ("LBL_over_write"));
576
        overwriteCheckBox.setText(Util.THIS.getString ("LBL_over_write"));
584
        overwriteCheckBox.addActionListener(new java.awt.event.ActionListener() {
577
        overwriteCheckBox.addActionListener(formListener);
585
            public void actionPerformed(java.awt.event.ActionEvent evt) {
586
                overwriteCheckBoxActionPerformed(evt);
587
            }
588
        });
589
578
590
        gridBagConstraints = new java.awt.GridBagConstraints();
579
        gridBagConstraints = new java.awt.GridBagConstraints();
591
        gridBagConstraints.gridx = 1;
580
        gridBagConstraints.gridx = 1;
592
        gridBagConstraints.gridy = 3;
581
        gridBagConstraints.gridy = 4;
593
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
594
        gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 0);
582
        gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 0);
583
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
595
        add(overwriteCheckBox, gridBagConstraints);
584
        add(overwriteCheckBox, gridBagConstraints);
596
585
597
        showLabel.setText(Util.THIS.getString ("LBL_show_output"));
586
        showLabel.setText(Util.THIS.getString ("LBL_show_output"));
598
        gridBagConstraints = new java.awt.GridBagConstraints();
587
        gridBagConstraints = new java.awt.GridBagConstraints();
599
        gridBagConstraints.gridx = 0;
588
        gridBagConstraints.gridx = 0;
600
        gridBagConstraints.gridy = 4;
589
        gridBagConstraints.gridy = 5;
601
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
590
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
602
        gridBagConstraints.insets = new java.awt.Insets(6, 12, 6, 0);
591
        gridBagConstraints.insets = new java.awt.Insets(6, 12, 6, 0);
603
        add(showLabel, gridBagConstraints);
592
        add(showLabel, gridBagConstraints);
604
593
605
        showComboBox.setModel(new javax.swing.DefaultComboBoxModel (SHOW_NAMES));
594
        showComboBox.setModel(new javax.swing.DefaultComboBoxModel (SHOW_NAMES));
606
        showComboBox.addActionListener(new java.awt.event.ActionListener() {
595
        showComboBox.addActionListener(formListener);
607
            public void actionPerformed(java.awt.event.ActionEvent evt) {
608
                showComboBoxActionPerformed(evt);
609
            }
610
        });
611
596
612
        gridBagConstraints = new java.awt.GridBagConstraints();
597
        gridBagConstraints = new java.awt.GridBagConstraints();
613
        gridBagConstraints.gridx = 1;
598
        gridBagConstraints.gridx = 1;
614
        gridBagConstraints.gridy = 4;
599
        gridBagConstraints.gridy = 5;
615
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
600
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
616
        gridBagConstraints.weightx = 1.0;
617
        gridBagConstraints.insets = new java.awt.Insets(11, 12, 6, 0);
601
        gridBagConstraints.insets = new java.awt.Insets(11, 12, 6, 0);
602
        gridBagConstraints.weightx = 1.0;
618
        add(showComboBox, gridBagConstraints);
603
        add(showComboBox, gridBagConstraints);
619
604
605
    }
606
607
    // Code for dispatching events from components to event handlers.
608
609
    private class FormListener implements java.awt.event.ActionListener {
610
        public void actionPerformed(java.awt.event.ActionEvent evt) {
611
            if (evt.getSource() == inputComboBox) {
612
                TransformPanel.this.inputComboBoxActionPerformed(evt);
613
            }
614
            else if (evt.getSource() == browseInputButton) {
615
                TransformPanel.this.browseInputButtonActionPerformed(evt);
616
            }
617
            else if (evt.getSource() == transformComboBox) {
618
                TransformPanel.this.transformComboBoxActionPerformed(evt);
619
            }
620
            else if (evt.getSource() == browseXSLTButton) {
621
                TransformPanel.this.browseXSLTButtonActionPerformed(evt);
622
            }
623
            else if (evt.getSource() == outputComboBox) {
624
                TransformPanel.this.outputComboBoxActionPerformed(evt);
625
            }
626
            else if (evt.getSource() == overwriteCheckBox) {
627
                TransformPanel.this.overwriteCheckBoxActionPerformed(evt);
628
            }
629
            else if (evt.getSource() == showComboBox) {
630
                TransformPanel.this.showComboBoxActionPerformed(evt);
631
            }
632
        }
620
    }//GEN-END:initComponents
633
    }//GEN-END:initComponents
621
    
634
    
622
    
635
    
Lines 881-897 Link Here
881
    }//GEN-LAST:event_outputComboBoxActionPerformed
894
    }//GEN-LAST:event_outputComboBoxActionPerformed
882
    
895
    
883
    // Variables declaration - do not modify//GEN-BEGIN:variables
896
    // Variables declaration - do not modify//GEN-BEGIN:variables
897
    private javax.swing.JButton browseInputButton;
898
    private javax.swing.JButton browseXSLTButton;
899
    private javax.swing.JComboBox inputComboBox;
900
    private javax.swing.JLabel inputLabel;
884
    private javax.swing.JComboBox outputComboBox;
901
    private javax.swing.JComboBox outputComboBox;
902
    private javax.swing.JLabel outputLabel;
903
    private javax.swing.JCheckBox overwriteCheckBox;
885
    private javax.swing.JComboBox showComboBox;
904
    private javax.swing.JComboBox showComboBox;
886
    private javax.swing.JLabel showLabel;
905
    private javax.swing.JLabel showLabel;
887
    private javax.swing.JLabel outputLabel;
888
    private javax.swing.JButton browseInputButton;
889
    private javax.swing.JComboBox transformComboBox;
906
    private javax.swing.JComboBox transformComboBox;
890
    private javax.swing.JLabel transformLabel;
907
    private javax.swing.JLabel transformLabel;
891
    private javax.swing.JButton browseXSLTButton;
892
    private javax.swing.JCheckBox overwriteCheckBox;
893
    private javax.swing.JLabel inputLabel;
894
    private javax.swing.JComboBox inputComboBox;
895
    // End of variables declaration//GEN-END:variables
908
    // End of variables declaration//GEN-END:variables
896
    
909
    
897
    
910
    

Return to bug 33884