Package net.wimpi.pim.contact.facades

Examples of net.wimpi.pim.contact.facades.SimpleContact


        unmarshaller.setEncoding("UTF-8");
        Contact[] contacts = unmarshaller.unmarshallContacts(in);
        if (contacts != null) {
          SimpleContact[] result = new SimpleContact[contacts.length];
          for (int i = 0; i < contacts.length; i++) {
            SimpleContact contact = new SimpleContact(contacts[i]);
            getSelectedContactCollection().add(contact);
            result[i] = contact;
        }
          return result;
        }
View Full Code Here


    BufferedReader in = new BufferedReader(new FileReader(file));
    try {
      List<SimpleContact> contacts = new ArrayList<SimpleContact>();
      String line;
      while ((line = in.readLine()) != null) {
        SimpleContact contact = new SimpleContact();
        StringTokenizer t = new StringTokenizer(line, separator);
        if (t.hasMoreTokens()) contact.setFirstname(t.nextToken());
        if (t.hasMoreTokens()) contact.setLastname(t.nextToken());
        if (t.hasMoreTokens()) contact.setFaxNumber(t.nextToken());
        if (t.hasMoreTokens()) contact.setCompany(t.nextToken());
          getSelectedContactCollection().add(contact);
          contacts.add(contact);
      }
      return contacts.toArray(new SimpleContact[0]);
    }
View Full Code Here

      return data.size();
    }
   
      public Object getValueAt(int row, int column)
    {
      SimpleContact contact = data.get(row);
      switch (column) {
      case 0:
        return contact.getFirstname() + " " + contact.getLastname();
      case 1:
        return contact.getCompany();
      case 2:
        return contact.getFaxNumber();
      default:
        return null;
      }
    }
View Full Code Here

      Contact[] contacts = (group != null)
        ? group.listContacts()
        : database.getContactCollection().toArray();
      List<SimpleContact> data = new ArrayList<SimpleContact>(contacts.length);
      for (int i = 0; i < contacts.length; i++) {
        SimpleContact contact = new SimpleContact(contacts[i]);
        if (matches(contact)) {
          data.add(contact);
        }
      }
      contactTableModel.setData(data);
View Full Code Here

      putValue(ICON_FILENAME, "filenew.png");
    }

    public void actionPerformed(ActionEvent e)
    {
      SimpleContact contact = new SimpleContact();
      EditContactDialog dialog = new EditContactDialog(AddressBook.this, contact);
      dialog.setModal(true);
      dialog.setLocationRelativeTo(AddressBook.this);
      dialog.setVisible(true);
      if (dialog.isOkay()) {
View Full Code Here

    @Override
    public void importData(Contact[] contacts)
    {
        for (int i = 0; i < contacts.length; i++) {
          SimpleContact contact = new SimpleContact(contacts[i]);
          getSelectedContactCollection().add(contact);
      }
    }
View Full Code Here

  private class ContactTransferHandler extends AbstractContactTransferHandler {

    @Override
    public void importData(Contact[] contacts)
    {
      SimpleContact contact = new SimpleContact(contacts[0]);
      setNumber(contact.getFaxNumber());
    }
View Full Code Here

TOP

Related Classes of net.wimpi.pim.contact.facades.SimpleContact

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.