jDesktopPane1.setBackground(Color.WHITE);
this.getContentPane().add(jDesktopPane1);
jDesktopPane1.setPreferredSize(new java.awt.Dimension(577, 280));
jDesktopPane1.setLayout(null);
{
textFieldTranslatedDescripton = new JTextField4j();
textFieldTranslatedDescripton.setEditable(false);
textFieldTranslatedDescripton.setFocusCycleRoot(true);
textFieldTranslatedDescripton.setCaretPosition(0);
textFieldTranslatedDescripton.setBounds(164, 60, 280, 21);
jDesktopPane1.add(textFieldTranslatedDescripton);
}
{
jLabel1 = new JLabel4j_std();
jDesktopPane1.add(jLabel1);
jLabel1.setText(lang.get("lbl_Module_ID"));
jLabel1.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel1.setHorizontalTextPosition(SwingConstants.RIGHT);
jLabel1.setBounds(0, 10, 152, 21);
}
{
lblReportType = new JLabel4j_std();
lblReportType.setText(lang.get("lbl_Module_Report_Type"));
lblReportType.setHorizontalAlignment(SwingConstants.TRAILING);
lblReportType.setBounds(0, 206, 152, 21);
jDesktopPane1.add(lblReportType);
}
{
jTextFieldModuleId = new JTextField4j();
jDesktopPane1.add(jTextFieldModuleId);
jTextFieldModuleId.setHorizontalAlignment(SwingConstants.LEFT);
jTextFieldModuleId.setEditable(false);
jTextFieldModuleId.setBounds(164, 10, 280, 21);
jTextFieldModuleId.setEnabled(false);
}
{
jTextFieldResourceKey = new JTextField4j();
AbstractDocument doc = (AbstractDocument) jTextFieldResourceKey.getDocument();
doc.setDocumentFilter(new JFixedSizeFilter(JDBModule.field_description));
jDesktopPane1.add(jTextFieldResourceKey);
jTextFieldResourceKey.setFocusCycleRoot(true);
jTextFieldResourceKey.setBounds(164, 35, 280, 21);
jTextFieldResourceKey.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent evt) {
jButtonUpdate.setEnabled(true);
}
});
}
{
jButtonUpdate = new JButton4j(Common.icon_update);
jDesktopPane1.add(jButtonUpdate);
jButtonUpdate.setEnabled(false);
jButtonUpdate.setText(lang.get("btn_Save"));
jButtonUpdate.setHorizontalTextPosition(SwingConstants.RIGHT);
jButtonUpdate.setMnemonic(lang.getMnemonicChar());
jButtonUpdate.setBounds(136, 345, 112, 28);
jButtonUpdate.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
module.setResourceKey(jTextFieldResourceKey.getText());
module.setIconFilename(jTextFieldIconFilename.getText());
module.setHelpSetID(jTextFieldHelpsetid.getText());
module.setType((String) jComboBoxType.getSelectedItem());
module.setReportType((String) comboBox.getSelectedItem());
if (jCheckBoxDesktop.isSelected())
module.setDKActive("Y");
else
module.setDKActive("N");
if (jCheckBoxScanner.isSelected())
module.setRFActive("Y");
else
module.setRFActive("N");
if (jCheckBoxPrintPreview.isSelected())
module.setPrintPreview("Y");
else
module.setPrintPreview("N");
if (jCheckBoxPrintDialog.isSelected())
module.setPrintDialog("Y");
else
module.setPrintDialog("N");
module.setPrintCopies(Integer.valueOf(jSpinnerPrintCopies.getValue().toString()));
module.setReportFilename(jTextFieldReportFilename.getText());
module.setExecFilename(jTextFieldExecFilename.getText());
module.setExecDir(jTextFieldExecDir.getText());
if (module.update() == false)
{
JUtility.errorBeep();
JOptionPane.showMessageDialog(null, module.getErrorMessage(), "Error", JOptionPane.ERROR_MESSAGE);
}
jButtonUpdate.setEnabled(false);
}
});
}
{
jButtonClose = new JButton4j(Common.icon_close);
jDesktopPane1.add(jButtonClose);
jButtonClose.setText(lang.get("btn_Close"));
jButtonClose.setMnemonic(lang.getMnemonicChar());
jButtonClose.setBounds(364, 345, 112, 28);
jButtonClose.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
dispose();
}
});
}
{
jLabel3 = new JLabel4j_std();
jDesktopPane1.add(jLabel3);
jLabel3.setText(lang.get("lbl_Module_Type"));
jLabel3.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel3.setHorizontalTextPosition(SwingConstants.RIGHT);
jLabel3.setBounds(0, 93, 152, 21);
}
{
jLabel4 = new JLabel4j_std();
jDesktopPane1.add(jLabel4);
jLabel4.setText(lang.get("lbl_Module_Desktop"));
jLabel4.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel4.setHorizontalTextPosition(SwingConstants.RIGHT);
jLabel4.setBounds(0, 122, 152, 21);
}
{
jLabel5 = new JLabel4j_std();
jDesktopPane1.add(jLabel5);
jLabel5.setText(lang.get("lbl_Description"));
jLabel5.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel5.setHorizontalTextPosition(SwingConstants.RIGHT);
jLabel5.setBounds(0, 60, 152, 21);
}
{
comboBox = new JComboBox4j();
comboBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
jButtonUpdate.setEnabled(true);
}
});
comboBox.setBounds(164, 206, 180, 23);
comboBox.addItem("");
comboBox.addItem("Standard");
comboBox.addItem("Label");
jDesktopPane1.add(comboBox);
}
{
jComboBoxType = new JComboBox4j();
jDesktopPane1.add(jComboBoxType);
jComboBoxType.setEnabled(true);
jComboBoxType.setEditable(false);
jComboBoxType.setLightWeightPopupEnabled(true);
jComboBoxType.setIgnoreRepaint(false);
jComboBoxType.setBounds(164, 93, 180, 23);
jComboBoxType.addItem("EXEC");
jComboBoxType.addItem("FORM");
jComboBoxType.addItem("FUNCTION");
jComboBoxType.addItem("MENU");
jComboBoxType.addItem("REPORT");
jComboBoxType.addItem("USER");
jComboBoxType.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
new_type = jComboBoxType.getSelectedItem();
if (new_type != null)
{
if (new_type.equals(current_type) != true)
{
// module_updated = true;
jButtonUpdate.setEnabled(true);
jButtonIconPreview.setIcon(JDBModule.getModuleIcon(jTextFieldIconFilename.getText(), (String) jComboBoxType.getSelectedItem()));
}
if (new_type.equals("REPORT") || new_type.equals("USER"))
{
jTextFieldReportFilename.setEnabled(true);
jButtonReportFileChooser.setEnabled(true);
jCheckBoxPrintPreview.setEnabled(true);
jCheckBoxPrintDialog.setEnabled(true);
jSpinnerPrintCopies.setEnabled(true);
comboBox.setEnabled(true);
}
else
{
jTextFieldReportFilename.setEnabled(false);
jButtonReportFileChooser.setEnabled(false);
jCheckBoxPrintPreview.setEnabled(false);
jCheckBoxPrintDialog.setEnabled(false);
jSpinnerPrintCopies.setEnabled(false);
comboBox.setEnabled(false);
}
if (new_type.equals("EXEC"))
{
jTextFieldExecFilename.setEnabled(true);
jButtonExecFileChooser.setEnabled(true);
jTextFieldExecDir.setEnabled(true);
jButtonExecDirChooser.setEnabled(true);
}
else
{
jTextFieldExecFilename.setEnabled(false);
jButtonExecFileChooser.setEnabled(false);
jTextFieldExecDir.setEnabled(false);
jButtonExecDirChooser.setEnabled(false);
}
}
}
});
}
{
jCheckBoxScanner = new JCheckBox();
jDesktopPane1.add(jCheckBoxScanner);
jCheckBoxScanner.setSelected(true);
jCheckBoxScanner.setBounds(164, 146, 21, 21);
jCheckBoxScanner.setBackground(new java.awt.Color(255, 255, 255));
jCheckBoxScanner.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
// module_updated = true;
jButtonUpdate.setEnabled(true);
}
});
}
{
jCheckBoxDesktop = new JCheckBox();
jDesktopPane1.add(jCheckBoxDesktop);
jCheckBoxDesktop.setSelected(true);
jCheckBoxDesktop.setBounds(164, 122, 21, 21);
jCheckBoxDesktop.setBackground(new java.awt.Color(255, 255, 255));
jCheckBoxDesktop.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
// module_updated = true;
jButtonUpdate.setEnabled(true);
}
});
}
{
jLabel6 = new JLabel4j_std();
jDesktopPane1.add(jLabel6);
jLabel6.setText(lang.get("lbl_Module_Scanner"));
jLabel6.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel6.setHorizontalTextPosition(SwingConstants.RIGHT);
jLabel6.setBounds(0, 146, 152, 21);
}
{
jLabelMnemonic = new JLabel4j_std();
jDesktopPane1.add(jLabelMnemonic);
jLabelMnemonic.setText(lang.get("lbl_Language_Mnemonic"));
jLabelMnemonic.setBounds(449, 60, 112, 21);
jLabelMnemonic.setHorizontalAlignment(SwingConstants.RIGHT);
jLabelMnemonic.setHorizontalTextPosition(SwingConstants.RIGHT);
}
{
jTextFieldMnemonic = new JTextField4j();
jTextFieldMnemonic.setEditable(false);
AbstractDocument doc = (AbstractDocument) jTextFieldMnemonic.getDocument();
doc.setDocumentFilter(new JFixedSizeFilter(JDBModule.field_mneumonic));
jDesktopPane1.add(jTextFieldMnemonic);
jTextFieldMnemonic.setText("");
jTextFieldMnemonic.setBounds(566, 60, 42, 21);
jTextFieldMnemonic.setToolTipText("Character to underline");
jTextFieldMnemonic.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent evt) {
jButtonUpdate.setEnabled(true);
}
});
}
{
jLabel2 = new JLabel4j_std();
jDesktopPane1.add(jLabel2);
jLabel2.setText(lang.get("lbl_Module_Executable_Directory"));
jLabel2.setBounds(0, 290, 152, 21);
jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
}
{
jTextFieldIconFilename = new JTextField4j();
jDesktopPane1.add(jTextFieldIconFilename);
jTextFieldIconFilename.setBounds(164, 177, 163, 22);
jTextFieldIconFilename.addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent evt) {
jButtonIconPreview.setIcon(JDBModule.getModuleIcon(jTextFieldIconFilename.getText(), (String) jComboBoxType.getSelectedItem()));
}
public void keyTyped(KeyEvent evt) {
jButtonUpdate.setEnabled(true);
}
});
}
{
jButtonIconFileChooser = new JButton4j();
jDesktopPane1.add(jButtonIconFileChooser);
jButtonIconFileChooser.setText("..");
jButtonIconFileChooser.setBounds(327, 177, 17, 21);
jButtonIconFileChooser.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
JFileChooser loadIco = new JFileChooser();
try
{
File f = new File(new File("./images").getCanonicalPath());
loadIco.setCurrentDirectory(f);
loadIco.addChoosableFileFilter(new JFileFilterImages());
loadIco.setSelectedFile(new File(jTextFieldIconFilename.getText()));
}
catch (Exception e)
{
}
if (loadIco.showOpenDialog(jButtonIconFileChooser) == JFileChooser.APPROVE_OPTION)
{
File selectedFile;
selectedFile = loadIco.getSelectedFile();
if (selectedFile != null)
{
if (jTextFieldIconFilename.getText().compareTo(selectedFile.getName()) != 0)
{
jTextFieldIconFilename.setText(selectedFile.getName());
jButtonIconPreview.setIcon(JDBModule.getModuleIcon(jTextFieldIconFilename.getText(), (String) jComboBoxType.getSelectedItem()));
jButtonUpdate.setEnabled(true);
}
}
}
}
});
}
{
jButtonIconPreview = new JButton4j();
jDesktopPane1.add(jButtonIconPreview);
jButtonIconPreview.setBounds(292, 177, 23, 22);
jButtonIconPreview.setBorderPainted(false);
jButtonIconPreview.setContentAreaFilled(false);
jButtonIconPreview.setRolloverEnabled(false);
jButtonIconPreview.setRequestFocusEnabled(false);
}
{
jTextFieldHelpsetid = new JTextField4j();
AbstractDocument doc = (AbstractDocument) jTextFieldHelpsetid.getDocument();
doc.setDocumentFilter(new JFixedSizeFilter(JDBModule.field_helpset_id));
jDesktopPane1.add(jTextFieldHelpsetid);
jTextFieldHelpsetid.setBounds(164, 317, 427, 21);
jTextFieldHelpsetid.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent evt) {
jButtonUpdate.setEnabled(true);
}
});
}
{
jLabel7 = new JLabel4j_std();
jDesktopPane1.add(jLabel7);
jLabel7.setText(lang.get("lbl_Module_Help"));
jLabel7.setBounds(0, 317, 152, 21);
jLabel7.setHorizontalAlignment(SwingConstants.TRAILING);
}
{
jButtonHelp = new JButton4j(Common.icon_help);
jDesktopPane1.add(jButtonHelp);
jButtonHelp.setText(lang.get("btn_Help"));
jButtonHelp.setBounds(250, 345, 112, 28);
jButtonHelp.setMnemonic(lang.getMnemonicChar());
}
{
jTextFieldReportFilename = new JTextField4j();
jDesktopPane1.add(jTextFieldReportFilename);
jTextFieldReportFilename.setBounds(164, 233, 163, 22);
jTextFieldReportFilename.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()));
}
});
}
{
jLabel8 = new JLabel4j_std();
jDesktopPane1.add(jLabel8);
jLabel8.setText(lang.get("lbl_Module_Icon_Filename"));
jLabel8.setHorizontalAlignment(SwingConstants.TRAILING);
jLabel8.setBounds(0, 178, 152, 21);
}
{
jButtonReportFileChooser = new JButton4j();
jDesktopPane1.add(jButtonReportFileChooser);
jButtonReportFileChooser.setText("..");
jButtonReportFileChooser.setBounds(327, 233, 17, 21);
jButtonReportFileChooser.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
JFileChooser loadRpt = new JFileChooser();
try
{
String path = "";
if (((String) comboBox.getSelectedItem()).equals("Standard"))
{
path = "./reports";
}
else
{
path = "./labels";
}
File f = new File(new File(path).getCanonicalPath());
loadRpt.setCurrentDirectory(f);
if (((String) comboBox.getSelectedItem()).equals("Standard"))
{
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, 289, 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, 261, 427, 22);
jTextFieldExecFilename.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent evt) {
jButtonUpdate.setEnabled(true);