Exemplo n.º 1
0
 /**
  * 获取用户VCard信息
  *
  * @param friendname
  * @return
  */
 private VCard getfriendVCard(String friendName) {
   /*if(!NetUtils.isNetConnected()){
   	Log.i(TAG, "Internet error,can't connected to server..");
   	return null;
   }*/
   if (!ASmackManager.getInstance().getXMPPConnection().isConnected()) return null; // 没有连接上
   VCard vCard = new VCard();
   try {
     Timber.d("friendName:" + friendName);
     vCard.load(ASmackManager.getInstance().getXMPPConnection(), friendName);
   } catch (XMPPException e) {
     e.printStackTrace();
   }
   return vCard;
 }
Exemplo n.º 2
0
  /** 获取用户头像信息 */
  public Bitmap getUserImage(String user) {
    Bitmap bitmap = null;
    try {
      VCard vcard = new VCard();
      vcard.load(connection, user);

      if (vcard == null || vcard.getAvatar() == null) {
        return null;
      }
      bitmap = BitmapFactory.decodeByteArray(vcard.getAvatar(), 0, vcard.getAvatar().length);

    } catch (Exception e) {
      e.printStackTrace();
    }
    return bitmap;
  }
  /**
   * Calls an individual user by their VCard information.
   *
   * @param jid the users JID.
   */
  public void callByJID(String jid) {
    if (getStatus() == SipRegisterStatus.Registered) {
      final VCard vcard =
          SparkManager.getVCardManager().getVCard(StringUtils.parseBareAddress(jid));

      if (vcard != null) {
        String number = vcard.getPhoneWork("VOICE");
        if (!ModelUtil.hasLength(number)) {
          number = vcard.getPhoneHome("VOICE");
        }

        if (ModelUtil.hasLength(number)) {
          getDefaultGuiManager().dial(number);
        }
      }
    }
  }
Exemplo n.º 4
0
  public Bitmap gettingCard(XMPPConnection connection) {
    VCard vcard = new VCard();
    try {

      // String x = connection.toString();
      // XMPPConnection connector = new XMPPConnection(x);

      vcard.load(connection, "*****@*****.**");
      Log.i("card loaded", vcard.getJabberId());

      bitmap = BitmapFactory.decodeByteArray(vcard.getAvatar(), 0, vcard.getAvatar().length);
      Log.i("image sizes", String.valueOf(bitmap.getDensity()));

    } catch (XMPPException e) {
      Log.e("error loading the card", e.toString());
    }
    return bitmap;
  }
Exemplo n.º 5
0
  private void handleVCardInformation(VCard vcard, String phoneNumber) {
    if (vcard.getError() != null) {
      return;
    }

    String firstName = vcard.getFirstName();
    String lastName = vcard.getLastName();
    if (ModelUtil.hasLength(firstName) && ModelUtil.hasLength(lastName)) {
      titleLabel.setText(firstName + " " + lastName);
    } else if (ModelUtil.hasLength(firstName)) {
      titleLabel.setText(firstName);
    }

    phoneLabel.setText(phoneNumber);

    String jobTitle = vcard.getField("TITLE");
    if (jobTitle != null) {
      professionLabel.setText(jobTitle);
    }

    byte[] avatarBytes = null;
    try {
      avatarBytes = vcard.getAvatar();
    } catch (Exception e) {
      Log.error("Cannot retrieve avatar bytes.", e);
    }

    if (avatarBytes != null) {
      try {
        ImageIcon avatarIcon = new ImageIcon(avatarBytes);
        avatarLabel.setIcon(avatarIcon);
        avatarLabel.invalidate();
        avatarLabel.validate();
        avatarLabel.repaint();
      } catch (Exception e) {
        // no issue
      }
    }

    invalidate();
    validate();
    repaint();
  }
Exemplo n.º 6
0
  /**
   * Displays the VCard for an individual.
   *
   * @param vCard the users vcard.
   * @param parent the parent component, used for location.
   */
  public void editProfile(final VCard vCard, JComponent parent) {
    final JTabbedPane tabbedPane = new JTabbedPane();

    // Initialize Panels
    personalPanel = new PersonalPanel();
    personalPanel.showJID(false);

    businessPanel = new BusinessPanel();
    homePanel = new HomePanel();
    avatarPanel = new AvatarPanel();
    // employeePanel		= new EmployeePanel();

    String employeeOf = vCard.getField("employeeOf");
    if (vCard.getJabberId()
        == SparkManager.getUserManager()
            .getJIDFromDisplayName(SparkManager.getUserManager().getNickname())) {
      if ((employeeOf == null || employeeOf.isEmpty())) {
        employeeListPanel = new EmployeeListPanel();

        tabbedPane.addTab(Res.getString("tab.home"), homePanel);
        tabbedPane.addTab(Res.getString("tab.business"), personalPanel);
        tabbedPane.addTab(Res.getString("tab.business"), businessPanel);
        tabbedPane.addTab(Res.getString("tab.employees"), employeeListPanel); // zmienione
        employee = false;
      } else {
      }
    }

    tabbedPane.addTab(Res.getString("tab.avatar"), avatarPanel);

    // Build the UI
    buildUI(vCard);

    final JOptionPane pane;
    final JDialog dlg;

    TitlePanel titlePanel;

    ImageIcon icon = VCardManager.getAvatarIcon(vCard);
    if (icon == null) {
      icon = SparkRes.getImageIcon(SparkRes.BLANK_24x24);
    }

    // Create the title panel for this dialog
    titlePanel =
        new TitlePanel(
            Res.getString("title.edit.profile"), Res.getString("message.save.profile"), icon, true);

    // Construct main panel w/ layout.
    final JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BorderLayout());
    mainPanel.add(titlePanel, BorderLayout.NORTH);

    // The user should only be able to close this dialog.
    Object[] options = {Res.getString("save"), Res.getString("cancel")};
    pane =
        new JOptionPane(
            tabbedPane,
            JOptionPane.PLAIN_MESSAGE,
            JOptionPane.OK_CANCEL_OPTION,
            null,
            options,
            options[0]);

    mainPanel.add(pane, BorderLayout.CENTER);

    JOptionPane p = new JOptionPane();
    dlg = p.createDialog(parent, Res.getString("title.profile.information"));
    dlg.setModal(false);

    dlg.pack();
    dlg.setSize(600, 400);
    dlg.setResizable(true);
    dlg.setContentPane(mainPanel);
    dlg.setLocationRelativeTo(parent);

    PropertyChangeListener changeListener =
        new PropertyChangeListener() {
          public void propertyChange(PropertyChangeEvent e) {
            String value = (String) pane.getValue();
            if (Res.getString("cancel").equals(value)) {
              pane.removePropertyChangeListener(this);
              dlg.dispose();
            } else if (Res.getString("save").equals(value)) {
              //                    pane.removePropertyChangeListener(this);
              // dlg.dispose();
              // saveVCard();
              preSaveVCard();
            }
          }
        };

    // JPanel bottomPanel = (JPanel)pane.getComponent(0);

    JButton saveButton = new JButton();

    tabbedPane.addChangeListener(
        new ChangeListener() {

          @Override
          public void stateChanged(ChangeEvent e) {
            preSaveVCard();
          }
        });

    for (Component component : pane.getComponents()) {
      if (component instanceof JButton) {
        JButton b = (JButton) component;

        if (b.getText().equalsIgnoreCase("Save")) {
          saveButton = (JButton) component;
        }
      }
    }

    saveButton.addActionListener(
        new ActionListener() {

          @Override
          public void actionPerformed(ActionEvent e) {
            preSaveVCard();
          }
        });

    avatarPanel.setParentDialog(dlg);
    dlg.setVisible(true);
    dlg.toFront();
    dlg.requestFocus();

    personalPanel.focus();
  }
Exemplo n.º 7
0
  /** Saves the VCard. */
  private void saveVCard() {
    final VCard vcard = new VCard();

    // Save personal info
    vcard.setFirstName(personalPanel.getFirstName());
    vcard.setLastName(personalPanel.getLastName());
    vcard.setMiddleName(personalPanel.getMiddleName());
    vcard.setEmailHome(personalPanel.getEmailAddress());
    vcard.setNickName(personalPanel.getNickname());

    // Save business info
    vcard.setOrganization(businessPanel.getCompany());
    vcard.setAddressFieldWork("STREET", businessPanel.getStreetAddress());
    vcard.setAddressFieldWork("LOCALITY", businessPanel.getCity());
    vcard.setAddressFieldWork("REGION", businessPanel.getState());
    vcard.setAddressFieldWork("PCODE", businessPanel.getZipCode());
    vcard.setAddressFieldWork("CTRY", businessPanel.getCountry());
    vcard.setField("TITLE", businessPanel.getJobTitle());
    vcard.setOrganizationUnit(businessPanel.getDepartment());
    vcard.setPhoneWork("VOICE", businessPanel.getPhone());
    vcard.setPhoneWork("FAX", businessPanel.getFax());
    vcard.setPhoneWork("PAGER", businessPanel.getPager());
    vcard.setPhoneWork("CELL", businessPanel.getMobile());
    vcard.setField("URL", businessPanel.getWebPage());

    // Save Home Info
    vcard.setAddressFieldHome("STREET", homePanel.getStreetAddress());
    vcard.setAddressFieldHome("LOCALITY", homePanel.getCity());
    vcard.setAddressFieldHome("REGION", homePanel.getState());
    vcard.setAddressFieldHome("PCODE", homePanel.getZipCode());
    vcard.setAddressFieldHome("CTRY", homePanel.getCountry());
    vcard.setPhoneHome("VOICE", homePanel.getPhone());
    vcard.setPhoneHome("FAX", homePanel.getFax());
    vcard.setPhoneHome("PAGER", homePanel.getPager());
    vcard.setPhoneHome("CELL", homePanel.getMobile());

    // Save Avatar
    final File avatarFile = avatarPanel.getAvatarFile();
    byte[] avatarBytes = avatarPanel.getAvatarBytes();

    if (avatarFile != null) {
      try {
        // Make it 48x48
        ImageIcon icon = new ImageIcon(avatarFile.toURI().toURL());
        Image image = icon.getImage();
        image = image.getScaledInstance(-1, 48, Image.SCALE_SMOOTH);
        avatarBytes = GraphicUtils.getBytesFromImage(image);
      } catch (MalformedURLException e) {
        Log.error("Unable to set avatar.", e);
      }
    }

    // If avatar bytes, persist as vcard.
    if (avatarBytes != null) {
      vcard.setAvatar(avatarBytes);
    }

    try {
      final VCardManager vcardManager = SparkManager.getVCardManager();
      vcardManager.setPersonalVCard(vcard);

      vcard.save(SparkManager.getConnection());

      // Notify users.
      if (avatarFile != null || avatarBytes != null) {
        Presence presence = SparkManager.getWorkspace().getStatusBar().getPresence();
        Presence newPresence =
            new Presence(
                presence.getType(),
                presence.getStatus(),
                presence.getPriority(),
                presence.getMode());

        // Change my own presence
        SparkManager.getSessionManager().changePresence(newPresence);

        // Chnage avatar in status bar.
        StatusBar statusBar = SparkManager.getWorkspace().getStatusBar();
        statusBar.setAvatar(new ImageIcon(vcard.getAvatar()));
      } else {
        String firstName = vcard.getFirstName();
        String lastName = vcard.getLastName();
        StatusBar statusBar = SparkManager.getWorkspace().getStatusBar();
        if (ModelUtil.hasLength(firstName) && ModelUtil.hasLength(lastName)) {
          statusBar.setNickname(firstName + " " + lastName);
        } else if (ModelUtil.hasLength(firstName)) {
          statusBar.setNickname(firstName);
        }

        statusBar.setAvatar(null);
      }

      // Notify listenres
      SparkManager.getVCardManager().notifyVCardListeners();
    } catch (XMPPException e) {
      Log.error(e);
      JOptionPane.showMessageDialog(
          SparkManager.getMainWindow(),
          Res.getString("message.vcard.not.supported"),
          Res.getString("title.error"),
          JOptionPane.ERROR_MESSAGE);
    }
  }
Exemplo n.º 8
0
  /**
   * Builds the UI based on a VCard.
   *
   * @param vcard the vcard used to build the UI.
   */
  private void buildUI(VCard vcard) {
    personalPanel.setFirstName(vcard.getFirstName());
    personalPanel.setMiddleName(vcard.getMiddleName());
    personalPanel.setLastName(vcard.getLastName());
    personalPanel.setEmailAddress(vcard.getEmailHome());
    personalPanel.setNickname(vcard.getNickName());
    personalPanel.setJID(vcard.getJabberId());

    businessPanel.setCompany(vcard.getOrganization());
    businessPanel.setDepartment(vcard.getOrganizationUnit());
    businessPanel.setStreetAddress(vcard.getAddressFieldWork("STREET"));
    businessPanel.setCity(vcard.getAddressFieldWork("LOCALITY"));
    businessPanel.setState(vcard.getAddressFieldWork("REGION"));
    businessPanel.setZipCode(vcard.getAddressFieldWork("PCODE"));
    businessPanel.setCountry(vcard.getAddressFieldWork("CTRY"));
    businessPanel.setJobTitle(vcard.getField("TITLE"));
    businessPanel.setPhone(vcard.getPhoneWork("VOICE"));
    businessPanel.setFax(vcard.getPhoneWork("FAX"));
    businessPanel.setPager(vcard.getPhoneWork("PAGER"));
    businessPanel.setMobile(vcard.getPhoneWork("CELL"));
    businessPanel.setWebPage(vcard.getField("URL"));

    // Load Home Info
    homePanel.setStreetAddress(vcard.getAddressFieldHome("STREET"));
    homePanel.setCity(vcard.getAddressFieldHome("LOCALITY"));
    homePanel.setState(vcard.getAddressFieldHome("REGION"));
    homePanel.setZipCode(vcard.getAddressFieldHome("PCODE"));
    homePanel.setCountry(vcard.getAddressFieldHome("CTRY"));
    homePanel.setPhone(vcard.getPhoneHome("VOICE"));
    homePanel.setFax(vcard.getPhoneHome("FAX"));
    homePanel.setPager(vcard.getPhoneHome("PAGER"));
    homePanel.setMobile(vcard.getPhoneHome("CELL"));

    // Set avatar
    byte[] bytes = vcard.getAvatar();
    if (bytes != null && bytes.length > 0) {
      ImageIcon icon = new ImageIcon(bytes);
      avatarPanel.setAvatar(icon);
      avatarPanel.setAvatarBytes(bytes);
      if (avatarLabel != null) {
        icon = GraphicUtils.scaleImageIcon(icon, 48, 48);

        avatarLabel.setIcon(icon);
      }
    }
  }
Exemplo n.º 9
0
  /**
   * Displays the VCard for an individual.
   *
   * @param vCard the users vcard.
   * @param parent the parent component, used for location.
   */
  public void viewFullProfile(final VCard vCard, JComponent parent) {
    final JTabbedPane tabbedPane = new JTabbedPane();

    // Initialize Panels
    personalPanel = new PersonalPanel();
    personalPanel.allowEditing(false);
    personalPanel.showJID(false);

    //        tabbedPane.addTab(Res.getString("tab.personal"), personalPanel);

    businessPanel = new BusinessPanel();
    businessPanel.allowEditing(false);
    tabbedPane.addTab(Res.getString("tab.business"), businessPanel);

    homePanel = new HomePanel();
    homePanel.allowEditing(false);
    //        tabbedPane.addTab(Res.getString("tab.home"), homePanel);

    avatarPanel = new AvatarPanel();
    avatarPanel.allowEditing(false);
    tabbedPane.addTab(Res.getString("tab.avatar"), avatarPanel);

    //        employeePanel = new EmployeePanel();
    //        employeePanel.allowEditing(false);
    //        tabbedPane.addTab("Pracownicy", employeePanel);

    String employeeOf = vCard.getField("employeeOf");
    if (vCard.getJabberId()
        == SparkManager.getUserManager()
            .getJIDFromDisplayName(SparkManager.getUserManager().getNickname())) {
      if ((employeeOf == null || employeeOf.isEmpty())) {
        employeeListPanel = new EmployeeListPanel();
        tabbedPane.addTab(Res.getString("tab.home"), homePanel);
        tabbedPane.addTab(Res.getString("tab.business"), businessPanel);
        tabbedPane.addTab("Pracownicy", employeeListPanel);
        employee = false;
      } else {

      }
    }

    // Build the UI
    buildUI(vCard);

    final JOptionPane pane;
    final JDialog dlg;

    TitlePanel titlePanel;

    ImageIcon icon = VCardManager.getAvatarIcon(vCard);
    if (icon == null) {
      icon = SparkRes.getImageIcon(SparkRes.BLANK_24x24);
    }

    // Create the title panel for this dialog
    titlePanel = new TitlePanel(Res.getString("title.profile.information"), "", icon, true);

    // Construct main panel w/ layout.
    final JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BorderLayout());
    mainPanel.add(titlePanel, BorderLayout.NORTH);

    // The user should only be able to close this dialog.
    Object[] options = {Res.getString("close")};
    pane =
        new JOptionPane(
            tabbedPane,
            JOptionPane.PLAIN_MESSAGE,
            JOptionPane.OK_CANCEL_OPTION,
            null,
            options,
            options[0]);

    mainPanel.add(pane, BorderLayout.CENTER);

    JOptionPane p = new JOptionPane();
    dlg = p.createDialog(parent, Res.getString("title.profile.information"));
    dlg.setModal(false);

    dlg.pack();
    dlg.setSize(600, 400);
    dlg.setResizable(true);
    dlg.setContentPane(mainPanel);
    dlg.setLocationRelativeTo(parent);

    PropertyChangeListener changeListener =
        new PropertyChangeListener() {
          public void propertyChange(PropertyChangeEvent e) {
            Object o = pane.getValue();
            if (o instanceof Integer) {
              pane.removePropertyChangeListener(this);
              dlg.dispose();
              return;
            }

            String value = (String) pane.getValue();
            if (Res.getString("close").equals(value)) {
              pane.removePropertyChangeListener(this);
              dlg.dispose();
            }
          }
        };

    pane.addPropertyChangeListener(changeListener);

    dlg.setVisible(true);
    dlg.toFront();
    dlg.requestFocus();

    personalPanel.focus();
  }
Exemplo n.º 10
0
  public static VCard getUserVCard(XMPPConnection connection, String user) throws XMPPException {
    VCard vcard = new VCard();
    vcard.load(connection, user);

    return vcard;
  }
Exemplo n.º 11
0
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jLabel6 = new javax.swing.JLabel();
    jLabel7 = new javax.swing.JLabel();
    jLabel8 = new javax.swing.JLabel();
    jLabel10 = new javax.swing.JLabel();
    streetHomeTextField = new javax.swing.JTextField();
    cityHomeTextField = new javax.swing.JTextField();
    countryHomeTextField = new javax.swing.JTextField();
    jLabel17 = new javax.swing.JLabel();
    countyHomeTextField = new javax.swing.JTextField();
    postCodeHomeTextField = new javax.swing.JTextField();
    jLabel5 = new javax.swing.JLabel();
    emailHomeTextField = new javax.swing.JTextField();
    jLabel21 = new javax.swing.JLabel();
    jLabel22 = new javax.swing.JLabel();
    jLabel23 = new javax.swing.JLabel();
    telephoneHomeTextField = new javax.swing.JTextField();
    faxHomeTextField = new javax.swing.JTextField();
    mobileHomeTextField = new javax.swing.JTextField();
    jLabel28 = new javax.swing.JLabel();
    pagerHomeTextField = new javax.swing.JTextField();

    jLabel6.setText("Street");

    jLabel7.setText("Town/city");

    jLabel8.setText("Country");

    jLabel10.setText("Post code");

    streetHomeTextField.setText(vCard.getAddressFieldHome("STREET"));

    cityHomeTextField.setText(vCard.getAddressFieldHome("TOWN"));

    countryHomeTextField.setText(vCard.getAddressFieldHome("CTRY"));

    jLabel17.setText("County");

    countyHomeTextField.setText(vCard.getAddressFieldHome("REGION"));

    postCodeHomeTextField.setText(vCard.getAddressFieldHome("PCODE"));

    jLabel5.setText("Email");

    emailHomeTextField.setText(vCard.getEmailHome());

    jLabel21.setText("Telephone");

    jLabel22.setText("Fax");

    jLabel23.setText("Mobile");

    telephoneHomeTextField.setText(vCard.getPhoneHome("VOICE"));

    faxHomeTextField.setText(vCard.getPhoneHome("FAX"));

    mobileHomeTextField.setText(vCard.getPhoneHome("CELL"));

    jLabel28.setText("Pager");

    pagerHomeTextField.setText(vCard.getPhoneHome("PAGER"));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createParallelGroup(
                                        javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(
                                        layout
                                            .createSequentialGroup()
                                            .addComponent(
                                                jLabel6,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                71,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(
                                                javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(
                                                streetHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                113,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(
                                        layout
                                            .createSequentialGroup()
                                            .addComponent(
                                                jLabel7,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                71,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(
                                                javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(cityHomeTextField)))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel17,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        71,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        countyHomeTextField,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        113,
                                        Short.MAX_VALUE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel10,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        71,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        postCodeHomeTextField,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        113,
                                        Short.MAX_VALUE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel8,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        71,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        countryHomeTextField,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        113,
                                        Short.MAX_VALUE)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(jLabel5)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        emailHomeTextField,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        112,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(jLabel22)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        faxHomeTextField,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jLabel21,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        71,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        telephoneHomeTextField,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        112,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel23)
                                            .addComponent(jLabel28))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(
                                                pagerHomeTextField,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                113,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                mobileHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                103,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap()));

    layout.linkSize(
        javax.swing.SwingConstants.HORIZONTAL,
        new java.awt.Component[] {jLabel10, jLabel6, jLabel7, jLabel8});

    layout.linkSize(
        javax.swing.SwingConstants.HORIZONTAL,
        new java.awt.Component[] {jLabel21, jLabel22, jLabel23, jLabel28, jLabel5});

    layout.linkSize(
        javax.swing.SwingConstants.HORIZONTAL,
        new java.awt.Component[] {
          emailHomeTextField,
          faxHomeTextField,
          mobileHomeTextField,
          pagerHomeTextField,
          telephoneHomeTextField
        });

    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel6)
                                            .addComponent(
                                                streetHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel7)
                                            .addComponent(
                                                cityHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel17)
                                            .addComponent(
                                                countyHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel10)
                                            .addComponent(
                                                postCodeHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel8)
                                            .addComponent(
                                                countryHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(
                                                emailHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel5))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel21)
                                            .addComponent(
                                                telephoneHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel22)
                                            .addComponent(
                                                faxHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel23)
                                            .addComponent(
                                                mobileHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(
                                                pagerHomeTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel28))))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
  } // </editor-fold>//GEN-END:initComponents