Package ants.p2p.messages

Examples of ants.p2p.messages.PrivateChatMessage


    }
  }

  public void propertyChange(PropertyChangeEvent e){
    if(e.getPropertyName().equals("privateChatMessageSending")){
      PrivateChatMessage pcm = (PrivateChatMessage)e.getNewValue();
      if(pcm.getDest().equals(this.peerId))
        this.setTitle("Chatting with: "+peerId.substring(0,10)+"   [Sending message...]");
    }else if(e.getPropertyName().equals("privateChatMessageFailed")){
      PrivateChatMessage pcm = (PrivateChatMessage)e.getNewValue();
      if(pcm.getDest().equals(this.peerId)){
        this.setTitle("Chatting with: " + peerId.substring(0, 10));
        JOptionPane.showMessageDialog(this, ji.JI.i("Error in sending message!"),
                                      ji.JI.i("Chat error"),
                                      JOptionPane.ERROR_MESSAGE);
      }
    }else if(e.getPropertyName().equals("privateChatMessageDelivered")){
      PrivateChatMessage pcm = (PrivateChatMessage)e.getNewValue();
      if(pcm.getDest().equals(this.peerId)){
        this.setTitle("Chatting with: " + peerId.substring(0, 10));
        this.jEditorPane1.setText(this.jEditorPane1.getText() +
                                  "You:\t" + pcm.getContent()+"\n");
      }
    }
  }
View Full Code Here

TOP

Related Classes of ants.p2p.messages.PrivateChatMessage

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.