tn5250j/src/org/tn5250j/mailtools SendEMailDialog.java,1.12,1.13
[email protected] Mon, 01 Dec 2003 01:57:31 -0800
Newsgroups
gmane.comp.java.tn5250j.cvs
Message-ID
<[email protected] >
Update of /cvsroot/tn5250j/tn5250j/src/org/tn5250j/mailtools
In directory sc8-pr-cvs1:/tmp/cvs-serv29305/src/org/tn5250j/mailtools
Modified Files:
SendEMailDialog.java
Log Message:
Test for new QuickSend Email feature
Index: SendEMailDialog.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/mailtools/SendEMailDialog.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** SendEMailDialog.java 28 Nov 2003 14:02:09 -0000 1.12
--- SendEMailDialog.java 1 Dec 2003 09:57:29 -0000 1.13
***************
*** 68,71 ****
--- 68,73 ----
JRadioButton graphic;
GridBagConstraints gbc;
+ JRadioButton normal;
+ JRadioButton screenshot;
/**
***************
*** 337,340 ****
--- 339,344 ----
text = new JRadioButton(LangTool.getString("em.text"));
graphic = new JRadioButton(LangTool.getString("em.graphic"));
+ normal = new JRadioButton(LangTool.getString("em.normalmail"));
+ screenshot = new JRadioButton(LangTool.getString("em.screenshot"));
// Group the radio buttons.
***************
*** 342,347 ****
tGroup.add(text);
tGroup.add(graphic);
! text.setSelected(true);
JLabel screenDump = new JLabel(LangTool.getString("em.screendump"));
--- 346,357 ----
tGroup.add(text);
tGroup.add(graphic);
+ ButtonGroup mGroup = new ButtonGroup();
+ mGroup.add(normal);
+ mGroup.add(screenshot);
! normal.setSelected(true);
! text.setSelected(false);
! text.setEnabled(false);
! graphic.setEnabled(false);
JLabel screenDump = new JLabel(LangTool.getString("em.screendump"));
***************
*** 350,353 ****
--- 360,364 ----
JLabel bodyl = new JLabel(LangTool.getString("em.body"));
JLabel fnl = new JLabel(LangTool.getString("em.fileName"));
+ JLabel tom = new JLabel(LangTool.getString("em.typeofmail"));
toAddress = new JComboBox();
***************
*** 363,366 ****
--- 374,378 ----
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
attachmentName = new JTextField(fileName, 30);
+ attachmentName.setText("");
text.addItemListener(new java.awt.event.ItemListener() {
***************
*** 369,372 ****
--- 381,389 ----
}
});
+ normal.addItemListener(new java.awt.event.ItemListener() {
+ public void itemStateChanged(java.awt.event.ItemEvent e) {
+ setTypeOfMail();
+ }
+ });
config = null;
***************
*** 379,405 ****
}
}
!
gbc = new GridBagConstraints();
gbc.gridx = 0; gbc.gridy = 0;
gbc.anchor = GridBagConstraints.WEST;
gbc.insets = new Insets(0, 10, 5, 5);
! semp.add(screenDump, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 1; gbc.gridy = 0;
! gbc.anchor = GridBagConstraints.CENTER;
! gbc.insets = new Insets(0, 5, 5, 5);
! semp.add(text, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 2; gbc.gridy = 0;
! gbc.anchor = GridBagConstraints.CENTER;
! gbc.insets = new Insets(0, 5, 5, 10);
! semp.add(graphic, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 0; gbc.gridy = 1;
gbc.anchor = GridBagConstraints.WEST;
gbc.insets = new Insets(5, 10, 5, 5);
semp.add(tol, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 1; gbc.gridy = 1;
gbc.gridwidth = 2;
gbc.fill = GridBagConstraints.HORIZONTAL;
--- 396,437 ----
}
}
!
gbc = new GridBagConstraints();
gbc.gridx = 0; gbc.gridy = 0;
gbc.anchor = GridBagConstraints.WEST;
gbc.insets = new Insets(0, 10, 5, 5);
! semp.add(tom, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 1; gbc.gridy = 0;
! gbc.anchor = GridBagConstraints.WEST;
! gbc.insets = new Insets(0, 15, 5, 5);
! semp.add(normal, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 2; gbc.gridy = 0;
! gbc.anchor = GridBagConstraints.WEST;
! gbc.insets = new Insets(0, 45, 5, 10);
! semp.add(screenshot, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 0; gbc.gridy = 1;
gbc.anchor = GridBagConstraints.WEST;
+ gbc.insets = new Insets(0, 10, 5, 5);
+ semp.add(screenDump, gbc);
+ gbc = new GridBagConstraints();
+ gbc.gridx = 1; gbc.gridy = 1;
+ gbc.anchor = GridBagConstraints.WEST;
+ gbc.insets = new Insets(0, 15, 5, 5);
+ semp.add(text, gbc);
+ gbc = new GridBagConstraints();
+ gbc.gridx = 2; gbc.gridy = 1;
+ gbc.anchor = GridBagConstraints.WEST;
+ gbc.insets = new Insets(0, 45, 5, 10);
+ semp.add(graphic, gbc);
+ gbc = new GridBagConstraints();
+ gbc.gridx = 0; gbc.gridy = 2;
+ gbc.anchor = GridBagConstraints.WEST;
gbc.insets = new Insets(5, 10, 5, 5);
semp.add(tol, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 1; gbc.gridy = 2;
gbc.gridwidth = 2;
gbc.fill = GridBagConstraints.HORIZONTAL;
***************
*** 408,417 ****
semp.add(toAddress, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 0; gbc.gridy = 2;
gbc.anchor = GridBagConstraints.WEST;
gbc.insets = new Insets(5, 10, 5, 5);
semp.add(subl, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 1; gbc.gridy = 2;
gbc.gridwidth = 2;
gbc.anchor = GridBagConstraints.WEST;
--- 440,449 ----
semp.add(toAddress, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 0; gbc.gridy = 3;
gbc.anchor = GridBagConstraints.WEST;
gbc.insets = new Insets(5, 10, 5, 5);
semp.add(subl, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 1; gbc.gridy = 3;
gbc.gridwidth = 2;
gbc.anchor = GridBagConstraints.WEST;
***************
*** 419,423 ****
semp.add(subject, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 0; gbc.gridy = 3;
gbc.gridheight = 3;
gbc.anchor = GridBagConstraints.WEST;
--- 451,455 ----
semp.add(subject, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 0; gbc.gridy = 4;
gbc.gridheight = 3;
gbc.anchor = GridBagConstraints.WEST;
***************
*** 425,429 ****
semp.add(bodyl, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 1; gbc.gridy = 3;
gbc.gridwidth = 2; gbc.gridheight = 3;
gbc.anchor = GridBagConstraints.WEST;
--- 457,461 ----
semp.add(bodyl, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 1; gbc.gridy = 4;
gbc.gridwidth = 2; gbc.gridheight = 3;
gbc.anchor = GridBagConstraints.WEST;
***************
*** 431,440 ****
semp.add(bodyScrollPane, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 0; gbc.gridy = 6;
gbc.anchor = GridBagConstraints.WEST;
gbc.insets = new Insets(5, 10, 5, 5);
semp.add(fnl, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 1; gbc.gridy = 6;
gbc.gridwidth = 2;
gbc.anchor = GridBagConstraints.WEST;
--- 463,472 ----
semp.add(bodyScrollPane, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 0; gbc.gridy = 7;
gbc.anchor = GridBagConstraints.WEST;
gbc.insets = new Insets(5, 10, 5, 5);
semp.add(fnl, gbc);
gbc = new GridBagConstraints();
! gbc.gridx = 1; gbc.gridy = 7;
gbc.gridwidth = 2;
gbc.anchor = GridBagConstraints.WEST;
***************
*** 451,458 ****
attachmentName.setText("tn5250j.txt");
! } else {
!
attachmentName.setText("tn5250j.png");
!
}
}
--- 483,506 ----
attachmentName.setText("tn5250j.txt");
! }
! else if (normal.isSelected()) {
attachmentName.setText("tn5250j.png");
! }
! else {
! attachmentName.setText("tn5250j.png");
! }
! }
!
! private void setTypeOfMail() {
! if (normal.isSelected()) {
! text.setEnabled(false);
! graphic.setEnabled(false);
! attachmentName.setText("");
! }
! else {
! text.setEnabled(true);
! graphic.setEnabled(true);
! text.setSelected(true);
! setAttachmentName();
}
}
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/