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 |
|