{
loadRpt.addChoosableFileFilter(new JFileFilterReports());
}
else
{
loadRpt.addChoosableFileFilter(new JFileFilterLabels());
}
loadRpt.setSelectedFile(new File(jTextFieldReportFilename.getText()));
}
catch (Exception e)
{
}
if (loadRpt.showOpenDialog(jButtonReportFileChooser) == JFileChooser.APPROVE_OPTION)
{
File selectedFile;
selectedFile = loadRpt.getSelectedFile();
if (selectedFile != null)
{
if (jTextFieldReportFilename.getText().compareTo(selectedFile.getName()) != 0)
{
jTextFieldReportFilename.setText(selectedFile.getName());
jButtonUpdate.setEnabled(true);
}
}
}
}
});
}
{
jTextFieldExecDir = new JTextField4j();
jDesktopPane1.add(jTextFieldExecDir);
jTextFieldExecDir.setBounds(164, 290, 427, 22);
jTextFieldExecDir.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent evt) {
jButtonUpdate.setEnabled(true);
}
public void keyReleased(KeyEvent evt) {
jButtonIconPreview.setIcon(JDBModule.getModuleIcon(jTextFieldIconFilename.getText(), (String) jComboBoxType.getSelectedItem()));
}
});
}
{
jTextFieldExecFilename = new JTextField4j();
jDesktopPane1.add(jTextFieldExecFilename);
jTextFieldExecFilename.setBounds(164, 262, 427, 22);
jTextFieldExecFilename.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent evt) {
jButtonUpdate.setEnabled(true);
}
public void keyReleased(KeyEvent evt) {
jButtonIconPreview.setIcon(JDBModule.getModuleIcon(jTextFieldIconFilename.getText(), (String) jComboBoxType.getSelectedItem()));
}
});
}
{
jLabel9 = new JLabel4j_std();
jDesktopPane1.add(jLabel9);
jLabel9.setText(lang.get("lbl_Module_Report_Filename"));
jLabel9.setHorizontalAlignment(SwingConstants.TRAILING);
jLabel9.setBounds(0, 234, 152, 21);
}
{
jLabel10 = new JLabel4j_std();
jDesktopPane1.add(jLabel10);
jLabel10.setText(lang.get("lbl_Module_Executable_Filename"));
jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);
jLabel10.setBounds(0, 263, 152, 21);
}
{
jButtonExecDirChooser = new JButton4j();
jDesktopPane1.add(jButtonExecDirChooser);
jButtonExecDirChooser.setText("..");
jButtonExecDirChooser.setBounds(591, 290, 17, 21);
jButtonExecDirChooser.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
JFileChooser loadDir = new JFileChooser();
try
{
File f = new File(new File("").getCanonicalPath());
loadDir.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
loadDir.setCurrentDirectory(f);
loadDir.setSelectedFile(new File(jTextFieldExecDir.getText()));
if (loadDir.showOpenDialog(jButtonExecDirChooser) == JFileChooser.APPROVE_OPTION)
{
File selectedFile;
selectedFile = loadDir.getSelectedFile();
if (selectedFile != null)
{
if (jTextFieldExecDir.getText().compareTo(selectedFile.getCanonicalPath()) != 0)
{
jTextFieldExecDir.setText(selectedFile.getCanonicalPath());
jButtonUpdate.setEnabled(true);
}
}
}
}
catch (Exception e)
{
}
}
});
}
{
jButtonExecFileChooser = new JButton4j();
jDesktopPane1.add(jButtonExecFileChooser);
jButtonExecFileChooser.setText("..");
jButtonExecFileChooser.setBounds(591, 262, 17, 21);
jButtonExecFileChooser.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
JFileChooser loadExec = new JFileChooser();
try
{
File f = new File(new File("").getCanonicalPath());
loadExec.setCurrentDirectory(f);
loadExec.addChoosableFileFilter(new JFileFilterExecs());
loadExec.setSelectedFile(new File(jTextFieldExecFilename.getText()));
if (loadExec.showOpenDialog(jButtonExecFileChooser) == JFileChooser.APPROVE_OPTION)
{
File selectedFile;
selectedFile = loadExec.getSelectedFile();
if (selectedFile != null)
{
if (jTextFieldExecFilename.getText().compareTo(selectedFile.getName()) != 0)
{
jTextFieldExecFilename.setText(selectedFile.getCanonicalPath());
jButtonUpdate.setEnabled(true);
}
}
}
}
catch (Exception e)
{
}
}
});
}
{
jButtonExecDirChooser_1 = new JButton4j();
jButtonExecDirChooser_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JFileChooser loadWeb = new JFileChooser();
try
{
File f = new File(new File("./help/html/commander4j").getCanonicalPath());
loadWeb.setCurrentDirectory(f);
loadWeb.setSelectedFile(new File(jTextFieldHelpsetid.getText()));
if (loadWeb.showOpenDialog(jButtonExecFileChooser) == JFileChooser.APPROVE_OPTION)
{
File selectedFile;
selectedFile = loadWeb.getSelectedFile();
String fullpath = selectedFile.getCanonicalPath();
fullpath = fullpath.replace(Common.base_dir, "{base_dir}");
if (selectedFile != null)
{
if (jTextFieldHelpsetid.getText().compareTo(selectedFile.getName()) != 0)
{
jTextFieldHelpsetid.setText(fullpath);
jButtonUpdate.setEnabled(true);
}
}
}
}
catch (Exception ex)
{
}
}
});
jButtonExecDirChooser_1.setText("..");
jButtonExecDirChooser_1.setBounds(591, 318, 17, 21);
jDesktopPane1.add(jButtonExecDirChooser_1);
}
{
jCheckBoxPrintPreview = new JCheckBox4j();
jCheckBoxPrintPreview.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jButtonUpdate.setEnabled(true);
}
});
jCheckBoxPrintPreview.setSelected(true);
jCheckBoxPrintPreview.setBackground(new Color(255, 255, 255));
jCheckBoxPrintPreview.setBounds(566, 177, 21, 21);
jDesktopPane1.add(jCheckBoxPrintPreview);
}
{
jCheckBoxPrintDialog = new JCheckBox4j();
jCheckBoxPrintDialog.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jButtonUpdate.setEnabled(true);
}
});
jCheckBoxPrintDialog.setSelected(true);
jCheckBoxPrintDialog.setBackground(new Color(255, 255, 255));
jCheckBoxPrintDialog.setBounds(566, 205, 21, 21);
jDesktopPane1.add(jCheckBoxPrintDialog);
}
{
jLabel3_1 = new JLabel4j_std();
jLabel3_1.setHorizontalTextPosition(SwingConstants.RIGHT);
jLabel3_1.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel3_1.setText(lang.get("lbl_Module_Print_Preview"));
jLabel3_1.setBounds(421, 177, 141, 21);
jDesktopPane1.add(jLabel3_1);
}
{
jLabel3_2 = new JLabel4j_std();
jLabel3_2.setHorizontalTextPosition(SwingConstants.RIGHT);
jLabel3_2.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel3_2.setText(lang.get("lbl_Module_Print_Dialog"));
jLabel3_2.setBounds(415, 205, 147, 21);
jDesktopPane1.add(jLabel3_2);
}
{
jLabel3_3 = new JLabel4j_std();
jLabel3_3.setHorizontalTextPosition(SwingConstants.RIGHT);
jLabel3_3.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel3_3.setText(lang.get("lbl_Module_Print_Copies"));
jLabel3_3.setBounds(421, 233, 141, 21);
jDesktopPane1.add(jLabel3_3);
}
{
jSpinnerPrintCopies = new JSpinner();
jSpinnerPrintCopies.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
jButtonUpdate.setEnabled(true);
}
});
jSpinnerPrintCopies.setFont(Common.font_std);
jSpinnerPrintCopies.setBounds(566, 233, 42, 21);
jDesktopPane1.add(jSpinnerPrintCopies);
}
{
lblResourceKey = new JLabel4j_std();
lblResourceKey.setText(lang.get("lbl_Language_Key"));
lblResourceKey.setHorizontalTextPosition(SwingConstants.RIGHT);
lblResourceKey.setHorizontalAlignment(SwingConstants.RIGHT);
lblResourceKey.setBounds(0, 35, 152, 21);
jDesktopPane1.add(lblResourceKey);
}
JLabel4j_std label4j_std = new JLabel4j_std();
label4j_std.setText(lang.get("lbl_Command_File"));
label4j_std.setHorizontalAlignment(SwingConstants.TRAILING);
label4j_std.setBounds(0, 364, 152, 21);
jDesktopPane1.add(label4j_std);
JLabel4j_std label4j_std_1 = new JLabel4j_std();
label4j_std_1.setText(lang.get("lbl_Label_File"));
label4j_std_1.setHorizontalAlignment(SwingConstants.TRAILING);
label4j_std_1.setBounds(0, 391, 152, 21);
jDesktopPane1.add(label4j_std_1);
jTextFieldAutoLabelCommandFilename.addKeyListener(new KeyAdapter() {
@Override
public void keyTyped(KeyEvent e) {
jButtonUpdate.setEnabled(true);
}
});
jTextFieldAutoLabelCommandFilename.setBounds(164, 363, 218, 22);
jDesktopPane1.add(jTextFieldAutoLabelCommandFilename);
jTextFieldAutoLabelLabelFilename.addKeyListener(new KeyAdapter() {
@Override
public void keyTyped(KeyEvent e) {
jButtonUpdate.setEnabled(true);
}
});
jTextFieldAutoLabelLabelFilename.setBounds(164, 391, 218, 21);
jDesktopPane1.add(jTextFieldAutoLabelLabelFilename);
jButtonAutoLabelCommandFileChooser.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JFileChooser loadCMD = new JFileChooser();
try
{
String path = jTextFieldAutoLabelCommandFilename.getText();
if (path.equals(""))
{
path=Common.auto_label_command;
}
File f = new File(new File(path).getCanonicalPath());
loadCMD.setCurrentDirectory(f);
loadCMD.setAcceptAllFileFilterUsed(false);
loadCMD.addChoosableFileFilter(new JFileFilterTXT());
loadCMD.setSelectedFile(new File(jTextFieldReportFilename.getText()));
}
catch (Exception e3)
{
}
if (loadCMD.showOpenDialog(jButtonAutoLabelCommandFileChooser) == JFileChooser.APPROVE_OPTION)
{
File selectedFile;
selectedFile = loadCMD.getSelectedFile();
if (selectedFile != null)
{
if (jTextFieldAutoLabelCommandFilename.getText().compareTo(selectedFile.getName()) != 0)
{
jTextFieldAutoLabelCommandFilename.setText(selectedFile.getName());
jButtonUpdate.setEnabled(true);
}
}
}
}
});
jButtonAutoLabelCommandFileChooser.setText("..");
jButtonAutoLabelCommandFileChooser.setBounds(383, 364, 17, 21);
jDesktopPane1.add(jButtonAutoLabelCommandFileChooser);
jButtonAutoLabelLabelDirChooser.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JFileChooser loadLab = new JFileChooser();
try
{
String path = Common.auto_label_labels;
File f = new File(new File(path).getCanonicalPath());
loadLab.setCurrentDirectory(f);
loadLab.setAcceptAllFileFilterUsed(false);
loadLab.addChoosableFileFilter(new JFileFilterLabels());
loadLab.setSelectedFile(new File(jTextFieldAutoLabelLabelFilename.getText()));
if (loadLab.showOpenDialog(jButtonReportFileChooser) == JFileChooser.APPROVE_OPTION)
{
File selectedFile;