Skip to content

Commit

Permalink
Update to Weight Checks Screen
Browse files Browse the repository at this point in the history
Comment entry now appears automatically for T1 and T2's
  • Loading branch information
C4J committed Mar 13, 2024
1 parent 8b4f388 commit 7633c52
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 41 deletions.
2 changes: 1 addition & 1 deletion b6/commander4j.install4j
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<install4j version="10.0.7" transformSequenceNumber="10">
<directoryPresets config="./images/icons/CMD4j_Icons" />
<application name="Commander4j" applicationId="6923-0356-2321-8111" mediaDir="../../../Distribution/java17/b6Commander4j" shrinkRuntime="false" shortName="Commander4j" publisher="David Garratt" publisherWeb="http://www.commander4j.com" version="10.23" allPathsRelative="true" macVolumeId="2fff9a9d0dc659ac" javaMinVersion="17" javaMaxVersion="17">
<application name="Commander4j" applicationId="6923-0356-2321-8111" mediaDir="../../../Distribution/java17/b6Commander4j" shrinkRuntime="false" shortName="Commander4j" publisher="David Garratt" publisherWeb="http://www.commander4j.com" version="10.24" allPathsRelative="true" macVolumeId="2fff9a9d0dc659ac" javaMinVersion="17" javaMaxVersion="17">
<languages skipLanguageSelection="true">
<additionalLanguages>
<language id="nl" />
Expand Down
Binary file modified b6/commander4j.jar
Binary file not shown.
27 changes: 17 additions & 10 deletions b6/src/com/commander4j/app/JInternalFrameWTWeightCapture.java
Original file line number Diff line number Diff line change
Expand Up @@ -1031,16 +1031,7 @@ public void actionPerformed(ActionEvent e)
{
public void actionPerformed(ActionEvent e)
{
String comments = sampleHeader.getComments();
JTextInputDialog textInp = new JTextInputDialog(Common.mainForm, comments, JDBWTSampleHeader.field_Comments);
textInp.setVisible(true);
if (textInp.isTextEntered())
{

sampleHeader.setComments(textInp.getTextEntered());
sampleHeader.updateComments();
}
textInp = null;
displayCommentInputPanel();
}
});

Expand All @@ -1063,6 +1054,20 @@ public void actionPerformed(ActionEvent e)
}
}

private void displayCommentInputPanel()
{
String comments = sampleHeader.getComments();
JTextInputDialog textInp = new JTextInputDialog(Common.mainForm, comments, JDBWTSampleHeader.field_Comments);
textInp.setVisible(true);
if (textInp.isTextEntered())
{

sampleHeader.setComments(textInp.getTextEntered());
sampleHeader.updateComments();
}
textInp = null;
}

public void createDemoPanel()
{

Expand Down Expand Up @@ -1152,13 +1157,15 @@ public void run()
if (t2_count > 0)
{
JLaunchMenu.runDialog("FRM_WEIGHT_ERROR", lang.get("err_T2_p1") + lang.get("err_T1_p2"));
displayCommentInputPanel();

}
else
{
if (t1_count > 0)
{
JLaunchMenu.runDialog("FRM_WEIGHT_ERROR", lang.get("err_T1_p1") + lang.get("err_T1_p2"));
displayCommentInputPanel();
}
}

Expand Down
2 changes: 1 addition & 1 deletion b6/src/com/commander4j/app/JVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class JVersion
{

public static String getProgramVersion() {
return "10.23";
return "10.24";
}

public static Double getProgramVersionValue() {
Expand Down
37 changes: 16 additions & 21 deletions b6/src/com/commander4j/sys/JTextInputDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public class JTextInputDialog extends JDialog
private int maxCharacters = 0;
private JLabel4j_std displayCharacterCount = new JLabel4j_std();
private JButton4j okButton;
private JButton4j cancelButton;
private JDBLanguage lang;


Expand Down Expand Up @@ -64,11 +63,22 @@ private void displayCharCount()
}
else
{
displayCharacterCount.setForeground(Color.BLACK);
okButton.setEnabled(true);


if (getTextEntered().length() > 0)
{
okButton.setEnabled(true);
displayCharacterCount.setForeground(Color.BLACK);
}
else
{
okButton.setEnabled(false);
displayCharacterCount.setForeground(Color.RED);
}
}
displayCharacterCount.setFont(new Font("Arial", Font.BOLD, 11));
displayCharacterCount.setText(msg);

}

public JTextInputDialog(JFrame frame, String textValue, int maxCharacters)
Expand All @@ -77,7 +87,7 @@ public JTextInputDialog(JFrame frame, String textValue, int maxCharacters)
isTextEntered = false;
this.maxCharacters = maxCharacters;
setModal(true);
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);

setResizable(false);

Expand Down Expand Up @@ -114,12 +124,12 @@ public void keyReleased(KeyEvent e)


JPanel buttonPane = new JPanel();
buttonPane.setBounds(0, 144, 725, 46);
buttonPane.setBounds(0, 144, 569, 46);
contentPanel.add(buttonPane);
{
okButton = new JButton4j(Common.icon_ok_16x16);
okButton.setText(lang.get("btn_Ok"));
okButton.setBounds(321, 5, 116, 29);
okButton.setBounds(226, 5, 116, 29);
okButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
Expand All @@ -137,21 +147,6 @@ public void actionPerformed(ActionEvent e)
buttonPane.add(okButton);
getRootPane().setDefaultButton(okButton);
}
{
cancelButton = new JButton4j(Common.icon_cancel_16x16);
cancelButton.setText(lang.get("btn_Close"));
cancelButton.setBounds(437, 5, 116, 29);
cancelButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
isTextEntered = false;
dispose();
}
});
cancelButton.setActionCommand("Cancel");
buttonPane.add(cancelButton);
}

textArea.setCaretPosition(textArea.getDocument().getLength());
displayCharCount();
Expand Down
4 changes: 2 additions & 2 deletions b6/xml/schema/com.mysql.cj.jdbc.Driver/000001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2476,10 +2476,10 @@ INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('BUDDYJ','*','EN','Beagle','2006-02-25 18:41:20','2006-02-25 12:37:26','N','Y','Y','0','N','2005-10-01 00:00:00','');
</statement>
<statement>
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('CHANDRAE','ADMIN','EN','Dave Garratt','2005-02-07 13:57:22','2004-12-29 18:34:34','N','N','Y','0','N','2005-10-01 00:00:00','');
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('CHANDRAE','ADMIN','EN','Dave','2005-02-07 13:57:22','2004-12-29 18:34:34','N','N','Y','0','N','2005-10-01 00:00:00','');
</statement>
<statement>
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('DAVID','password','EN','David Garratt','2009-10-11 20:06:37','2006-03-05 16:08:53','N','N','Y','0','N','2005-06-29 20:25:00','');
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('DAVID','password','EN','David','2009-10-11 20:06:37','2006-03-05 16:08:53','N','N','Y','0','N','2005-06-29 20:25:00','');
</statement>
<statement>
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('DREADJ','password','EN',NULL,NULL,'2005-01-11 19:40:36','N','Y','Y','0','N','2005-10-01 00:00:00','');
Expand Down
Binary file modified b6web_t10_android_eb3/WebContent/WEB-INF/lib/commander4j.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2476,10 +2476,10 @@ INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('BUDDYJ','*','EN','Beagle','2006-02-25 18:41:20','2006-02-25 12:37:26','N','Y','Y','0','N','2005-10-01 00:00:00','');
</statement>
<statement>
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('CHANDRAE','ADMIN','EN','Dave Garratt','2005-02-07 13:57:22','2004-12-29 18:34:34','N','N','Y','0','N','2005-10-01 00:00:00','');
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('CHANDRAE','ADMIN','EN','Dave','2005-02-07 13:57:22','2004-12-29 18:34:34','N','N','Y','0','N','2005-10-01 00:00:00','');
</statement>
<statement>
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('DAVID','password','EN','David Garratt','2009-10-11 20:06:37','2006-03-05 16:08:53','N','N','Y','0','N','2005-06-29 20:25:00','');
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('DAVID','password','EN','David','2009-10-11 20:06:37','2006-03-05 16:08:53','N','N','Y','0','N','2005-06-29 20:25:00','');
</statement>
<statement>
INSERT INTO `SYS_USERS` (`user_id`, `password`, `language_id`, `user_comment`, `last_logon`, `last_password_change`, `account_locked`, `password_expires`, `password_change_allowed`, `bad_password_attempts`, `account_expires`, `account_expiry_date`, `email_address`) VALUES ('DREADJ','password','EN',NULL,NULL,'2005-01-11 19:40:36','N','Y','Y','0','N','2005-10-01 00:00:00','');
Expand Down
Loading

0 comments on commit 7633c52

Please sign in to comment.