import javax.swing.JOptionPane;
import javax.swing.ListModel;
import uk.ac.ntu.n0521366.wsyd.libs.WSYD_Member;
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
/**
- *
+ * Profile Registration and Editing dialog.
+ *
* @author Eddie Berrisford-Lynch
*/
public class EditProfile extends javax.swing.JDialog {
/**
* Creates new form WSYD_RegiProfile
+ * @param parent owner frame
+ * @param modal true if modal
*/
public EditProfile(java.awt.Frame parent, boolean modal) {
super(parent, modal);
}
/**
- * Populate a model with the applications pre-defined interests.
+ * Populate a model with the application's pre-defined interests.
*
* @return the model
*/
DefaultListModel<String> m = new DefaultListModel<>();
for (String i : WSYD_Member.Interests)
m.addElement(i);
- System.err.println(m.toString());
return m;
}
/**
gridBagConstraints.gridy = 6;
getContentPane().add(gFieldBirthDate, gridBagConstraints);
- gLabelCurrLocation.setLabelFor(gLabelCurrLocation);
+ gLabelCurrLocation.setLabelFor(gFieldCurrLocation);
gLabelCurrLocation.setText("Current City/Town:");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
// trigger sending of the data to SocialServer
((ClientGUI)this.getOwner()).confirmRegistration(m);
}
- // FIXME: gButtonConfirmationMouseClicked(): remove superceded code that has been commented out
- /*
- TreeSet<String> interests = null;
-
- for (int i = 0; i < gListInterests.getModel().getSize(); i++)
- {
- interests.add(((String)gListInterests.getModel().getElementAt(i)));
- }
- if (((ClientGUI)this.getOwner()).confirmRegistration(gFieldUsername.getText(),
- new String(gPFieldPassword.getPassword()),
- gFieldBirthDate.getText(),
- gFieldCurrLocation.getText(),
- interests,
- gTAreaBio.getText())) this.dispose();
- else gLabelPWarning.setText("Server failed to register. Retry.");
- */
}//GEN-LAST:event_gButtonConfirmationMouseClicked
/**
/* Create and display the dialog */
java.awt.EventQueue.invokeLater(new Runnable() {
+ @Override
public void run() {
EditProfile dialog = new EditProfile(new javax.swing.JFrame(), true);
dialog.addWindowListener(new java.awt.event.WindowAdapter() {