Package Control

Examples of Control.Contact


     
      /*
       * Testdaten f�r das incoming pane und das outgoing
       */
        Message message1 = new Message("Hi, das ist ein Test, um das incoming pane " +
            "mal darzustellen", true, new Contact(
            "333", ChatProvider.ICQ, Status.Invisible, "Felix", "felix"),
            new Date(new Date().getTime() - 1300));
        Message message2 = new Message("Das ist aber ein toller Test", false, new Contact(
            "333", ChatProvider.ICQ, Status.Invisible, "Julia", "felix"),
            new Date(new Date().getTime() - 800));
        Message message3 = new Message("Vor allem weil bei einem abstand von kleiner einer minute " +
            "mein text noch hinter dem anderen angezeigt wird, ohne den Header", false, new Contact(
            "333", ChatProvider.ICQ, Status.Invisible, "Julia", "felix"),
            new Date());
       
        ArrayList<Message> messages = new ArrayList<Message>();
        messages.add(message1);
View Full Code Here


   * Informs on a closed element of the {@link WindowFragmentationBar}, removing the concerning
   * {@link Contact} from the list of {@link Contact}s
   */
  public void elementClosed(String closedElement) {
   
    Contact removedContact = null;
   
    for(Contact contact : contacts){
     
      if(contact.getDisplayedName().equals(closedElement)){
        removedContact = contact;
        break;
      }
    }
   
    contacts.remove(removedContact);
    removedContact.setIsInChatWindow(false);
   
    if(contacts.size() == 0){
      eventHandler.chatWindowDisposed(this);
      super.dispose();
      return;
View Full Code Here

    int positionInPanel = (virtualAxis - (firstElementIndex * ELEMENT_HEIGHT));
    positionInPanel = 0;
    offset = positionInPanel;
    positionInPanel *= -1;

    Contact contact = null;
    Group group = null;
    ListElement listElement;
    g.setColor(Color.black);
    g.setFont(new Font("Tahoma", Font.PLAIN, 11));

    for(int i = 0; i <= lastElementIndex - firstElementIndex; i++){
      listElement = displayedElements.get(firstElementIndex + i);

      if(firstElementIndex + i == highlightedElementIndex){

        g.setColor(hightlightColor);
        g.fillRect(0, positionInPanel, getWidth(), ELEMENT_HEIGHT);
        g.setColor(Color.black);
      }

      if(firstElementIndex + i == markedElementIndex){

        g.setColor(markColor);
        g.fillRect(0, positionInPanel, getWidth(), ELEMENT_HEIGHT);
        g.setColor(Color.black);
      }

      if(listElement.isContactElement()){
        contact = (Contact) listElement;

        switch(contact.getStatus()){
        case Online: g.drawImage(symbols[0], 12, positionInPanel + 2, 15, 15, null); break;
        case Offline: g.drawImage(symbols[3], 12, positionInPanel + 2, 15, 15, null); break;
        case Invisible: g.drawImage(symbols[2], 12, positionInPanel + 2, 15, 15, null); break;
        case NotAvailable: g.drawImage(symbols[1], 12, positionInPanel + 2, 15, 15, null); break;
        }
View Full Code Here

      }
    }else if(arg0.getButton() == 1){

      if(displayedElements.get(element).isContactElement()){

        Contact contact = (Contact) displayedElements.get(element);
        markedElementIndex = -1;

        for(ContactListListener listener : contactListListener){
          listener.chatRequested(contact);
        }
View Full Code Here

    timer = new Timer();
    timer.schedule(new TimerTask(){

      public void run() {

        eventHandler.addNewContact(new Contact("212245243", ChatProvider.ICQ, Status.Online, "Sebastian", ""));
        eventHandler.addNewContact(new Contact("894534434",
            ChatProvider.ICQ, Status.Invisible, "Vanessa", ""));
        eventHandler.addNewContact(new Contact("345244675", ChatProvider.ICQ, Status.Offline, "Felix", ""));

        eventHandler.connectionToProviderEstablished(ChatProvider.ICQ);
      }}, 3000);
  }
View Full Code Here

    timer.schedule(new TimerTask(){

     
      public void run() {

        eventHandler.addNewContact(new Contact("312234112", ChatProvider.MSN, Status.NotAvailable, "Simon", ""));
        eventHandler.addNewContact(new Contact("342366432",
            ChatProvider.MSN, Status.Offline, "Clarisa", ""));
        eventHandler.addNewContact(new Contact("257453235", ChatProvider.MSN, Status.Offline, "Manuel", ""));
        eventHandler.addNewContact(new Contact("975322434",
            ChatProvider.MSN, Status.Offline, "Julia", ""));
        eventHandler.addNewContact(new Contact("238893455", ChatProvider.MSN, Status.Offline, "Kerstin", ""));
        eventHandler.addNewContact(new Contact("355788443",
            ChatProvider.MSN, Status.Offline, "Matthias", ""));
        eventHandler.addNewContact(new Contact("578433678", ChatProvider.MSN, Status.Offline, "Nadine", ""));
        eventHandler.addNewContact(new Contact("457355788",
            ChatProvider.MSN, Status.Offline, "Philipp", ""));
        eventHandler.addNewContact(new Contact("334533673", ChatProvider.MSN, Status.Offline, "Peter", ""));
        eventHandler.addNewContact(new Contact("445378335",
            ChatProvider.MSN, Status.Offline, "Rebecca", ""));
        eventHandler.addNewContact(new Contact("356535453", ChatProvider.MSN, Status.Offline, "Xena", ""));
        eventHandler.addNewContact(new Contact("885435345",
            ChatProvider.MSN, Status.Offline, "1Linda", ""));
        eventHandler.connectionToProviderEstablished(ChatProvider.MSN);
      }}, 3500);
  }
View Full Code Here

TOP

Related Classes of Control.Contact

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.